mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-11-03 11:52:22 +01:00
Refactor frequency conversion to use awk for improved precision
This commit is contained in:
1 parent
a32795e0bd
commit
16fef485bf
1 file changed
+2
-2
@@ -170,8 +170,8 @@ title=$(cat /tmp/radio_title_$selected 2>/dev/null)
|
||||
|
||||
|
||||
# Convert frequency from MHz to Hz (handle decimal values)
|
||||
freq_hz=$(echo "$freq * 1000000" | awk '{printf "%.0f", $1}')
|
||||
bw_hz=$(echo "$bw * 1000" | awk '{printf "%.0f", $1}')
|
||||
freq_hz=$(awk "BEGIN {printf \"%.0f\", $freq * 1000000}")
|
||||
bw_hz=$(awk "BEGIN {printf \"%.0f\", $bw * 1000}")
|
||||
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in new issue
Block a user