Tone Alarm Driver
The tone alarm driver can play QBasic PLAY / ANSI music strings and drives a piezo buzzer depending on the frequency of the note.
The default tunes are stored in the tone_alarm driver file, but any tune can be played with a simple console command:
Note that in order to be recognised, a sequence passed to the tone_alarm command must begin with 'M'. ANSI music files typically also contain escape sequences at the beginning and end of the file that need to be removed before playing (as otherwise they tend to confuse the player).
The default meaning of the different tunes is:
|0||STOP||Stops the current tune|
|1||BOOT||'PX4 startup sound'. Is auto-played by the tone alarm driver on system startup|
|2||BATT_LOW||The battery is low, but not fully empty. Running on reserve.|
|3||BATT_EMPTY||The battery is completely flat, the system is not able to maintain safe flight.|
|4||CMD_ACK||The last command has been accepted|
|5||CMD_REJ||The last command has been rejected|
|6||POS_LOCK||The position estimator obtained a valid position (emitted once on first lock)|
|7||ARMING||Emitted on the transition to armed|
|8||DISARMING||Emitted on the transition to disarmed|
|9||EMERGENCY||General, potentially fatal error. NOT due to battery. Land immediately.|
Creating new Alarm Tunes
- Download Dosbox and install the app
- Create a new directory in your home directory, e.g.
dosprogs, and unzip Melody Master to it
- Mount the directory in dos with
mount c ~/dosprogs
- Start Melody Master with:
c: cd melody21 start