Rev 2099 | Rev 2106 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2099 | Rev 2102 | ||
---|---|---|---|
Line 11... | Line 11... | ||
11 | // TODO: Kick that all outa here! |
11 | // TODO: Kick that all outa here! |
12 | uint8_t compassCalState = 0; |
12 | uint8_t compassCalState = 0; |
13 | #endif |
13 | #endif |
Line 14... | Line 14... | ||
14 | 14 | ||
15 | void commands_handleCommands(void) { |
15 | void commands_handleCommands(void) { |
16 | /* |
16 | /* |
17 | * Get the current command (start/stop motors, calibrate), if any. |
17 | * Get the current command (start/stop motors, calibrate), if any. |
18 | */ |
18 | */ |
19 | uint8_t command = controlMixer_getCommand(); |
19 | uint8_t command = controlMixer_getCommand(); |
20 | uint8_t repeated = controlMixer_isCommandRepeated(); |
20 | uint8_t repeated = controlMixer_isCommandRepeated(); |
Line -... | Line 21... | ||
- | 21 | uint8_t argument = controlMixer_getArgument(); |
|
21 | uint8_t argument = controlMixer_getArgument(); |
22 | |
22 | 23 | // TODO! Mode change gadget of some kind. |
|
23 | if (!(MKFlags & MKFLAG_MOTOR_RUN)) { |
24 | if (!isMotorRunning) { |
24 | if (command == COMMAND_GYROCAL && !repeated) { |
25 | if (command == COMMAND_GYROCAL && !repeated) { |
25 | // Gyro calinbration, with or without selecting a new parameter-set. |
26 | // Gyro calinbration, with or without selecting a new parameter-set. |
26 | paramSet_readFromEEProm(1); |
27 | paramSet_readFromEEProm(1); |
27 | analog_calibrateGyros(); |
28 | analog_calibrateGyros(); |
28 | attitude_setNeutral(); |
29 | attitude_setNeutral(); |
29 | controlMixer_setNeutral(); |
- | |
30 | beepNumber(1); |
- | |
31 | } |
- | |
32 | - | ||
33 | // save the ACC neutral setting to eeprom |
- | |
34 | /* |
30 | controlMixer_setNeutral(); |
35 | else { |
- | |
36 | if (command == COMMAND_ACCCAL && !repeated) { |
- | |
37 | // Run gyro and acc. meter calibration but do not repeat it. |
- | |
38 | analog_calibrateAcc(); |
- | |
39 | attitude_setNeutral(); |
31 | beepNumber(1); |
40 | controlMixer_setNeutral(); |
- | |
41 | beepNumber(getActiveParamSet()); |
32 | } else if (command == COMMAND_CHMOD && !repeated) { |
42 | } |
- | |
43 | } |
33 | configuration_setFlightParameters(argument); |
44 | */ |
34 | } |