13,34 → 13,24 |
#endif |
|
void commands_handleCommands(void) { |
/* |
* Get the current command (start/stop motors, calibrate), if any. |
*/ |
uint8_t command = controlMixer_getCommand(); |
uint8_t repeated = controlMixer_isCommandRepeated(); |
uint8_t argument = controlMixer_getArgument(); |
/* |
* Get the current command (start/stop motors, calibrate), if any. |
*/ |
uint8_t command = controlMixer_getCommand(); |
uint8_t repeated = controlMixer_isCommandRepeated(); |
uint8_t argument = controlMixer_getArgument(); |
|
if (!(MKFlags & MKFLAG_MOTOR_RUN)) { |
if (command == COMMAND_GYROCAL && !repeated) { |
// Gyro calinbration, with or without selecting a new parameter-set. |
paramSet_readFromEEProm(1); |
analog_calibrateGyros(); |
attitude_setNeutral(); |
controlMixer_setNeutral(); |
beepNumber(1); |
} |
|
// save the ACC neutral setting to eeprom |
/* |
else { |
if (command == COMMAND_ACCCAL && !repeated) { |
// Run gyro and acc. meter calibration but do not repeat it. |
analog_calibrateAcc(); |
attitude_setNeutral(); |
controlMixer_setNeutral(); |
beepNumber(getActiveParamSet()); |
} |
} |
*/ |
} // end !MOTOR_RUN condition. |
// TODO! Mode change gadget of some kind. |
if (!isMotorRunning) { |
if (command == COMMAND_GYROCAL && !repeated) { |
// Gyro calinbration, with or without selecting a new parameter-set. |
paramSet_readFromEEProm(1); |
analog_calibrateGyros(); |
attitude_setNeutral(); |
controlMixer_setNeutral(); |
beepNumber(1); |
} else if (command == COMMAND_CHMOD && !repeated) { |
configuration_setFlightParameters(argument); |
} |
} // end !MOTOR_RUN condition. |
} |