Rev 1634 | Rev 1821 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1634 | Rev 1775 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | #include <avr/io.h> |
52 | #include <avr/io.h> |
53 | #include <avr/interrupt.h> |
53 | #include <avr/interrupt.h> |
54 | #include "eeprom.h" |
54 | #include "eeprom.h" |
55 | #include "analog.h" |
55 | #include "analog.h" |
Line -... | Line 56... | ||
- | 56 | ||
- | 57 | // for degugging! |
|
- | 58 | #include "rc.h" |
|
56 | 59 | ||
57 | #ifdef USE_MK3MAG |
60 | #ifdef USE_MK3MAG |
58 | #include "mk3mag.h" |
61 | #include "mk3mag.h" |
Line 59... | Line 62... | ||
59 | #endif |
62 | #endif |
Line 138... | Line 141... | ||
138 | #endif |
141 | #endif |
Line 139... | Line 142... | ||
139 | 142 | ||
140 | if(!cnt--) { // every 10th run (9.765kHz/10 = 976Hz) |
143 | if(!cnt--) { // every 10th run (9.765kHz/10 = 976Hz) |
141 | cnt = 9; |
144 | cnt = 9; |
- | 145 | cnt_1ms^=1; |
|
142 | cnt_1ms^=1; |
146 | if(!cnt_1ms) { |
- | 147 | 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) |
148 | } |
144 | CountMilliseconds++; // increment millisecond counter |
149 | CountMilliseconds++; // increment millisecond counter |
Line 145... | Line 150... | ||
145 | } |
150 | } |
146 | 151 |