Fixed frequency pretty print function

This commit is contained in:
Mark Qvist 2023-09-30 19:18:30 +02:00
parent 4fa616a326
commit 2d2f0947ac
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ def prettyfrequency(hz, suffix="Hz"):
for unit in units:
if abs(num) < 1000.0:
if unit == "":
return "%.0f %s%s" % (num, unit, suffix)
return "%.2f %s%s" % (num, unit, suffix)
else:
return "%.2f %s%s" % (num, unit, suffix)
num /= 1000.0