146,9 → 146,13 |
tmp /= 2; |
tmp = tmp * tmp; |
// tmp += (newValue >= 0) ? newValue : -newValue; |
/* |
if (controlActivity + (uint16_t)tmp >= controlActivity) |
controlActivity += tmp; |
else controlActivity = 0xffff; |
*/ |
if (controlActivity + (uint16_t)tmp < 32768) |
controlActivity += tmp; |
} |
|
#define CADAMPING 10 |
184,7 → 188,7 |
updateControlAndMeasureControlActivity(CONTROL_YAW, RC_PRTY[CONTROL_YAW] + EC_PRTY[CONTROL_YAW]); |
dampenControlActivity(); |
|
//debugOut.analog[14] = controlActivity/10; |
debugOut.analog[17] = controlActivity/10; |
|
tempThrottle = HC_getThrottle(RC_PRTY[CONTROL_THROTTLE] + EC_PRTY[CONTROL_THROTTLE]); |
controls[CONTROL_THROTTLE] = AC_getThrottle(tempThrottle); |