diff options
-rw-r--r-- | src/drivers/stm32/tone_alarm/tone_alarm.cpp | 5 | ||||
-rw-r--r-- | src/modules/commander/commander.cpp | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/drivers/stm32/tone_alarm/tone_alarm.cpp b/src/drivers/stm32/tone_alarm/tone_alarm.cpp index 8b6847348..a18b54981 100644 --- a/src/drivers/stm32/tone_alarm/tone_alarm.cpp +++ b/src/drivers/stm32/tone_alarm/tone_alarm.cpp @@ -890,8 +890,9 @@ tone_alarm_main(int argc, char *argv[]) if (argc > 1) { const char *argv1 = argv[1]; - if (!strcmp(argv1, "start")) - play_tune(TONE_STARTUP_TUNE); + if (!strcmp(argv1, "start")) { + play_tune(TONE_STOP_TUNE); + } if (!strcmp(argv1, "stop")) play_tune(TONE_STOP_TUNE); diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index de2355e04..bf17a7b31 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1124,6 +1124,13 @@ int commander_thread_main(int argc, char *argv[]) //Run preflight check status.condition_system_sensors_initialized = Commander::preflightCheck(mavlink_fd, true, true, true, true, true); + if(!status.condition_system_sensors_initialized) { + set_tune_override(TONE_GPS_WARNING_TUNE); //sensor fail tune + } + else { + set_tune_override(TONE_STARTUP_TUNE); //normal boot tune + } + const hrt_abstime commander_boot_timestamp = hrt_absolute_time(); transition_result_t arming_ret; |