Skip to content

Commit

Permalink
Merge branch 'master' into pynmeagps-no-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
richahert authored Feb 26, 2024
2 parents b66a486 + 7900f50 commit 34fc192
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
25 changes: 15 additions & 10 deletions MAVProxy/modules/mavproxy_map/mp_slipmap_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "?"
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion MAVProxy/tools/MAVExplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)'],
}
Expand Down

0 comments on commit 34fc192

Please # to comment.