Revert "commander: update parameter strings to class enum"

This reverts commit c322f1d156.
This commit is contained in:
Daniel Agar
2019-10-03 11:28:44 -04:00
parent 5f040fe24c
commit a5895e5a99
8 changed files with 70 additions and 73 deletions
@@ -42,7 +42,6 @@
#include "commander_helper.h"
#include <px4_defines.h>
#include <px4_param.h>
#include <px4_posix.h>
#include <px4_time.h>
#include <stdio.h>
@@ -107,7 +106,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
/* only warn if analog scaling is zero */
float analog_scaling = 0.0f;
param_get(param_handle(px4::params::SENS_DPRES_ANSC), &(analog_scaling));
param_get(param_find("SENS_DPRES_ANSC"), &(analog_scaling));
if (fabsf(analog_scaling) < 0.1f) {
calibration_log_critical(mavlink_log_pub, "[cal] No airspeed sensor found");
@@ -115,7 +114,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
}
/* set scaling offset parameter */
if (param_set(param_handle(px4::params::SENS_DPRES_OFF), &(diff_pres_offset))) {
if (param_set(param_find("SENS_DPRES_OFF"), &(diff_pres_offset))) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, 1);
goto error_return;
}
@@ -186,7 +185,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
diff_pres_offset = 0.00000001f;
}
if (param_set(param_handle(px4::params::SENS_DPRES_OFF), &(diff_pres_offset))) {
if (param_set(param_find("SENS_DPRES_OFF"), &(diff_pres_offset))) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, 1);
goto error_return;
}
@@ -237,7 +236,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
/* the user setup is wrong, wipe the calibration to force a proper re-calibration */
diff_pres_offset = 0.0f;
if (param_set(param_handle(px4::params::SENS_DPRES_OFF), &(diff_pres_offset))) {
if (param_set(param_find("SENS_DPRES_OFF"), &(diff_pres_offset))) {
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, 1);
goto error_return;
}