Parameters: Add support for volatile parameters

Volatile parameters are ones that do not represent a fundamental configuration change but rather than incrementally changing settings. These include logged flight hours or sensor offsets. Marking them as volatile avoids these parameters forcing time-consuming telemetry updates.
This commit is contained in:
Lorenz Meier
2018-01-08 09:27:22 +01:00
parent f284385c3f
commit 7695f79239
3 changed files with 33 additions and 18 deletions
@@ -16,6 +16,11 @@ struct px4_parameters_t px4_parameters = {
{
"{{ param.attrib["name"] }}",
PARAM_TYPE_{{ param.attrib["type"] }},
{%- if param.attrib["volatile"] == "true" %}
.volatile_param = 1,
{%- else %}
.volatile_param = 0,
{%- endif %}
{%- if param.attrib["type"] == "FLOAT" %}
.val.f = {{ param.attrib["default"] }}
{%- elif param.attrib["type"] == "INT32" %}