Fix center stop that was not working when trim was changing from positive to negative (#4024)

This commit is contained in:
3djc
2016-11-15 19:42:11 +01:00
committed by Bertrand Songis
parent d2a4ca1d12
commit 878c1bb80b
+1 -1
View File
@@ -1300,7 +1300,7 @@ uint8_t checkTrim(event_t event)
int16_t after = (k&1) ? before + v : before - v; // positive = k&1
bool beepTrim = false;
if (!thro && ((after < 0) != (before < 0)) && before!=0) { //forcing a stop at centerered trim when changing sides
if (!thro && before!=0 && ((!(after < 0) == (before < 0)) || after==0)) { //forcing a stop at centerered trim when changing sides
after = 0;
beepTrim = true;
AUDIO_TRIM_MIDDLE();