50,6 → 50,9 |
EC_setNeutral(); |
HC_setGround(); |
FC_setNeutral(); // FC is FailsafeControl, not FlightCtrl. |
|
// This is to set the home pos in navi. |
// MKFlags |= MKFLAG_CALIBRATE; |
} |
|
/* |
146,20 → 149,27 |
// This will init the values (not just add to them). |
RC_periodicTaskAndPRTY(tempPRTY); |
|
debugOut.analog[16] = tempPRTY[CONTROL_PITCH]; |
debugOut.analog[17] = tempPRTY[CONTROL_ROLL]; |
|
// Add external control to RC |
EC_periodicTaskAndPRTY(tempPRTY); |
|
#ifdef USE_DIRECT_GPS |
// Add navigations control to RC and external control. |
navigation_periodicTaskAndPRTY(tempPRTY); |
if (staticParams.bitConfig & (CFG_COMPASS_ENABLED)) |
navigation_periodicTaskAndPRTY(tempPRTY); |
#endif |
|
debugOut.analog[18] = tempPRTY[CONTROL_PITCH]; |
debugOut.analog[19] = tempPRTY[CONTROL_ROLL]; |
|
// Add compass control (could also have been before navi, they are independent) |
CC_periodicTaskAndPRTY(tempPRTY); |
|
FC_periodicTaskAndPRTY(tempPRTY); |
|
if (!MKFlags & MKFLAG_EMERGENCY_FLIGHT) { |
// This is temporary. There might be some emergency height control also. |
if (!(MKFlags & MKFLAG_EMERGENCY_FLIGHT)) { |
// Add height control (could also have been before navi and/or compass, they are independent) |
HC_periodicTaskAndPRTY(tempPRTY); |
|
167,6 → 177,9 |
AC_getPRTY(tempPRTY); |
} |
|
debugOut.analog[20] = tempPRTY[CONTROL_PITCH]; |
debugOut.analog[21] = tempPRTY[CONTROL_ROLL]; |
|
// Commit results to global variable and also measure control activity. |
controls[CONTROL_THROTTLE] = tempPRTY[CONTROL_THROTTLE]; |
updateControlAndMeasureControlActivity(CONTROL_PITCH, tempPRTY[CONTROL_PITCH]); |