move round() call to baro == None else clause

This commit is contained in:
John Wyman 2022-08-14 00:27:09 -07:00
parent 3e0d7ceec5
commit 6b4a5bdaf3

View File

@ -274,8 +274,7 @@ def baro_pressure_setting(msg):
)
baro = common.bin2int(mb[20:29])
baro = None if baro == 0 else 800 + (baro - 1) * 0.8
baro = round(baro, 1)
baro = None if baro == 0 else round(800 + (baro - 1) * 0.8, 1)
return baro