1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 08:45:24 +03:00

Inverse switch values starting timers now as well as normal values

This commit is contained in:
maxim.karban@gmail.com 2012-04-13 13:40:59 +00:00
parent 304a7018d3
commit ec5363abbc

View file

@ -1867,7 +1867,7 @@ void perMain()
}
else {
if (atm<(TMR_VAROFS+MAX_SWITCH))
sw_toggled[i] = getSwitch((tm>0 ? tm-(TMR_VAROFS-1) : tm+(TMR_VAROFS-1)), 0); // normal switch
sw_toggled[i] = tm>0 ? getSwitch(tm-(TMR_VAROFS-1), 0) : !getSwitch(-tm, 0); // normal switch
if (sw_toggled[i])
s_timerVal[i]++;
}