Rev 2102 | Rev 2104 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2102 | Rev 2103 | ||
---|---|---|---|
Line 105... | Line 105... | ||
105 | * Update variables. |
105 | * Update variables. |
106 | * Decode commands but do not execute them. |
106 | * Decode commands but do not execute them. |
107 | */ |
107 | */ |
Line 108... | Line 108... | ||
108 | 108 | ||
109 | void controlMixer_periodicTask(void) { |
109 | void controlMixer_periodicTask(void) { |
Line 110... | Line 110... | ||
110 | int16_t tempPRTY[4] = { 0, 0, 0, 0 }; |
110 | int16_t tempPRYT[4] = { 0, 0, 0, 0 }; |
111 | 111 | ||
Line 112... | Line 112... | ||
112 | // Decode commands. |
112 | // Decode commands. |
Line 137... | Line 137... | ||
137 | isCommandRepeated = 0; |
137 | isCommandRepeated = 0; |
138 | lastCommand = COMMAND_NONE; |
138 | lastCommand = COMMAND_NONE; |
139 | } |
139 | } |
Line 140... | Line 140... | ||
140 | 140 | ||
141 | // This will init the values (not just add to them). |
141 | // This will init the values (not just add to them). |
Line 142... | Line 142... | ||
142 | RC_periodicTaskAndPRTY(tempPRTY); |
142 | RC_periodicTaskAndPRYT(tempPRYT); |
143 | 143 | ||
Line 144... | Line 144... | ||
144 | // Add external control to RC |
144 | // Add external control to RC |
Line 145... | Line 145... | ||
145 | EC_periodicTaskAndPRTY(tempPRTY); |
145 | EC_periodicTaskAndPRYT(tempPRYT); |
146 | 146 | ||
147 | FC_periodicTaskAndPRTY(tempPRTY); |
147 | FC_periodicTaskAndPRYT(tempPRYT); |
148 | 148 | ||
149 | // Commit results to global variable and also measure control activity. |
149 | // Commit results to global variable and also measure control activity. |
150 | controls[CONTROL_THROTTLE] = tempPRTY[CONTROL_THROTTLE]; |
150 | controls[CONTROL_THROTTLE] = tempPRYT[CONTROL_THROTTLE]; |
Line 151... | Line 151... | ||
151 | controls[CONTROL_ELEVATOR] = tempPRTY[CONTROL_ELEVATOR]; |
151 | controls[CONTROL_ELEVATOR] = tempPRYT[CONTROL_ELEVATOR]; |
152 | controls[CONTROL_AILERONS] = tempPRTY[CONTROL_AILERONS]; |
152 | controls[CONTROL_AILERONS] = tempPRYT[CONTROL_AILERONS]; |
153 | controls[CONTROL_RUDDER] = tempPRTY[CONTROL_RUDDER]; |
153 | controls[CONTROL_RUDDER] = tempPRYT[CONTROL_RUDDER]; |