Rev 2019 | Rev 2045 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2019 | Rev 2039 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | #include "controlMixer.h" |
53 | #include "controlMixer.h" |
54 | #include "rc.h" |
54 | #include "rc.h" |
55 | #include "heightControl.h" |
55 | #include "heightControl.h" |
56 | #include "attitudeControl.h" |
56 | #include "attitudeControl.h" |
57 | #include "externalControl.h" |
57 | #include "externalControl.h" |
- | 58 | #include "naviControl.h" |
|
58 | #include "configuration.h" |
59 | #include "configuration.h" |
59 | #include "attitude.h" |
60 | #include "attitude.h" |
60 | #include "commands.h" |
61 | #include "commands.h" |
61 | #include "output.h" |
62 | #include "output.h" |
Line 165... | Line 166... | ||
165 | } |
166 | } |
Line 166... | Line 167... | ||
166 | 167 | ||
167 | /* |
168 | /* |
168 | * Update the variables indicating stick position from the sum of R/C, GPS and external control. |
169 | * Update the variables indicating stick position from the sum of R/C, GPS and external control. |
169 | */ |
170 | */ |
170 | void controlMixer_update(void) { |
171 | void controlMixer_periodicTask(void) { |
171 | // calculate Stick inputs by rc channels (P) and changing of rc channels (D) |
172 | // calculate Stick inputs by rc channels (P) and changing of rc channels (D) |
172 | // TODO: If no signal --> zero. |
173 | // TODO: If no signal --> zero. |
Line 173... | Line 174... | ||
173 | int16_t tempThrottle; |
174 | int16_t tempThrottle; |
174 | 175 | ||
Line 175... | Line 176... | ||
175 | // takes almost no time... |
176 | // takes almost no time... |
176 | RC_update(); |
177 | RC_periodicTask(); |
Line 177... | Line 178... | ||
177 | 178 | ||
178 | // takes almost no time... |
179 | // takes almost no time... |
Line 179... | Line 180... | ||
179 | EC_update(); |
180 | EC_periodicTask(); |
180 | 181 | ||
Line -... | Line 182... | ||
- | 182 | // takes about 80 usec. |
|
- | 183 | HC_periodicTask(); |
|
- | 184 | ||
- | 185 | int16_t* RC_PRTY = RC_getPRTY(); |
|
181 | // takes about 80 usec. |
186 | int16_t* EC_PRTY = EC_getPRTY(); |
182 | HC_update(); |
187 | |
183 | 188 | int16_t naviSticks[] = {RC_PRTY[CONTROL_PITCH] + EC_PRTY[CONTROL_PITCH], RC_PRTY[CONTROL_ROLL] + EC_PRTY[CONTROL_ROLL]}; |
|
184 | int16_t* RC_PRTY = RC_getPRTY(); |
189 | |
Line 185... | Line 190... | ||
185 | int16_t* EC_PRTY = EC_getPRTY(); |
190 | navigation_periodicTask(&naviSticks); |