"Franck code" bug

This commit is contained in:
bernet.andre@gmail.com
2012-08-13 08:35:03 +00:00
parent 8c5dd2b0d9
commit 961fa24faa
+2
View File
@@ -484,6 +484,8 @@ int16_t applyLimits(uint8_t channel, int32_t value)
if (value) value =
(value > 0) ? value * ((int32_t) lim_p - ofs) / 100000 :
-value * ((int32_t) lim_n - ofs) / 100000; //div by 100000 -> output = -1024..1024
#else
value /= 100;
#endif
value += calc1000toRESX(ofs);