aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorJohan Jansen <jnsn.johan@gmail.com>2015-03-08 14:50:35 +0100
committerLorenz Meier <lm@inf.ethz.ch>2015-04-20 09:14:12 +0200
commitc5a178a777c29f72e8d6ec6e9fc0623515aa4773 (patch)
treec5c17235803e61ce6668ebe3baf51a9f680b3d1c /src/modules
parent6f338eb1b205a124dab28b61a99b65e9950eb6a8 (diff)
downloadpx4-firmware-c5a178a777c29f72e8d6ec6e9fc0623515aa4773.tar.gz
px4-firmware-c5a178a777c29f72e8d6ec6e9fc0623515aa4773.tar.bz2
px4-firmware-c5a178a777c29f72e8d6ec6e9fc0623515aa4773.zip
Commander: Play startup tune if preflight checks are good, play alarm otherwise
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/commander/commander.cpp7
1 files changed, 7 insertions, 0 deletions
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;