From a751679d0942d78e38bbe1d08ebbe23f8664aa84 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 18 Feb 2024 12:09:27 +1100 Subject: [PATCH] mavparm: fixed mavset with float this fixes param revert in MAVProxy --- mavparm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mavparm.py b/mavparm.py index a2fcef518..f89cc8164 100644 --- a/mavparm.py +++ b/mavparm.py @@ -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)