Rev 2099 | Rev 2104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2099 | Rev 2102 | ||
---|---|---|---|
Line 135... | Line 135... | ||
135 | commands_handleCommands(); |
135 | commands_handleCommands(); |
136 | flight_control(); |
136 | flight_control(); |
137 | J4LOW; |
137 | J4LOW; |
Line 138... | Line 138... | ||
138 | 138 | ||
139 | // Allow Serial Data Transmit if motors must not updated or motors are not running |
139 | // Allow Serial Data Transmit if motors must not updated or motors are not running |
140 | if (!runFlightControl || !(MKFlags & MKFLAG_MOTOR_RUN)) { |
140 | if (!runFlightControl || !isMotorRunning) { |
141 | usart0_transmitTxData(); |
141 | usart0_transmitTxData(); |
Line 142... | Line 142... | ||
142 | } |
142 | } |
Line 167... | Line 167... | ||
167 | // I.e. the SPI_TransmitByte() is called at a rate of 9.765 kHz/4= 2441.25 Hz, |
167 | // I.e. the SPI_TransmitByte() is called at a rate of 9.765 kHz/4= 2441.25 Hz, |
168 | // and therefore the time of transmission of a complete spi-packet (32 bytes) is 32*4/9.765 kHz = 13.1 ms. |
168 | // and therefore the time of transmission of a complete spi-packet (32 bytes) is 32*4/9.765 kHz = 13.1 ms. |
169 | SPI_TransmitByte(); |
169 | SPI_TransmitByte(); |
170 | } |
170 | } |
171 | #endif |
171 | #endif |
- | 172 | calculateFeaturedServoValues(); |
|
Line 172... | Line 173... | ||
172 | 173 | ||
173 | if (runFlightControl) { // Time for the next iteration was up before the current finished. Signal error. |
174 | if (runFlightControl) { // Time for the next iteration was up before the current finished. Signal error. |
174 | debugOut.digital[1] |= DEBUG_MAINLOOP_TIMER; |
175 | debugOut.digital[1] |= DEBUG_MAINLOOP_TIMER; |
175 | } else { |
176 | } else { |