Rev 2055 | Rev 2059 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2055 | Rev 2058 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | variables[i] = RC_getVariable(i); |
48 | variables[i] = RC_getVariable(i); |
49 | } |
49 | } |
50 | EC_setNeutral(); |
50 | EC_setNeutral(); |
51 | HC_setGround(); |
51 | HC_setGround(); |
52 | FC_setNeutral(); // FC is FailsafeControl, not FlightCtrl. |
52 | FC_setNeutral(); // FC is FailsafeControl, not FlightCtrl. |
- | 53 | ||
- | 54 | // This is to set the home pos in navi. |
|
- | 55 | // MKFlags |= MKFLAG_CALIBRATE; |
|
53 | } |
56 | } |
Line 54... | Line 57... | ||
54 | 57 | ||
55 | /* |
58 | /* |
56 | * Update potentiometer values with limited slew rate. Could be made faster if desired. |
59 | * Update potentiometer values with limited slew rate. Could be made faster if desired. |
Line 144... | Line 147... | ||
144 | } |
147 | } |
Line 145... | Line 148... | ||
145 | 148 | ||
146 | // This will init the values (not just add to them). |
149 | // This will init the values (not just add to them). |
Line -... | Line 150... | ||
- | 150 | RC_periodicTaskAndPRTY(tempPRTY); |
|
- | 151 | ||
- | 152 | debugOut.analog[16] = tempPRTY[CONTROL_PITCH]; |
|
147 | RC_periodicTaskAndPRTY(tempPRTY); |
153 | debugOut.analog[17] = tempPRTY[CONTROL_ROLL]; |
148 | 154 | ||
Line 149... | Line 155... | ||
149 | // Add external control to RC |
155 | // Add external control to RC |
150 | EC_periodicTaskAndPRTY(tempPRTY); |
156 | EC_periodicTaskAndPRTY(tempPRTY); |
151 | 157 | ||
152 | #ifdef USE_DIRECT_GPS |
158 | #ifdef USE_DIRECT_GPS |
Line -... | Line 159... | ||
- | 159 | if (staticParams.bitConfig & (CFG_COMPASS_ENABLED)) |
|
- | 160 | navigation_periodicTaskAndPRTY(tempPRTY); |
|
- | 161 | #endif |
|
153 | // Add navigations control to RC and external control. |
162 | |
154 | navigation_periodicTaskAndPRTY(tempPRTY); |
163 | debugOut.analog[18] = tempPRTY[CONTROL_PITCH]; |
Line 155... | Line 164... | ||
155 | #endif |
164 | debugOut.analog[19] = tempPRTY[CONTROL_ROLL]; |
Line -... | Line 165... | ||
- | 165 | ||
156 | 166 | // Add compass control (could also have been before navi, they are independent) |
|
157 | // Add compass control (could also have been before navi, they are independent) |
167 | CC_periodicTaskAndPRTY(tempPRTY); |
158 | CC_periodicTaskAndPRTY(tempPRTY); |
168 | |
Line 159... | Line 169... | ||
159 | 169 | FC_periodicTaskAndPRTY(tempPRTY); |
|
160 | FC_periodicTaskAndPRTY(tempPRTY); |
170 | |
161 | 171 | // This is temporary. There might be some emergency height control also. |
|
Line -... | Line 172... | ||
- | 172 | if (!(MKFlags & MKFLAG_EMERGENCY_FLIGHT)) { |
|
- | 173 | // Add height control (could also have been before navi and/or compass, they are independent) |
|
- | 174 | HC_periodicTaskAndPRTY(tempPRTY); |
|
162 | if (!MKFlags & MKFLAG_EMERGENCY_FLIGHT) { |
175 | |
163 | // Add height control (could also have been before navi and/or compass, they are independent) |
176 | // Add attitude control (could also have been before navi and/or compass, they are independent) |
164 | HC_periodicTaskAndPRTY(tempPRTY); |
177 | AC_getPRTY(tempPRTY); |
165 | 178 | } |
|
166 | // Add attitude control (could also have been before navi and/or compass, they are independent) |
179 |