drivers/tone_alarm and tune_control small improvements/cleanup

- drivers/tone_alarm: move to ModuleBase and purge CDev (/dev/tone_alarm0)
 - drivers/tone_alarm: only run on tune_control publication (or scheduled note) rather than continuously
 - drivers/tone_alarm: use HRT to schedule tone stop (prevents potential disruption)
 - msg/tune_control: add tune_id numbering
 - systemcmds/tune_control: add "error" special case tune_id
 - move all tune_control publication to new uORB::PublicationQueued<>
 - start tone_alarm immediately after board defaults are loaded to fix potential startup issues
 - for SITL (or other boards with no TONE output) print common messages (startup, error, etc)
This commit is contained in:
Daniel Agar
2020-10-05 21:39:26 -04:00
committed by GitHub
parent c7072b61a3
commit 08bf71b73d
39 changed files with 429 additions and 577 deletions
+6 -9
View File
@@ -77,8 +77,7 @@ then
if ! mkblctrl $MKBLCTRL_ARG
then
# Error tune.
tune_control play -t 2
tune_control play error
fi
fi
@@ -86,8 +85,7 @@ then
then
if ! pwm_out_sim start -m $OUTPUT_MODE
then
# Error tune.
tune_control play -t 2
tune_control play error
fi
fi
@@ -96,8 +94,7 @@ then
if ! $OUTPUT_CMD mode_$FMU_MODE
then
echo "$OUTPUT_CMD start failed" >> $LOG_FILE
# Error tune.
tune_control play -t 2
tune_control play error
fi
fi
@@ -176,7 +173,7 @@ then
else
echo "ERROR [init] Failed loading mixer: ${MIXER_FILE}"
echo "ERROR [init] Failed loading mixer: ${MIXER_FILE}" >> $LOG_FILE
tune_control play -t 20
tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR
fi
else
@@ -184,7 +181,7 @@ else
then
echo "ERROR [init] Mixer undefined"
echo "ERROR [init] Mixer undefined" >> $LOG_FILE
tune_control play -t 20
tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR
fi
fi
@@ -234,7 +231,7 @@ then
fi
else
echo "ERROR: Could not start: pwm_out mode_pwm" >> $LOG_FILE
tune_control play -t 20
tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR
set PWM_AUX_OUT none
set FAILSAFE_AUX none
fi