mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:28:53 +08:00
commander: update parameter strings to class enum
This commit is contained in:
@@ -1212,33 +1212,33 @@ Commander::run()
|
||||
status_flags.condition_system_sensors_initialized = true;
|
||||
|
||||
/* set parameters */
|
||||
param_t _param_sys_type = param_find("MAV_TYPE");
|
||||
param_t _param_system_id = param_find("MAV_SYS_ID");
|
||||
param_t _param_component_id = param_find("MAV_COMP_ID");
|
||||
param_t _param_ef_throttle_thres = param_find("COM_EF_THROT");
|
||||
param_t _param_ef_current2throttle_thres = param_find("COM_EF_C2T");
|
||||
param_t _param_ef_time_thres = param_find("COM_EF_TIME");
|
||||
param_t _param_rc_in_off = param_find("COM_RC_IN_MODE");
|
||||
param_t _param_rc_arm_hyst = param_find("COM_RC_ARM_HYST");
|
||||
param_t _param_min_stick_change = param_find("COM_RC_STICK_OV");
|
||||
param_t _param_geofence_action = param_find("GF_ACTION");
|
||||
param_t _param_arm_without_gps = param_find("COM_ARM_WO_GPS");
|
||||
param_t _param_arm_switch_is_button = param_find("COM_ARM_SWISBTN");
|
||||
param_t _param_rc_override = param_find("COM_RC_OVERRIDE");
|
||||
param_t _param_arm_mission_required = param_find("COM_ARM_MIS_REQ");
|
||||
param_t _param_escs_checks_required = param_find("COM_ARM_CHK_ESCS");
|
||||
param_t _param_flight_uuid = param_find("COM_FLIGHT_UUID");
|
||||
param_t _param_takeoff_finished_action = param_find("COM_TAKEOFF_ACT");
|
||||
param_t _param_sys_type = param_handle(px4::params::MAV_TYPE);
|
||||
param_t _param_system_id = param_handle(px4::params::MAV_SYS_ID);
|
||||
param_t _param_component_id = param_handle(px4::params::MAV_COMP_ID);
|
||||
param_t _param_ef_throttle_thres = param_handle(px4::params::COM_EF_THROT);
|
||||
param_t _param_ef_current2throttle_thres = param_handle(px4::params::COM_EF_C2T);
|
||||
param_t _param_ef_time_thres = param_handle(px4::params::COM_EF_TIME);
|
||||
param_t _param_rc_in_off = param_handle(px4::params::COM_RC_IN_MODE);
|
||||
param_t _param_rc_arm_hyst = param_handle(px4::params::COM_RC_ARM_HYST);
|
||||
param_t _param_min_stick_change = param_handle(px4::params::COM_RC_STICK_OV);
|
||||
param_t _param_geofence_action = param_handle(px4::params::GF_ACTION);
|
||||
param_t _param_arm_without_gps = param_handle(px4::params::COM_ARM_WO_GPS);
|
||||
param_t _param_arm_switch_is_button = param_handle(px4::params::COM_ARM_SWISBTN);
|
||||
param_t _param_rc_override = param_handle(px4::params::COM_RC_OVERRIDE);
|
||||
param_t _param_arm_mission_required = param_handle(px4::params::COM_ARM_MIS_REQ);
|
||||
param_t _param_escs_checks_required = param_handle(px4::params::COM_ARM_CHK_ESCS);
|
||||
param_t _param_flight_uuid = param_handle(px4::params::COM_FLIGHT_UUID);
|
||||
param_t _param_takeoff_finished_action = param_handle(px4::params::COM_TAKEOFF_ACT);
|
||||
|
||||
param_t _param_fmode_1 = param_find("COM_FLTMODE1");
|
||||
param_t _param_fmode_2 = param_find("COM_FLTMODE2");
|
||||
param_t _param_fmode_3 = param_find("COM_FLTMODE3");
|
||||
param_t _param_fmode_4 = param_find("COM_FLTMODE4");
|
||||
param_t _param_fmode_5 = param_find("COM_FLTMODE5");
|
||||
param_t _param_fmode_6 = param_find("COM_FLTMODE6");
|
||||
param_t _param_fmode_1 = param_handle(px4::params::COM_FLTMODE1);
|
||||
param_t _param_fmode_2 = param_handle(px4::params::COM_FLTMODE2);
|
||||
param_t _param_fmode_3 = param_handle(px4::params::COM_FLTMODE3);
|
||||
param_t _param_fmode_4 = param_handle(px4::params::COM_FLTMODE4);
|
||||
param_t _param_fmode_5 = param_handle(px4::params::COM_FLTMODE5);
|
||||
param_t _param_fmode_6 = param_handle(px4::params::COM_FLTMODE6);
|
||||
|
||||
param_t _param_airmode = param_find("MC_AIRMODE");
|
||||
param_t _param_rc_map_arm_switch = param_find("RC_MAP_ARM_SW");
|
||||
param_t _param_rc_map_arm_switch = param_handle(px4::params::RC_MAP_ARM_SW);
|
||||
|
||||
status_flags.avoidance_system_required = _param_com_obs_avoid.get();
|
||||
|
||||
|
||||
@@ -45,10 +45,11 @@
|
||||
#include "rc_check.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
#include <parameters/param.h>
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <px4_param.h>
|
||||
#include <lib/mathlib/mathlib.h>
|
||||
#include <lib/parameters/param.h>
|
||||
#include <lib/systemlib/mavlink_log.h>
|
||||
#include <uORB/Subscription.hpp>
|
||||
#include <uORB/topics/airspeed.h>
|
||||
#include <uORB/topics/differential_pressure.h>
|
||||
@@ -160,7 +161,7 @@ static bool imuConsistencyCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s
|
||||
|
||||
// Use the difference between IMU's to detect a bad calibration.
|
||||
// If a single IMU is fitted, the value being checked will be zero so this check will always pass.
|
||||
param_get(param_find("COM_ARM_IMU_ACC"), &test_limit);
|
||||
param_get(param_handle(px4::params::COM_ARM_IMU_ACC), &test_limit);
|
||||
|
||||
if (sensors.accel_inconsistency_m_s_s > test_limit) {
|
||||
if (report_status) {
|
||||
@@ -179,7 +180,7 @@ static bool imuConsistencyCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s
|
||||
}
|
||||
|
||||
// Fail if gyro difference greater than 5 deg/sec and notify if greater than 2.5 deg/sec
|
||||
param_get(param_find("COM_ARM_IMU_GYR"), &test_limit);
|
||||
param_get(param_handle(px4::params::COM_ARM_IMU_GYR), &test_limit);
|
||||
|
||||
if (sensors.gyro_inconsistency_rad_s > test_limit) {
|
||||
if (report_status) {
|
||||
@@ -219,7 +220,7 @@ static bool magConsistencyCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s
|
||||
// Use the difference between sensors to detect a bad calibration, orientation or magnetic interference.
|
||||
// If a single sensor is fitted, the value being checked will be zero so this check will always pass.
|
||||
int32_t angle_difference_limit_deg;
|
||||
param_get(param_find("COM_ARM_MAG_ANG"), &angle_difference_limit_deg);
|
||||
param_get(param_handle(px4::params::COM_ARM_MAG_ANG), &angle_difference_limit_deg);
|
||||
|
||||
pass = pass || angle_difference_limit_deg < 0; // disabled, pass check
|
||||
pass = pass || sensors.mag_inconsistency_angle < math::radians<float>(angle_difference_limit_deg);
|
||||
@@ -507,7 +508,7 @@ static bool ekf2Check(orb_advert_t *mavlink_log_pub, vehicle_status_s &vehicle_s
|
||||
}
|
||||
|
||||
// check vertical position innovation test ratio
|
||||
param_get(param_find("COM_ARM_EKF_HGT"), &test_limit);
|
||||
param_get(param_handle(px4::params::COM_ARM_EKF_HGT), &test_limit);
|
||||
|
||||
if (status.hgt_test_ratio > test_limit) {
|
||||
if (report_fail) {
|
||||
@@ -519,7 +520,7 @@ static bool ekf2Check(orb_advert_t *mavlink_log_pub, vehicle_status_s &vehicle_s
|
||||
}
|
||||
|
||||
// check velocity innovation test ratio
|
||||
param_get(param_find("COM_ARM_EKF_VEL"), &test_limit);
|
||||
param_get(param_handle(px4::params::COM_ARM_EKF_VEL), &test_limit);
|
||||
|
||||
if (status.vel_test_ratio > test_limit) {
|
||||
if (report_fail) {
|
||||
@@ -531,7 +532,7 @@ static bool ekf2Check(orb_advert_t *mavlink_log_pub, vehicle_status_s &vehicle_s
|
||||
}
|
||||
|
||||
// check horizontal position innovation test ratio
|
||||
param_get(param_find("COM_ARM_EKF_POS"), &test_limit);
|
||||
param_get(param_handle(px4::params::COM_ARM_EKF_POS), &test_limit);
|
||||
|
||||
if (status.pos_test_ratio > test_limit) {
|
||||
if (report_fail) {
|
||||
@@ -543,7 +544,7 @@ static bool ekf2Check(orb_advert_t *mavlink_log_pub, vehicle_status_s &vehicle_s
|
||||
}
|
||||
|
||||
// check magnetometer innovation test ratio
|
||||
param_get(param_find("COM_ARM_EKF_YAW"), &test_limit);
|
||||
param_get(param_handle(px4::params::COM_ARM_EKF_YAW), &test_limit);
|
||||
|
||||
if (status.mag_test_ratio > test_limit) {
|
||||
if (report_fail) {
|
||||
@@ -555,7 +556,7 @@ static bool ekf2Check(orb_advert_t *mavlink_log_pub, vehicle_status_s &vehicle_s
|
||||
}
|
||||
|
||||
// check accelerometer delta velocity bias estimates
|
||||
param_get(param_find("COM_ARM_EKF_AB"), &test_limit);
|
||||
param_get(param_handle(px4::params::COM_ARM_EKF_AB), &test_limit);
|
||||
|
||||
for (uint8_t index = 13; index < 16; index++) {
|
||||
// allow for higher uncertainty in estimates for axes that are less observable to prevent false positives
|
||||
@@ -573,7 +574,7 @@ static bool ekf2Check(orb_advert_t *mavlink_log_pub, vehicle_status_s &vehicle_s
|
||||
}
|
||||
|
||||
// check gyro delta angle bias estimates
|
||||
param_get(param_find("COM_ARM_EKF_GB"), &test_limit);
|
||||
param_get(param_handle(px4::params::COM_ARM_EKF_GB), &test_limit);
|
||||
|
||||
if (fabsf(status.states[10]) > test_limit || fabsf(status.states[11]) > test_limit
|
||||
|| fabsf(status.states[12]) > test_limit) {
|
||||
@@ -733,10 +734,10 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &status,
|
||||
bool prime_found = false;
|
||||
|
||||
int32_t prime_id = -1;
|
||||
param_get(param_find("CAL_MAG_PRIME"), &prime_id);
|
||||
param_get(param_handle(px4::params::CAL_MAG_PRIME), &prime_id);
|
||||
|
||||
int32_t sys_has_mag = 1;
|
||||
param_get(param_find("SYS_HAS_MAG"), &sys_has_mag);
|
||||
param_get(param_handle(px4::params::SYS_HAS_MAG), &sys_has_mag);
|
||||
|
||||
bool mag_fail_reported = false;
|
||||
|
||||
@@ -783,7 +784,7 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &status,
|
||||
if (checkSensors) {
|
||||
bool prime_found = false;
|
||||
int32_t prime_id = -1;
|
||||
param_get(param_find("CAL_ACC_PRIME"), &prime_id);
|
||||
param_get(param_handle(px4::params::CAL_ACC_PRIME), &prime_id);
|
||||
|
||||
bool accel_fail_reported = false;
|
||||
|
||||
@@ -823,7 +824,7 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &status,
|
||||
if (checkSensors) {
|
||||
bool prime_found = false;
|
||||
int32_t prime_id = -1;
|
||||
param_get(param_find("CAL_GYRO_PRIME"), &prime_id);
|
||||
param_get(param_handle(px4::params::CAL_GYRO_PRIME), &prime_id);
|
||||
|
||||
bool gyro_fail_reported = false;
|
||||
|
||||
@@ -864,10 +865,10 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &status,
|
||||
bool prime_found = false;
|
||||
|
||||
int32_t prime_id = -1;
|
||||
param_get(param_find("CAL_BARO_PRIME"), &prime_id);
|
||||
param_get(param_handle(px4::params::CAL_BARO_PRIME), &prime_id);
|
||||
|
||||
int32_t sys_has_baro = 1;
|
||||
param_get(param_find("SYS_HAS_BARO"), &sys_has_baro);
|
||||
param_get(param_handle(px4::params::SYS_HAS_BARO), &sys_has_baro);
|
||||
|
||||
bool baro_fail_reported = false;
|
||||
|
||||
@@ -953,7 +954,7 @@ bool preflightCheck(orb_advert_t *mavlink_log_pub, vehicle_status_s &status,
|
||||
int32_t estimator_type = -1;
|
||||
|
||||
if (status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING && !status.is_vtol) {
|
||||
param_get(param_find("SYS_MC_EST_GROUP"), &estimator_type);
|
||||
param_get(param_handle(px4::params::SYS_MC_EST_GROUP), &estimator_type);
|
||||
|
||||
} else {
|
||||
// EKF2 is currently the only supported option for FW & VTOL
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
#include "commander_helper.h"
|
||||
|
||||
#include <px4_defines.h>
|
||||
#include <px4_param.h>
|
||||
#include <px4_posix.h>
|
||||
#include <px4_time.h>
|
||||
#include <unistd.h>
|
||||
@@ -290,7 +291,7 @@ int do_accel_calibration(orb_advert_t *mavlink_log_pub)
|
||||
}
|
||||
|
||||
/* measurements completed successfully, rotate calibration values */
|
||||
param_t board_rotation_h = param_find("SENS_BOARD_ROT");
|
||||
param_t board_rotation_h = param_handle(px4::params::SENS_BOARD_ROT);
|
||||
int32_t board_rotation_int;
|
||||
param_get(board_rotation_h, &(board_rotation_int));
|
||||
enum Rotation board_rotation_id = (enum Rotation)board_rotation_int;
|
||||
@@ -317,7 +318,8 @@ int do_accel_calibration(orb_advert_t *mavlink_log_pub)
|
||||
|
||||
bool failed = false;
|
||||
|
||||
failed = failed || (PX4_OK != param_set_no_notification(param_find("CAL_ACC_PRIME"), &(device_id_primary)));
|
||||
failed = failed
|
||||
|| (PX4_OK != param_set_no_notification(param_handle(px4::params::CAL_ACC_PRIME), &(device_id_primary)));
|
||||
|
||||
|
||||
PX4_INFO("found offset %d: x: %.6f, y: %.6f, z: %.6f", uorb_index,
|
||||
@@ -615,10 +617,10 @@ calibrate_return read_accelerometer_avg(int sensor_correction_sub, int (&subs)[m
|
||||
float (&accel_avg)[max_accel_sens][detect_orientation_side_count][3], unsigned orient, unsigned samples_num)
|
||||
{
|
||||
/* get total sensor board rotation matrix */
|
||||
param_t board_rotation_h = param_find("SENS_BOARD_ROT");
|
||||
param_t board_offset_x = param_find("SENS_BOARD_X_OFF");
|
||||
param_t board_offset_y = param_find("SENS_BOARD_Y_OFF");
|
||||
param_t board_offset_z = param_find("SENS_BOARD_Z_OFF");
|
||||
param_t board_rotation_h = param_handle(px4::params::SENS_BOARD_ROT);
|
||||
param_t board_offset_x = param_handle(px4::params::SENS_BOARD_X_OFF);
|
||||
param_t board_offset_y = param_handle(px4::params::SENS_BOARD_Y_OFF);
|
||||
param_t board_offset_z = param_handle(px4::params::SENS_BOARD_Z_OFF);
|
||||
|
||||
float board_offset[3];
|
||||
param_get(board_offset_x, &board_offset[0]);
|
||||
@@ -805,9 +807,9 @@ int do_level_calibration(orb_advert_t *mavlink_log_pub)
|
||||
|
||||
calibration_log_info(mavlink_log_pub, CAL_QGC_STARTED_MSG, "level");
|
||||
|
||||
param_t roll_offset_handle = param_find("SENS_BOARD_X_OFF");
|
||||
param_t pitch_offset_handle = param_find("SENS_BOARD_Y_OFF");
|
||||
param_t board_rot_handle = param_find("SENS_BOARD_ROT");
|
||||
param_t roll_offset_handle = param_handle(px4::params::SENS_BOARD_X_OFF);
|
||||
param_t pitch_offset_handle = param_handle(px4::params::SENS_BOARD_Y_OFF);
|
||||
param_t board_rot_handle = param_handle(px4::params::SENS_BOARD_ROT);
|
||||
|
||||
// save old values if calibration fails
|
||||
float roll_offset_current;
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "commander_helper.h"
|
||||
|
||||
#include <px4_defines.h>
|
||||
#include <px4_param.h>
|
||||
#include <px4_posix.h>
|
||||
#include <px4_time.h>
|
||||
#include <stdio.h>
|
||||
@@ -106,7 +107,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_find("SENS_DPRES_ANSC"), &(analog_scaling));
|
||||
param_get(param_handle(px4::params::SENS_DPRES_ANSC), &(analog_scaling));
|
||||
|
||||
if (fabsf(analog_scaling) < 0.1f) {
|
||||
calibration_log_critical(mavlink_log_pub, "[cal] No airspeed sensor found");
|
||||
@@ -114,7 +115,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
|
||||
}
|
||||
|
||||
/* set scaling offset parameter */
|
||||
if (param_set(param_find("SENS_DPRES_OFF"), &(diff_pres_offset))) {
|
||||
if (param_set(param_handle(px4::params::SENS_DPRES_OFF), &(diff_pres_offset))) {
|
||||
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, 1);
|
||||
goto error_return;
|
||||
}
|
||||
@@ -185,7 +186,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
|
||||
diff_pres_offset = 0.00000001f;
|
||||
}
|
||||
|
||||
if (param_set(param_find("SENS_DPRES_OFF"), &(diff_pres_offset))) {
|
||||
if (param_set(param_handle(px4::params::SENS_DPRES_OFF), &(diff_pres_offset))) {
|
||||
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, 1);
|
||||
goto error_return;
|
||||
}
|
||||
@@ -236,7 +237,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_find("SENS_DPRES_OFF"), &(diff_pres_offset))) {
|
||||
if (param_set(param_handle(px4::params::SENS_DPRES_OFF), &(diff_pres_offset))) {
|
||||
calibration_log_critical(mavlink_log_pub, CAL_ERROR_SET_PARAMS_MSG, 1);
|
||||
goto error_return;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,9 @@
|
||||
|
||||
#include <px4_defines.h>
|
||||
#include <px4_config.h>
|
||||
#include <px4_param.h>
|
||||
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <lib/systemlib/mavlink_log.h>
|
||||
#include <uORB/PublicationQueued.hpp>
|
||||
#include <uORB/topics/vehicle_command.h>
|
||||
#include <uORB/topics/vehicle_command_ack.h>
|
||||
@@ -276,7 +277,7 @@ void arm_auth_update(hrt_abstime now, bool param_update)
|
||||
void arm_auth_init(orb_advert_t *mav_log_pub, uint8_t *sys_id)
|
||||
{
|
||||
system_id = sys_id;
|
||||
param_arm_parameters = param_find("COM_ARM_AUTH");
|
||||
param_arm_parameters = param_handle(px4::params::COM_ARM_AUTH);
|
||||
command_ack_sub = orb_subscribe(ORB_ID(vehicle_command_ack));
|
||||
mavlink_log_pub = mav_log_pub;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
#include <px4_posix.h>
|
||||
#include <px4_defines.h>
|
||||
#include <px4_param.h>
|
||||
#include <px4_time.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@@ -446,7 +447,8 @@ int do_gyro_calibration(orb_advert_t *mavlink_log_pub)
|
||||
/* set offset parameters to new values */
|
||||
bool failed = false;
|
||||
|
||||
failed = failed || (PX4_OK != param_set_no_notification(param_find("CAL_GYRO_PRIME"), &(device_id_primary)));
|
||||
failed = failed
|
||||
|| (PX4_OK != param_set_no_notification(param_handle(px4::params::CAL_GYRO_PRIME), &(device_id_primary)));
|
||||
|
||||
bool tc_locked[3] = {false}; // true when the thermal parameter instance has already been adjusted by the calibrator
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "calibration_messages.h"
|
||||
|
||||
#include <px4_defines.h>
|
||||
#include <px4_param.h>
|
||||
#include <px4_posix.h>
|
||||
#include <px4_time.h>
|
||||
#include <stdio.h>
|
||||
@@ -541,7 +542,7 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub)
|
||||
// Collect: As defined by configuration
|
||||
// start with a full mask, all six bits set
|
||||
int32_t cal_mask = (1 << 6) - 1;
|
||||
param_get(param_find("CAL_MAG_SIDES"), &cal_mask);
|
||||
param_get(param_handle(px4::params::CAL_MAG_SIDES), &cal_mask);
|
||||
|
||||
calibration_sides = 0;
|
||||
|
||||
@@ -792,7 +793,7 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub)
|
||||
// }
|
||||
}
|
||||
|
||||
// Data points are no longer needed
|
||||
// Data points are no longer needed
|
||||
for (size_t cur_mag = 0; cur_mag < max_mags; cur_mag++) {
|
||||
free(worker_data.x[cur_mag]);
|
||||
free(worker_data.y[cur_mag]);
|
||||
@@ -899,7 +900,7 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub)
|
||||
|
||||
// Trigger a param set on the last step so the whole
|
||||
// system updates
|
||||
(void)param_set(param_find("CAL_MAG_PRIME"), &(device_id_primary));
|
||||
(void)param_set(param_handle(px4::params::CAL_MAG_PRIME), &(device_id_primary));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -40,15 +40,10 @@
|
||||
#include "rc_check.h"
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_param.h>
|
||||
#include <px4_time.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <systemlib/err.h>
|
||||
|
||||
#include <parameters/param.h>
|
||||
#include <lib/parameters/param.h>
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <drivers/drv_rc_input.h>
|
||||
|
||||
@@ -71,7 +66,7 @@ int rc_calibration_check(orb_advert_t *mavlink_log_pub, bool report_fail, bool i
|
||||
|
||||
/* if VTOL, check transition switch mapping */
|
||||
if (isVTOL) {
|
||||
param_t trans_parm = param_find("RC_MAP_TRANS_SW");
|
||||
param_t trans_parm = param_handle(px4::params::RC_MAP_TRANS_SW);
|
||||
|
||||
if (trans_parm == PARAM_INVALID) {
|
||||
if (report_fail) { mavlink_log_critical(mavlink_log_pub, "RC_MAP_TRANS_SW PARAMETER MISSING."); }
|
||||
|
||||
Reference in New Issue
Block a user