mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
AP_Notify: added tuning error tones
This commit is contained in:
parent
006aafab3f
commit
26ef71e130
@ -90,6 +90,7 @@ public:
|
||||
uint32_t tune_started : 1; // tuning a parameter has started
|
||||
uint32_t tune_next : 3; // tuning switched to next parameter
|
||||
uint32_t tune_save : 1; // tuning saved parameters
|
||||
uint32_t tune_error : 1; // tuning controller error
|
||||
};
|
||||
|
||||
// the notify flags are static to allow direct class access
|
||||
|
@ -85,6 +85,8 @@ const ToneAlarm_PX4::Tone ToneAlarm_PX4::_tones[] {
|
||||
{ "MFT100L20>C#D#", false},
|
||||
#define AP_NOTIFY_PX4_TONE_TUNING_SAVE 24
|
||||
{ "MFT100L10DBDB>", false},
|
||||
#define AP_NOTIFY_PX4_TONE_TUNING_ERROR 25
|
||||
{ "MFT100L10>BBBBBBBB", false},
|
||||
};
|
||||
|
||||
bool ToneAlarm_PX4::init()
|
||||
@ -328,6 +330,10 @@ void ToneAlarm_PX4::update()
|
||||
play_tone(AP_NOTIFY_PX4_TONE_TUNING_SAVE);
|
||||
AP_Notify::events.tune_save = 0;
|
||||
}
|
||||
if (AP_Notify::events.tune_error) {
|
||||
play_tone(AP_NOTIFY_PX4_TONE_TUNING_ERROR);
|
||||
AP_Notify::events.tune_error = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
|
Loading…
Reference in New Issue
Block a user