Rev 1868 | Rev 1872 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1868 | Rev 1869 | ||
---|---|---|---|
Line 154... | Line 154... | ||
154 | HC_update(); |
154 | HC_update(); |
Line 155... | Line 155... | ||
155 | 155 | ||
156 | int16_t* RC_PRTY = RC_getPRTY(); |
156 | int16_t* RC_PRTY = RC_getPRTY(); |
Line 157... | Line -... | ||
157 | int16_t* EC_PRTY = EC_getPRTY(); |
- | |
158 | - | ||
159 | DebugOut.Analog[20] = RC_PRTY[CONTROL_THROTTLE]; |
157 | int16_t* EC_PRTY = EC_getPRTY(); |
160 | 158 | ||
161 | control[PITCH] = RC_PRTY[CONTROL_PITCH] + EC_PRTY[CONTROL_PITCH]; |
159 | control[PITCH] = RC_PRTY[CONTROL_PITCH] + EC_PRTY[CONTROL_PITCH]; |
162 | control[ROLL] = RC_PRTY[CONTROL_ROLL] + EC_PRTY[CONTROL_ROLL]; |
160 | control[ROLL] = RC_PRTY[CONTROL_ROLL] + EC_PRTY[CONTROL_ROLL]; |
163 | // This can be a CPU time killer if the function implementations are inefficient. |
161 | // This can be a CPU time killer if the function implementations are inefficient. |
164 | controlThrottle = AC_getThrottle(HC_getThrottle(RC_PRTY[CONTROL_THROTTLE] |
162 | controlThrottle = AC_getThrottle(HC_getThrottle(RC_PRTY[CONTROL_THROTTLE] |
Line 165... | Line 163... | ||
165 | + EC_PRTY[CONTROL_THROTTLE])); |
163 | + EC_PRTY[CONTROL_THROTTLE])); |
166 | controlYaw = RC_PRTY[CONTROL_YAW] + EC_PRTY[CONTROL_YAW]; |
164 | controlYaw = RC_PRTY[CONTROL_YAW] + EC_PRTY[CONTROL_YAW]; |
167 | - | ||
Line 168... | Line 165... | ||
168 | DebugOut.Analog[12] = control[PITCH]; |
165 | |
169 | DebugOut.Analog[13] = control[ROLL]; |
166 | DebugOut.Analog[12] = control[PITCH]; |
170 | //DebugOut.Analog[26] = controlYaw; |
167 | DebugOut.Analog[13] = control[ROLL]; |
171 | 168 | ||
Line 179... | Line 176... | ||
179 | looping = 0; |
176 | looping = 0; |
180 | } |
177 | } |
Line 181... | Line 178... | ||
181 | 178 | ||
Line 182... | Line 179... | ||
182 | // part1a end. |
179 | // part1a end. |
183 | 180 | ||
184 | /* This is not really necessary with the dead-gap feature on all sticks (see rc.c) |
181 | /* This is not really necessary with the dead-band feature on all sticks (see rc.c) |
185 | if(staticParams.GlobalConfig & (CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE)) { |
182 | if(staticParams.GlobalConfig & (CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE)) { |
186 | if (controlYaw > 2) controlYaw-= 2; |
183 | if (controlYaw > 2) controlYaw-= 2; |
187 | else if (controlYaw< -2) controlYaw += 2; |
184 | else if (controlYaw< -2) controlYaw += 2; |