mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 15:30:34 +08:00
commander: proper arguments for preflight check
This commit is contained in:
@@ -1531,7 +1531,7 @@ int commander_thread_main(int argc, char *argv[])
|
||||
// sensor diagnostics done continuously, not just at boot so don't warn about any issues just yet
|
||||
status_flags.condition_system_sensors_initialized = Commander::preflightCheck(&mavlink_log_pub, true, true, true, true,
|
||||
checkAirspeed, (status.rc_input_mode == vehicle_status_s::RC_IN_MODE_DEFAULT),
|
||||
!can_arm_without_gps, false);
|
||||
!can_arm_without_gps, /*checkDynamic */ false, /* reportFailures */ false);
|
||||
set_tune_override(TONE_STARTUP_TUNE); //normal boot tune
|
||||
}
|
||||
|
||||
@@ -1759,11 +1759,11 @@ int commander_thread_main(int argc, char *argv[])
|
||||
if (is_hil_setup(autostart_id)) {
|
||||
/* HIL configuration: check only RC input */
|
||||
(void)Commander::preflightCheck(&mavlink_log_pub, false, false, false, false, false,
|
||||
(status.rc_input_mode == vehicle_status_s::RC_IN_MODE_DEFAULT), false, true);
|
||||
(status.rc_input_mode == vehicle_status_s::RC_IN_MODE_DEFAULT), /* checkGNSS */ false, /* checkDynamic */ true, /* reportFailures */ false);
|
||||
} else {
|
||||
/* check sensors also */
|
||||
(void)Commander::preflightCheck(&mavlink_log_pub, true, true, true, true, chAirspeed,
|
||||
(status.rc_input_mode == vehicle_status_s::RC_IN_MODE_DEFAULT), !can_arm_without_gps, hotplug_timeout);
|
||||
(status.rc_input_mode == vehicle_status_s::RC_IN_MODE_DEFAULT), !can_arm_without_gps, /* checkDynamic */ true, hotplug_timeout);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3811,7 +3811,7 @@ void *commander_low_prio_loop(void *arg)
|
||||
}
|
||||
|
||||
status_flags.condition_system_sensors_initialized = Commander::preflightCheck(&mavlink_log_pub, true, true, true, true, checkAirspeed,
|
||||
!(status.rc_input_mode >= vehicle_status_s::RC_IN_MODE_OFF), !can_arm_without_gps, hotplug_timeout);
|
||||
!(status.rc_input_mode >= vehicle_status_s::RC_IN_MODE_OFF), !can_arm_without_gps, /* checkDynamic */ true, hotplug_timeout);
|
||||
|
||||
arming_state_transition(&status,
|
||||
&battery,
|
||||
|
||||
Reference in New Issue
Block a user