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

Overflow in copySticksToOffset on 9x

This commit is contained in:
bsongis 2014-06-22 00:15:23 +02:00
parent cfd6d47dfb
commit 83532f84cd

View file

@ -3104,7 +3104,7 @@ void copySticksToOffset(uint8_t ch)
#if defined(CPUARM)
zero = (zero*256000 - val*lim) / (1024*256-val);
#else
zero = (zero*256000 - 10*val*lim) / (1024*256-val);
zero = (zero*25600 - val*lim) / (26214-val);
#endif
ld->offset = (ld->revert ? -zero : zero);
resumeMixerCalculations();