Fix UnboundLocalError in airborne_velocity when velocity is zero
This commit is contained in:
parent
83e22892ba
commit
a0a8c9b2f7
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user