Always set RC in mode

This commit is contained in:
Lorenz Meier 2015-10-06 11:48:35 +02:00
parent c2e9f81586
commit c414c7ef63
1 changed files with 2 additions and 2 deletions

View File

@ -1221,13 +1221,13 @@ int commander_thread_main(int argc, char *argv[])
// Run preflight check // Run preflight check
int32_t rc_in_off = 0; int32_t rc_in_off = 0;
param_get(_param_autostart_id, &autostart_id); param_get(_param_autostart_id, &autostart_id);
param_get(_param_rc_in_off, &rc_in_off);
status.rc_input_mode = rc_in_off;
if (is_hil_setup(autostart_id)) { if (is_hil_setup(autostart_id)) {
// HIL configuration selected: real sensors will be disabled // HIL configuration selected: real sensors will be disabled
status.condition_system_sensors_initialized = false; status.condition_system_sensors_initialized = false;
set_tune_override(TONE_STARTUP_TUNE); //normal boot tune set_tune_override(TONE_STARTUP_TUNE); //normal boot tune
} else { } else {
param_get(_param_rc_in_off, &rc_in_off);
status.rc_input_mode = rc_in_off;
status.condition_system_sensors_initialized = Commander::preflightCheck(mavlink_fd, true, true, true, true, status.condition_system_sensors_initialized = Commander::preflightCheck(mavlink_fd, true, true, true, true,
checkAirspeed, (status.rc_input_mode == vehicle_status_s::RC_IN_MODE_DEFAULT), !status.circuit_breaker_engaged_gpsfailure_check); checkAirspeed, (status.rc_input_mode == vehicle_status_s::RC_IN_MODE_DEFAULT), !status.circuit_breaker_engaged_gpsfailure_check);
if (!status.condition_system_sensors_initialized) { if (!status.condition_system_sensors_initialized) {