From 6b4a5bdaf33b9460d0e539c37647f33ca0b14f95 Mon Sep 17 00:00:00 2001 From: John Wyman Date: Sun, 14 Aug 2022 00:27:09 -0700 Subject: [PATCH] move round() call to baro == None else clause --- pyModeS/decoder/bds/bds62.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyModeS/decoder/bds/bds62.py b/pyModeS/decoder/bds/bds62.py index 16db8f1..2d070d7 100644 --- a/pyModeS/decoder/bds/bds62.py +++ b/pyModeS/decoder/bds/bds62.py @@ -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