Skip to content

Commit 6376731

Browse files
peterbarkertridge
authored andcommitted
misseditor: correct display of distance/gradient
somehow this changed to a string... so just cope with that
1 parent 1500ad2 commit 6376731

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: MAVProxy/modules/mavproxy_misseditor/missionEditorFrame.py

+2
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,8 @@ def fix_jumps(self, row_selected, delta):
881881

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

0 commit comments

Comments
 (0)