sensors: add 2nd static notch and migrate existing parameters

- new static notch filter configured via IMU_GYRO_NF1_FRQ and IMU_GYRO_NF1_BW
 - existing notch parameters IMU_GYRO_NF_FREQ and IMU_GYRO_NF_BW become
IMU_GYRO_NF0_FRQ and IMU_GYRO_NF0_BW
This commit is contained in:
Daniel Agar
2022-03-19 14:38:04 -04:00
parent afeab9587e
commit 475bd42ab8
5 changed files with 99 additions and 23 deletions
+15
View File
@@ -163,5 +163,20 @@ bool param_modify_on_import(bson_node_t node)
}
}
// 2022-03-15: translate notch filter IMU_GYRO_NF_FREQ to IMU_GYRO_NF0_FRQ and IMU_GYRO_NF_BW -> IMU_GYRO_NF0_BW
{
if (strcmp("IMU_GYRO_NF_FREQ", node->name) == 0) {
strcpy(node->name, "IMU_GYRO_NF0_FRQ");
PX4_INFO("copying %s -> %s", "IMU_GYRO_NF_FREQ", "IMU_GYRO_NF0_FRQ");
return true;
}
if (strcmp("IMU_GYRO_NF_BW", node->name) == 0) {
strcpy(node->name, "IMU_GYRO_NF0_BW");
PX4_INFO("copying %s -> %s", "IMU_GYRO_NF_BW", "IMU_GYRO_NF0_BW");
return true;
}
}
return false;
}