Skip to content

Commit

Permalink
misseditor: correct display of distance/gradient
Browse files Browse the repository at this point in the history
somehow this changed to a string... so just cope with that
  • Loading branch information
peterbarker authored and tridge committed Apr 15, 2024
1 parent 1500ad2 commit 6376731
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MAVProxy/modules/mavproxy_misseditor/missionEditorFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,8 @@ def fix_jumps(self, row_selected, delta):

def has_location_cmd(self, cmd_id):
'''return True if a WP command has a location'''
if isinstance(cmd_id, str):
cmd_id = eval(f"mavutil.mavlink.MAV_CMD_{cmd_id}")
if cmd_id in mavutil.mavlink.enums['MAV_CMD'].keys():
cmd_enum = mavutil.mavlink.enums['MAV_CMD'][cmd_id]
# default to having location for older installs of pymavlink
Expand Down

0 comments on commit 6376731

Please sign in to comment.