mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 00:05:17 +03:00
Now logical switches automatic prompts
This commit is contained in:
parent
5dbf2063f8
commit
095bb38c03
3 changed files with 28 additions and 12 deletions
|
@ -318,10 +318,12 @@ bool isAudioFileReferenced(uint32_t i, char * filename)
|
|||
return false;
|
||||
}
|
||||
|
||||
tmr10ms_t timeAutomaticPromptsSilence = 0;
|
||||
|
||||
void playModelEvent(uint8_t category, uint8_t index, uint8_t event)
|
||||
{
|
||||
char filename[AUDIO_FILENAME_MAXLEN+1];
|
||||
if (isAudioFileReferenced((category << 24) + (index << 16) + event, filename)) {
|
||||
if ((get_tmr10ms()-timeAutomaticPromptsSilence > 10) && isAudioFileReferenced((category << 24) + (index << 16) + event, filename)) {
|
||||
audioQueue.playFile(filename);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue