Rev 2048 | Rev 2055 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2048 | Rev 2052 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | #include "controlMixer.h" |
54 | #include "controlMixer.h" |
55 | #include "flight.h" |
55 | #include "flight.h" |
56 | #include "eeprom.h" |
56 | #include "eeprom.h" |
57 | #include "attitude.h" |
57 | #include "attitude.h" |
58 | #include "output.h" |
58 | #include "output.h" |
- | 59 | #include "rc.h" |
|
Line -... | Line 60... | ||
- | 60 | ||
- | 61 | #ifdef USE_MK3MAG |
|
59 | 62 | // TODO: Kick that all outa here! |
|
- | 63 | uint8_t compassCalState = 0; |
|
Line 60... | Line 64... | ||
60 | uint8_t compassCalState = 0; |
64 | #endif |
61 | 65 | ||
62 | void commands_handleCommands(void) { |
66 | void commands_handleCommands(void) { |
63 | /* |
67 | /* |
Line 86... | Line 90... | ||
86 | analog_calibrateGyros(); |
90 | analog_calibrateGyros(); |
87 | attitude_setNeutral(); |
91 | attitude_setNeutral(); |
88 | flight_setNeutral(); |
92 | flight_setNeutral(); |
89 | controlMixer_setNeutral(); |
93 | controlMixer_setNeutral(); |
90 | beepNumber(getActiveParamSet()); |
94 | beepNumber(getActiveParamSet()); |
- | 95 | } |
|
- | 96 | #ifdef USE_MK3MAG |
|
91 | } else if (staticParams.bitConfig & (CFG_COMPASS_ACTIVE | CFG_GPS_ACTIVE) && argument == 7) { |
97 | else if (staticParams.bitConfig & (CFG_COMPASS_ENABLED | CFG_GPS_ENABLED) && argument == 7) { |
92 | // If right stick is centered and down |
98 | // If right stick is centered and down |
93 | compassCalState = 1; |
99 | compassCalState = 1; |
94 | beep(1000); |
100 | beep(1000); |
95 | } |
101 | } |
- | 102 | #endif |
|
96 | } |
103 | } |
Line 97... | Line 104... | ||
97 | 104 | ||
98 | // save the ACC neutral setting to eeprom |
105 | // save the ACC neutral setting to eeprom |
99 | else { |
106 | else { |
Line 133... | Line 140... | ||
133 | beep(1000); |
140 | beep(1000); |
134 | } |
141 | } |
135 | * |
142 | * |
136 | */ |
143 | */ |
Line -... | Line 144... | ||
- | 144 | ||
137 | 145 | #ifdef USE_MK3MAG |
|
138 | uint8_t commands_isCalibratingCompass(void) { |
146 | uint8_t commands_isCalibratingCompass(void) { |
139 | return RC_testCompassCalState(); |
147 | return RC_testCompassCalState(); |
- | 148 | } |