Skip to content

Commit

Permalink
Merge branch 'ArduPilot:master' into dump-verbose-dfmsg
Browse files Browse the repository at this point in the history
  • Loading branch information
shancock884 authored Jan 26, 2024
2 parents 0517029 + 35bc0c1 commit b8cdbab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mavparm.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def mavset(self, mav, name, value, retries=3, parm_type=None):
return False
numeric_value, = struct.unpack(">f", vstr)
else:
if value.lower().startswith('0x'):
if isinstance(value, str) and value.lower().startswith('0x'):
numeric_value = int(value[2:], 16)
else:
numeric_value = float(value)
Expand Down
4 changes: 2 additions & 2 deletions tools/mavlogdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def reduce_rate_msg(m, reduction_rate):
'''return True if this msg should be discarded by reduction'''
global last_msg_rate_t
mtype = m.get_type()
if mtype in ['PARM','MSG','FMT','FMTU','MULT','MODE','EVT','UNIT']:
if mtype in ['PARM','MSG','FMT','FMTU','MULT','MODE','EVT','UNIT', 'VER']:
return False
t = getattr(m,'_timestamp',None)
if t is None:
Expand Down Expand Up @@ -258,7 +258,7 @@ def match_type(mtype, patterns):
continue

if not mavutil.evaluate_condition(args.condition, mlog.messages) and (
not (m_type in ['FMT', 'FMTU', 'MULT', 'PARM', 'MODE', 'UNIT'] and args.meta)):
not (m_type in ['FMT', 'FMTU', 'MULT', 'PARM', 'MODE', 'UNIT', 'VER'] and args.meta)):
continue
if args.source_system is not None and args.source_system != m.get_srcSystem():
continue
Expand Down

0 comments on commit b8cdbab

Please sign in to comment.