143,6 → 143,7 |
// calculate Stick inputs by rc channels (P) and changing of rc channels (D) |
// TODO: If no signal --> zero. |
uint8_t axis; |
int16_t tempThrottle; |
|
// takes almost no time... |
RC_update(); |
158,9 → 159,10 |
|
control[PITCH] = RC_PRTY[CONTROL_PITCH] + EC_PRTY[CONTROL_PITCH]; |
control[ROLL] = RC_PRTY[CONTROL_ROLL] + EC_PRTY[CONTROL_ROLL]; |
// This can be a CPU time killer if the function implementations are inefficient. |
controlThrottle = AC_getThrottle(HC_getThrottle(RC_PRTY[CONTROL_THROTTLE] |
+ EC_PRTY[CONTROL_THROTTLE])); |
|
tempThrottle = HC_getThrottle(RC_PRTY[CONTROL_THROTTLE] + EC_PRTY[CONTROL_THROTTLE]); |
controlThrottle = AC_getThrottle(tempThrottle); |
|
controlYaw = RC_PRTY[CONTROL_YAW] + EC_PRTY[CONTROL_YAW]; |
|
DebugOut.Analog[12] = control[PITCH]; |
218,6 → 220,7 |
lastCommand = COMMAND_NONE; |
} |
|
/* |
if (isCommandRepeated) |
DebugOut.Digital[0] |= DEBUG_COMMANDREPEATED; |
else |
226,8 → 229,7 |
DebugOut.Digital[1] |= DEBUG_COMMANDREPEATED; |
else |
DebugOut.Digital[1] &= ~DEBUG_COMMANDREPEATED; |
|
// part1 end. |
*/ |
} |
|
// TODO: Integrate into command system. |