Rev 1077 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1077 | Rev 1078 | ||
---|---|---|---|
Line 99... | Line 99... | ||
99 | PORTB = 0x00; |
99 | PORTB = 0x00; |
100 | for(timer = 0; timer < 1000; timer++); // make some delay |
100 | for(timer = 0; timer < 1000; timer++); // make some delay |
101 | if(PINB & (1<<PINB0)) |
101 | if(PINB & (1<<PINB0)) |
102 | { |
102 | { |
103 | if(PINB & (1<<PINB1)) BoardRelease = 13; |
103 | if(PINB & (1<<PINB1)) BoardRelease = 13; |
- | 104 | else BoardRelease = 11; // 12 is the same hardware |
|
- | 105 | } |
|
- | 106 | else |
|
- | 107 | { |
|
- | 108 | if(PINB & (1<<PINB1)) BoardRelease = 20; // |
|
104 | else BoardRelease = 11; |
109 | else BoardRelease = 10; |
105 | } |
110 | } |
106 | else BoardRelease = 10; |
- | |
Line 107... | Line 111... | ||
107 | 111 | ||
108 | // set LED ports as output |
112 | // set LED ports as output |
109 | DDRB |= (1<<DDB1)|(1<<DDB0); |
113 | DDRB |= (1<<DDB1)|(1<<DDB0); |
110 | RED_ON; |
114 | RED_ON; |
Line 147... | Line 151... | ||
147 | #endif |
151 | #endif |
148 | #ifdef USE_MK3MAG |
152 | #ifdef USE_MK3MAG |
149 | MK3MAG_Init(); |
153 | MK3MAG_Init(); |
150 | #endif |
154 | #endif |
Line 151... | Line -... | ||
151 | - | ||
152 | 155 | ||
153 | // enable interrupts global |
156 | // enable interrupts global |
Line 154... | Line -... | ||
154 | sei(); |
- | |
155 | - | ||
156 | VersionInfo.Major = VERSION_MAJOR; |
- | |
157 | VersionInfo.Minor = VERSION_MINOR; |
- | |
158 | VersionInfo.PCCompatible = VERSION_COMPATIBLE; |
- | |
159 | VersionInfo.Hardware = 1; // Flight Control |
157 | sei(); |
160 | 158 | ||
161 | printf("\n\rFlightControl\n\rHardware:%d.%d\n\rSoftware:V%d.%d%c ",BoardRelease/10,BoardRelease%10, VERSION_MAJOR, VERSION_MINOR,VERSION_INDEX + 'a'); |
159 | printf("\n\rFlightControl\n\rHardware:%d.%d\n\rSoftware:V%d.%d%c ",BoardRelease/10,BoardRelease%10, VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH + 'a'); |
Line 162... | Line 160... | ||
162 | printf("\n\r=============================="); |
160 | printf("\n\r=============================="); |
163 | GRN_ON; |
161 | GRN_ON; |
Line 247... | Line 245... | ||
247 | RED_OFF; |
245 | RED_OFF; |
Line 248... | Line 246... | ||
248 | 246 | ||
249 | if(PcAccess) PcAccess--; |
247 | if(PcAccess) PcAccess--; |
250 | else |
248 | else |
251 | { |
- | |
252 | DubWiseKeys[0] = 0; |
- | |
253 | DubWiseKeys[1] = 0; |
249 | { |
254 | ExternControl.Config = 0; |
250 | ExternControl.Config = 0; |
255 | ExternStickNick= 0; |
251 | ExternStickNick= 0; |
256 | ExternStickRoll = 0; |
252 | ExternStickRoll = 0; |
257 | ExternStickYaw = 0; |
253 | ExternStickYaw = 0; |