mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-23 06:00:18 +00:00
Fixed frequency pretty print function
This commit is contained in:
parent
4fa616a326
commit
2d2f0947ac
@ -188,7 +188,7 @@ def prettyfrequency(hz, suffix="Hz"):
|
|||||||
for unit in units:
|
for unit in units:
|
||||||
if abs(num) < 1000.0:
|
if abs(num) < 1000.0:
|
||||||
if unit == "":
|
if unit == "":
|
||||||
return "%.0f %s%s" % (num, unit, suffix)
|
return "%.2f %s%s" % (num, unit, suffix)
|
||||||
else:
|
else:
|
||||||
return "%.2f %s%s" % (num, unit, suffix)
|
return "%.2f %s%s" % (num, unit, suffix)
|
||||||
num /= 1000.0
|
num /= 1000.0
|
||||||
|
Loading…
Reference in New Issue
Block a user