1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

[all] Issue #627 fixed

This commit is contained in:
Bertrand Songis 2014-02-02 09:40:04 +01:00
parent 72022a0e32
commit 0f1c14549e
2 changed files with 5 additions and 3 deletions

View file

@ -870,7 +870,7 @@ void audioEvent(uint8_t e, uint16_t f)
break; break;
// timer == 0 // timer == 0
case AU_TIMER_00: case AU_TIMER_00:
audioQueue.play(BEEP_DEFAULT_FREQ+150, 240, 20, PLAY_NOW); audioQueue.play(BEEP_DEFAULT_FREQ+150, 300, 20, PLAY_NOW);
break; break;
// timer <= 10 seconds left // timer <= 10 seconds left
case AU_TIMER_LT10: case AU_TIMER_LT10:

View file

@ -3989,7 +3989,10 @@ void doMixerCalculations()
switch(timerState->state) switch(timerState->state)
{ {
case TMR_RUNNING: case TMR_RUNNING:
if (tv && newTimerVal>=(int16_t)tv) timerState->state = TMR_NEGATIVE; if (tv && newTimerVal>=(int16_t)tv) {
AUDIO_TIMER_00(g_model.timers[i].countdownBeep);
timerState->state = TMR_NEGATIVE;
}
break; break;
case TMR_NEGATIVE: case TMR_NEGATIVE:
if (newTimerVal >= (int16_t)tv + MAX_ALERT_TIME) timerState->state = TMR_STOPPED; if (newTimerVal >= (int16_t)tv + MAX_ALERT_TIME) timerState->state = TMR_STOPPED;
@ -4004,7 +4007,6 @@ void doMixerCalculations()
if (g_model.timers[i].countdownBeep && g_model.timers[i].start) { if (g_model.timers[i].countdownBeep && g_model.timers[i].start) {
if (newTimerVal==30) AUDIO_TIMER_30(); if (newTimerVal==30) AUDIO_TIMER_30();
if (newTimerVal==20) AUDIO_TIMER_20(); if (newTimerVal==20) AUDIO_TIMER_20();
if (newTimerVal==00) AUDIO_TIMER_00(g_model.timers[i].countdownBeep);
if (newTimerVal<=10) AUDIO_TIMER_LT10(g_model.timers[i].countdownBeep, newTimerVal); if (newTimerVal<=10) AUDIO_TIMER_LT10(g_model.timers[i].countdownBeep, newTimerVal);
} }
if (g_model.timers[i].minuteBeep && (newTimerVal % 60)==0) { if (g_model.timers[i].minuteBeep && (newTimerVal % 60)==0) {