Rev 1908 | Rev 1960 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1908 | Rev 1955 | ||
---|---|---|---|
Line 146... | Line 146... | ||
146 | if (!cnt--) { // every 10th run (9.765625kHz/10 = 976.5625Hz) |
146 | if (!cnt--) { // every 10th run (9.765625kHz/10 = 976.5625Hz) |
147 | cnt = 9; |
147 | cnt = 9; |
148 | cnt_1ms ^= 1; |
148 | cnt_1ms ^= 1; |
149 | if (!cnt_1ms) { |
149 | if (!cnt_1ms) { |
150 | if (runFlightControl == 1) |
150 | if (runFlightControl == 1) |
151 | DebugOut.Digital[1] |= DEBUG_MAINLOOP_TIMER; |
151 | debugOut.digital[1] |= DEBUG_MAINLOOP_TIMER; |
152 | else |
152 | else |
153 | DebugOut.Digital[1] &= ~DEBUG_MAINLOOP_TIMER; |
153 | debugOut.digital[1] &= ~DEBUG_MAINLOOP_TIMER; |
154 | runFlightControl = 1; // every 2nd run (976.5625 Hz/2 = 488.28125 Hz) |
154 | runFlightControl = 1; // every 2nd run (976.5625 Hz/2 = 488.28125 Hz) |
155 | } |
155 | } |
156 | millisecondsCount++; // increment millisecond counter |
156 | millisecondsCount++; // increment millisecond counter |
157 | } |
157 | } |
Line 215... | Line 215... | ||
215 | uint16_t t_stop; |
215 | uint16_t t_stop; |
216 | t_stop = setDelay(w); |
216 | t_stop = setDelay(w); |
217 | while (!checkDelay(t_stop)) { |
217 | while (!checkDelay(t_stop)) { |
218 | if (analogDataReady) { |
218 | if (analogDataReady) { |
219 | analogDataReady = 0; |
219 | analogDataReady = 0; |
220 | analog_start(); |
220 | startAnalogConversionCycle(); |
221 | } |
221 | } |
222 | } |
222 | } |
223 | } |
223 | } |