|
|
|
@ -87,6 +87,8 @@ const ToneAlarm_PX4::Tone ToneAlarm_PX4::_tones[] {
@@ -87,6 +87,8 @@ const ToneAlarm_PX4::Tone ToneAlarm_PX4::_tones[] {
|
|
|
|
|
{ "MFT100L10DBDB>", false}, |
|
|
|
|
#define AP_NOTIFY_PX4_TONE_TUNING_ERROR 25 |
|
|
|
|
{ "MFT100L10>BBBBBBBB", false}, |
|
|
|
|
#define AP_NOTIFY_PX4_TONE_LEAK_DETECTED 26 |
|
|
|
|
{ "MBT255L8>A+AA-", true}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
bool ToneAlarm_PX4::init() |
|
|
|
@ -275,7 +277,9 @@ void ToneAlarm_PX4::update()
@@ -275,7 +277,9 @@ void ToneAlarm_PX4::update()
|
|
|
|
|
}else{ |
|
|
|
|
// disarming tune
|
|
|
|
|
play_tone(AP_NOTIFY_PX4_TONE_QUIET_NEU_FEEDBACK); |
|
|
|
|
stop_cont_tone(); |
|
|
|
|
if (!flags.leak_detected) { |
|
|
|
|
stop_cont_tone(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -317,6 +321,15 @@ void ToneAlarm_PX4::update()
@@ -317,6 +321,15 @@ void ToneAlarm_PX4::update()
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (flags.leak_detected != AP_Notify::flags.leak_detected) { |
|
|
|
|
flags.leak_detected = AP_Notify::flags.leak_detected; |
|
|
|
|
if (flags.leak_detected) { |
|
|
|
|
play_tone(AP_NOTIFY_PX4_TONE_LEAK_DETECTED); |
|
|
|
|
} else { |
|
|
|
|
stop_cont_tone(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (AP_Notify::events.tune_started) { |
|
|
|
|
play_tone(AP_NOTIFY_PX4_TONE_TUNING_START); |
|
|
|
|
AP_Notify::events.tune_started = 0;
|
|
|
|
|