diff --git a/src/lib/parameters/px4params/jsonout.py b/src/lib/parameters/px4params/jsonout.py index 25ee3c1290c7..73ddace0a397 100644 --- a/src/lib/parameters/px4params/jsonout.py +++ b/src/lib/parameters/px4params/jsonout.py @@ -52,8 +52,8 @@ def __init__(self, groups, board, inject_xml_file_name): if (param.GetCategory()): curr_param['category'] = param.GetCategory() - if (param.GetVolatile() == "true"): - curr_param['volatile'] = param.GetVolatile() + if param.GetVolatile(): + curr_param['volatile'] = "True" last_param_name = param.GetName() for code in param.GetFieldCodes(): diff --git a/src/lib/parameters/px4params/srcparser.py b/src/lib/parameters/px4params/srcparser.py index 6de995b66b3f..e3d7944f356c 100644 --- a/src/lib/parameters/px4params/srcparser.py +++ b/src/lib/parameters/px4params/srcparser.py @@ -58,8 +58,8 @@ def __init__(self, name, type, default = ""): self.name = name self.type = type self.default = default - self.volatile = "false" self.category = "" + self.volatile = False self.boolean = False def GetName(self): @@ -102,7 +102,7 @@ def SetVolatile(self): """ Set volatile flag """ - self.volatile = "true" + self.volatile = True def SetBoolean(self): """ diff --git a/src/lib/parameters/px4params/xmlout.py b/src/lib/parameters/px4params/xmlout.py index e95dba2f085f..ecbd5a3dc6f5 100644 --- a/src/lib/parameters/px4params/xmlout.py +++ b/src/lib/parameters/px4params/xmlout.py @@ -39,8 +39,10 @@ def __init__(self, groups, board): xml_param.attrib["name"] = param.GetName() xml_param.attrib["default"] = param.GetDefault() xml_param.attrib["type"] = param.GetType() - if (param.GetVolatile() == "true"): - xml_param.attrib["volatile"] = param.GetVolatile() + if param.GetVolatile(): + xml_param.attrib["volatile"] = "true" + if param.GetBoolean(): + xml_param.attrib["boolean"] = "true" if (param.GetCategory()): xml_param.attrib["category"] = param.GetCategory() last_param_name = param.GetName()