Rev 2136 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2136 | Rev 2173 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | #include "output.h" |
9 | #include "output.h" |
Line 10... | Line 10... | ||
10 | 10 | ||
11 | // The channel array is 0-based! |
11 | // The channel array is 0-based! |
12 | volatile int16_t PPM_in[MAX_CHANNELS]; |
12 | volatile int16_t PPM_in[MAX_CHANNELS]; |
13 | volatile uint16_t RC_buffer[MAX_CHANNELS]; |
13 | volatile uint16_t RC_buffer[MAX_CHANNELS]; |
Line 14... | Line 14... | ||
14 | volatile uint8_t inBfrPnt = 0; |
14 | volatile uint8_t inBfrPnt; |
Line 15... | Line 15... | ||
15 | 15 | ||
16 | volatile uint8_t RCQuality; |
16 | volatile uint8_t RCQuality; |
Line 17... | Line 17... | ||
17 | 17 | ||
Line 18... | Line 18... | ||
18 | uint8_t lastRCCommand = COMMAND_NONE; |
18 | uint8_t lastRCCommand; |
19 | uint8_t lastFlightMode = FLIGHT_MODE_NONE; |
19 | uint8_t lastFlightMode; |
Line 70... | Line 70... | ||
70 | // Enable Input Capture Interrupt (bit: ICIE1=1) |
70 | // Enable Input Capture Interrupt (bit: ICIE1=1) |
71 | // Disable Output Compare A & B Match Interrupts (bit: OCIE1B=0, OICIE1A=0) |
71 | // Disable Output Compare A & B Match Interrupts (bit: OCIE1B=0, OICIE1A=0) |
72 | // Enable Overflow Interrupt (bit: TOIE1=0) |
72 | // Enable Overflow Interrupt (bit: TOIE1=0) |
73 | TIMSK1 &= ~((1<<OCIE1B) | (1<<OCIE1A) | (1<<TOIE1)); |
73 | TIMSK1 &= ~((1<<OCIE1B) | (1<<OCIE1A) | (1<<TOIE1)); |
74 | TIMSK1 |= (1<<ICIE1); |
74 | TIMSK1 |= (1<<ICIE1); |
75 | - | ||
76 | RCQuality = 0; |
75 | RCQuality = 0; |
77 | - | ||
78 | SREG = sreg; |
76 | SREG = sreg; |
79 | } |
77 | } |
Line 80... | Line 78... | ||
80 | 78 | ||
81 | /* |
79 | /* |