From c70bf1b4d5385a287aeb375b7734d6aeb286ede1 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 22 Feb 2024 17:52:16 +1100 Subject: [PATCH 1/2] mavproxy_map: fix mouse-over information behaviour --- .../modules/mavproxy_map/mp_slipmap_ui.py | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py b/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py index 8067599dd8..7d0ed20b4d 100644 --- a/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py +++ b/MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py @@ -489,16 +489,23 @@ def update_position(self): newtext += ' SRTM Downloading ' newtext += '\n' - self.update_click_position_text() + cpt = self.click_position_text() + if cpt is not None: + newtext += cpt - def update_click_position_text(self): + if newtext != self.state.oldtext: + self.position.Clear() + self.position.WriteText(newtext) + self.state.oldtext = newtext + + def click_position_text(self): if self.click_pos is None: - return + return None if self.click_pos == self.last_click_pos: - return + return self.last_click_position_text if self.click_pos == self.last_click_pos_used_for_text: - return + return self.last_click_position_text terrain_height = None terrain_height_str = "?" @@ -531,13 +538,11 @@ def update_click_position_text(self): delta = terrain_height - self.last_terrain_height newtext += " (height %f)" % (delta, ) self.last_terrain_height = terrain_height + self.last_click_pos_used_for_text = self.click_pos - if newtext != self.state.oldtext: - self.position.Clear() - self.position.WriteText(newtext) - self.state.oldtext = newtext + self.last_click_position_text = newtext - self.last_click_pos_used_for_text = self.click_pos + return newtext def pixel_coords(self, latlon, reverse=False): '''return pixel coordinates in the map image for a (lat,lon) From 7900f50887a9da88daec75d9660296920281a67f Mon Sep 17 00:00:00 2001 From: Simon Hancock Date: Sun, 25 Feb 2024 18:07:59 +0000 Subject: [PATCH 2/2] MAVExplorer: Autocompletion on dump --verbose command --- MAVProxy/tools/MAVExplorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAVProxy/tools/MAVExplorer.py b/MAVProxy/tools/MAVExplorer.py index a01b44d8bb..bf084c7b28 100755 --- a/MAVProxy/tools/MAVExplorer.py +++ b/MAVProxy/tools/MAVExplorer.py @@ -125,7 +125,7 @@ def __init__(self): "set" : ["(SETTING)"], "condition" : ["(VARIABLE)"], "graph" : ['(VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE)'], - "dump" : ['(MESSAGETYPE)'], + "dump" : ['(MESSAGETYPE)', '--verbose (MESSAGETYPE)'], "map" : ['(VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE) (VARIABLE)'], "param" : ['download', 'check', 'help (PARAMETER)'], }