mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-09 23:01:35 +08:00
Revert "commander: update parameter strings to class enum"
This reverts commit c322f1d156.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user