Fix UnboundLocalError in airborne_velocity when velocity is zero

This commit is contained in:
Novak, Marek 2021-06-28 17:21:33 +02:00
parent 83e22892ba
commit a0a8c9b2f7

View File

@ -65,8 +65,9 @@ def airborne_velocity(msg, source=False):
trk = math.degrees(trk) # convert to degrees trk = math.degrees(trk) # convert to degrees
trk = trk if trk >= 0 else trk + 360 # no negative val trk = trk if trk >= 0 else trk + 360 # no negative val
trk_or_hdg = round(trk, 2)
spd_type = "GS" spd_type = "GS"
trk_or_hdg = round(trk, 2)
dir_type = "TRUE_NORTH" dir_type = "TRUE_NORTH"
else: else: