mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 02:23:34 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user