From d98800521644ff2ba5d761c66a0d601016b96dac Mon Sep 17 00:00:00 2001 From: makekam <1256400447@qq.com> Date: Fri, 23 Feb 2024 23:32:35 +0800 Subject: [PATCH] Update injectxmlparams.py Add extraction of Boolean attributes in injectxmlparams.py. --- src/lib/parameters/px4params/injectxmlparams.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/parameters/px4params/injectxmlparams.py b/src/lib/parameters/px4params/injectxmlparams.py index 060015a170..fd9d19ed17 100755 --- a/src/lib/parameters/px4params/injectxmlparams.py +++ b/src/lib/parameters/px4params/injectxmlparams.py @@ -14,7 +14,7 @@ class XMLInject(): def __init__(self, injected_xml_filename): self.groups=[] - valid_parameter_attributes = set(["category", "default", "name", "type", "volatile"]) + valid_parameter_attributes = set(["category", "default", "name", "type", "volatile", "boolean"]) valid_field_tags = set(["board","short_desc", "long_desc", "min", "max", "unit", "decimal", "increment", "reboot_required"]) valid_other_top_level_tags = set(["group","values"]) @@ -42,7 +42,8 @@ class XMLInject(): new_param.default = iparam.get('default') elif param_attrib == 'volatile': new_param.SetVolatile() - + elif param_attrib == "boolean": + new_param.SetBoolean() #get param info stored as child tags for child in iparam: