mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-15 07:47:35 +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:
+22
-1
@@ -3,8 +3,29 @@
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
uint8 TUNE_ID_STOP = 0
|
||||
uint8 TUNE_ID_STARTUP = 1
|
||||
uint8 TUNE_ID_ERROR = 2
|
||||
uint8 TUNE_ID_NOTIFY_POSITIVE = 3
|
||||
uint8 TUNE_ID_NOTIFY_NEUTRAL = 4
|
||||
uint8 TUNE_ID_NOTIFY_NEGATIVE = 5
|
||||
uint8 TUNE_ID_ARMING_WARNING = 6
|
||||
uint8 TUNE_ID_BATTERY_WARNING_SLOW = 7
|
||||
uint8 TUNE_ID_BATTERY_WARNING_FAST = 8
|
||||
uint8 TUNE_ID_GPS_WARNING = 9
|
||||
uint8 TUNE_ID_ARMING_FAILURE = 10
|
||||
uint8 TUNE_ID_PARACHUTE_RELEASE = 11
|
||||
uint8 TUNE_ID_SINGLE_BEEP = 12
|
||||
uint8 TUNE_ID_HOME_SET = 13
|
||||
uint8 TUNE_ID_SD_INIT = 14
|
||||
uint8 TUNE_ID_SD_ERROR = 15
|
||||
uint8 TUNE_ID_PROG_PX4IO = 16
|
||||
uint8 TUNE_ID_PROG_PX4IO_OK = 17
|
||||
uint8 TUNE_ID_PROG_PX4IO_ERR = 18
|
||||
uint8 NUMBER_OF_TUNES = 19
|
||||
|
||||
uint8 tune_id # tune_id corresponding to TuneID::* from the tune_defaults.h in the tunes library
|
||||
uint8 tune_override # if set to 1 the tune which is playing will be stopped and the new started
|
||||
bool tune_override # if true the tune which is playing will be stopped and the new started
|
||||
uint16 frequency # in Hz
|
||||
uint32 duration # in us
|
||||
uint32 silence # in us
|
||||
|
||||
Reference in New Issue
Block a user