Coptre: disable esc calibration for TradHeli
This commit is contained in:
parent
1af383253f
commit
0f174053d6
@ -20,6 +20,7 @@ enum ESCCalibrationModes {
|
|||||||
// check if we should enter esc calibration mode
|
// check if we should enter esc calibration mode
|
||||||
void Copter::esc_calibration_startup_check()
|
void Copter::esc_calibration_startup_check()
|
||||||
{
|
{
|
||||||
|
#if FRAME_CONFIG != HELI_FRAME
|
||||||
// exit immediately if pre-arm rc checks fail
|
// exit immediately if pre-arm rc checks fail
|
||||||
pre_arm_rc_checks();
|
pre_arm_rc_checks();
|
||||||
if (!ap.pre_arm_rc_check) {
|
if (!ap.pre_arm_rc_check) {
|
||||||
@ -70,11 +71,13 @@ void Copter::esc_calibration_startup_check()
|
|||||||
if (g.esc_calibrate != ESCCAL_DISABLED) {
|
if (g.esc_calibrate != ESCCAL_DISABLED) {
|
||||||
g.esc_calibrate.set_and_save(ESCCAL_NONE);
|
g.esc_calibrate.set_and_save(ESCCAL_NONE);
|
||||||
}
|
}
|
||||||
|
#endif // FRAME_CONFIG != HELI_FRAME
|
||||||
}
|
}
|
||||||
|
|
||||||
// esc_calibration_passthrough - pass through pilot throttle to escs
|
// esc_calibration_passthrough - pass through pilot throttle to escs
|
||||||
void Copter::esc_calibration_passthrough()
|
void Copter::esc_calibration_passthrough()
|
||||||
{
|
{
|
||||||
|
#if FRAME_CONFIG != HELI_FRAME
|
||||||
// clear esc flag for next time
|
// clear esc flag for next time
|
||||||
g.esc_calibrate.set_and_save(ESCCAL_NONE);
|
g.esc_calibrate.set_and_save(ESCCAL_NONE);
|
||||||
|
|
||||||
@ -99,11 +102,13 @@ void Copter::esc_calibration_passthrough()
|
|||||||
// pass through to motors
|
// pass through to motors
|
||||||
motors.throttle_pass_through(channel_throttle->radio_in);
|
motors.throttle_pass_through(channel_throttle->radio_in);
|
||||||
}
|
}
|
||||||
|
#endif // FRAME_CONFIG != HELI_FRAME
|
||||||
}
|
}
|
||||||
|
|
||||||
// esc_calibration_auto - calibrate the ESCs automatically using a timer and no pilot input
|
// esc_calibration_auto - calibrate the ESCs automatically using a timer and no pilot input
|
||||||
void Copter::esc_calibration_auto()
|
void Copter::esc_calibration_auto()
|
||||||
{
|
{
|
||||||
|
#if FRAME_CONFIG != HELI_FRAME
|
||||||
bool printed_msg = false;
|
bool printed_msg = false;
|
||||||
|
|
||||||
// reduce update rate to motors to 50Hz
|
// reduce update rate to motors to 50Hz
|
||||||
@ -143,4 +148,5 @@ void Copter::esc_calibration_auto()
|
|||||||
|
|
||||||
// block until we restart
|
// block until we restart
|
||||||
while(1) { delay(5); }
|
while(1) { delay(5); }
|
||||||
|
#endif // FRAME_CONFIG != HELI_FRAME
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user