1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-20 14:55:13 +03:00

Some more refactoring in audio / haptic

This commit is contained in:
bsongis 2012-05-04 10:20:59 +00:00
parent 82dbdb523b
commit 2eeedf6c55
11 changed files with 229 additions and 179 deletions

View file

@ -83,7 +83,7 @@ void hapticQueue::play(uint8_t tLen, uint8_t tPause, uint8_t tFlags)
{
tLen = getHapticLength(tLen);
if (tFlags & PLAY_NOW || (!busy() && empty())) {
if ((tFlags & PLAY_NOW) || (!busy() && empty())) {
buzzTimeLeft = tLen;
buzzPause = tPause;
t_queueWidx = t_queueRidx;
@ -115,8 +115,9 @@ void hapticQueue::event(uint8_t e)
play(15, 3, PLAY_NOW);
else if (e < AU_FRSKY_FIRST)
play(15, 3, (e-AU_TIMER_10)|PLAY_NOW);
else if (e >= AU_FRSKY_LAST)
else if (e >= AU_FRSKY_LAST && empty()) {
play(15, 3, e-AU_FRSKY_LAST);
}
}
}