Skip to content

Commit

Permalink
parameter_translation: Add parameter translation for renamed L1 param…
Browse files Browse the repository at this point in the history
…eters
  • Loading branch information
KonradRudin authored and sfuhrer committed Feb 9, 2023
1 parent 92277eb commit b9f9f25
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/lib/parameters/param_translation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,25 @@ bool param_modify_on_import(bson_node_t node)
}

return false;

//2023-02-08: translate L1 parameters after removing l1 control
{
if (strcmp("RWTO_L1_PERIOD", node->name) == 0) {
strcpy(node->name, "RWTO_NPFG_PERIOD");
PX4_INFO("copying %s -> %s", "RWTO_L1_PERIOD", "RWTO_NPFG_PERIOD");
return true;
}

if (strcmp("FW_L1_R_SLEW_MAX", node->name) == 0) {
strcpy(node->name, "FW_PN_R_SLEW_MAX");
PX4_INFO("copying %s -> %s", "FW_L1_R_SLEW_MAX", "FW_PN_R_SLEW_MAX");
return true;
}

if (strcmp("FW_L1_PERIOD", node->name) == 0) {
strcpy(node->name, "NPFG_PERIOD");
PX4_INFO("copying %s -> %s", "FW_L1_PERIOD", "NPFG_PERIOD");
return true;
}
}
}

0 comments on commit b9f9f25

Please sign in to comment.