From 1b76d34c0b174163734ea6fb0d2ea9ad57c27c09 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 12 Apr 2024 13:11:40 +1000 Subject: [PATCH] misseditor: correct display of distance/gradient somehow this changed to a string... so just cope with that --- MAVProxy/modules/mavproxy_misseditor/missionEditorFrame.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAVProxy/modules/mavproxy_misseditor/missionEditorFrame.py b/MAVProxy/modules/mavproxy_misseditor/missionEditorFrame.py index d6f3c3f972..499c5f4b33 100755 --- a/MAVProxy/modules/mavproxy_misseditor/missionEditorFrame.py +++ b/MAVProxy/modules/mavproxy_misseditor/missionEditorFrame.py @@ -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