If lightOffCounter running and a beep occurs, the counter is erased with the flash duration

This commit is contained in:
bsongis
2012-05-29 18:55:55 +00:00
parent 15ed275cf4
commit 571b877a8d
3 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ void beep(uint8_t val)
haptic.event(val==0 ? 0 : AU_TIMER_10+beepAgain);
#endif
if(g_eeGeneral.flashBeep && val > 1) g_LightOffCounter = FLASH_DURATION;
if(g_eeGeneral.flashBeep && val > 1 && g_LightOffCounter < FLASH_DURATION) g_LightOffCounter = FLASH_DURATION;
if (g_eeGeneral.beeperMode>0 || (g_eeGeneral.beeperMode==0 && val!=0) || (g_eeGeneral.beeperMode==-1 && val>=3)) {
_beep(pgm_read_byte(beepTab+5*(2+g_eeGeneral.beeperLength)+val));