Rev 1612 | Rev 1805 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1612 | Rev 1634 | ||
---|---|---|---|
Line 137... | Line 137... | ||
137 | if(SendSPI) SendSPI--; // if SendSPI is 0, the transmit of a byte via SPI bus to and from The Navicontrol is done |
137 | if(SendSPI) SendSPI--; // if SendSPI is 0, the transmit of a byte via SPI bus to and from The Navicontrol is done |
138 | #endif |
138 | #endif |
Line 139... | Line 139... | ||
139 | 139 | ||
140 | if(!cnt--) { // every 10th run (9.765kHz/10 = 976Hz) |
140 | if(!cnt--) { // every 10th run (9.765kHz/10 = 976Hz) |
141 | cnt = 9; |
141 | cnt = 9; |
142 | cnt_1ms++; |
- | |
143 | cnt_1ms %= 2; |
142 | cnt_1ms^=1; |
144 | if(!cnt_1ms) runFlightControl = 1; // every 2nd run (976.5625 Hz/2 = 488.28125 Hz) |
143 | if(!cnt_1ms) runFlightControl = 1; // every 2nd run (976.5625 Hz/2 = 488.28125 Hz) |
145 | CountMilliseconds++; // increment millisecond counter |
144 | CountMilliseconds++; // increment millisecond counter |
Line 146... | Line 145... | ||
146 | } |
145 | } |