Skip to content

Commit

Permalink
mavparm: fixed mavset with float
Browse files Browse the repository at this point in the history
this fixes param revert in MAVProxy
  • Loading branch information
tridge authored and peterbarker committed Feb 18, 2024
1 parent 664f165 commit a751679
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mavparm.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def load(self, filename, wildcard='*', mav=None, check=True, use_excludes=True):
if not fnmatch.fnmatch(a[0].upper(), wildcard.upper()):
continue
value = a[1].strip()
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

0 comments on commit a751679

Please sign in to comment.