Skip to content

Commit 21733b0

Browse files
committed
mavflightview.py: try to get latlon directly from message
1 parent dbd82bb commit 21733b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

MAVProxy/tools/mavflightview.py

+5
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ def colour_for_point_type(mlog, point, instance, options):
290290

291291
def message_to_latlon(type, m, is_expression=False):
292292
'''convert a message to a lat/lon'''
293+
try:
294+
return m.get_latlon()
295+
except AttributeError:
296+
pass
297+
293298
if type in ['GPS', 'GPS2'] and not is_expression:
294299
status = getattr(m, 'Status', None)
295300
nsats = getattr(m, 'NSats', None)

0 commit comments

Comments
 (0)