Browse Source

suppress preflight check failure for HIL autostart_ids

sbg
Mark Whitehorn 10 years ago
parent
commit
e9634fbe47
  1. 8
      src/modules/commander/commander.cpp

8
src/modules/commander/commander.cpp

@ -1134,6 +1134,8 @@ int commander_thread_main(int argc, char *argv[]) @@ -1134,6 +1134,8 @@ int commander_thread_main(int argc, char *argv[])
}
// Run preflight check
param_get(_param_autostart_id, &autostart_id);
if (autostart_id > 1999) {
status.condition_system_sensors_initialized = Commander::preflightCheck(mavlink_fd, true, true, true, true, checkAirspeed, !status.rc_input_mode, !status.circuit_breaker_engaged_gpsfailure_check);
if (!status.condition_system_sensors_initialized) {
set_tune_override(TONE_GPS_WARNING_TUNE); //sensor fail tune
@ -1141,6 +1143,12 @@ int commander_thread_main(int argc, char *argv[]) @@ -1141,6 +1143,12 @@ int commander_thread_main(int argc, char *argv[])
else {
set_tune_override(TONE_STARTUP_TUNE); //normal boot tune
}
} else {
// HIL configuration selected: real sensors will be disabled
warnx("autostart_id: %d", autostart_id);
status.condition_system_sensors_initialized = false;
set_tune_override(TONE_STARTUP_TUNE); //normal boot tune
}
const hrt_abstime commander_boot_timestamp = hrt_absolute_time();

Loading…
Cancel
Save