|
|
|
@ -107,12 +107,14 @@ void Copter::init_optflow()
@@ -107,12 +107,14 @@ void Copter::init_optflow()
|
|
|
|
|
|
|
|
|
|
void Copter::compass_cal_update() |
|
|
|
|
{ |
|
|
|
|
static uint32_t compass_cal_stick_gesture_begin = 0; |
|
|
|
|
compass.cal_update(); |
|
|
|
|
|
|
|
|
|
if (!hal.util->get_soft_armed()) { |
|
|
|
|
compass.compass_cal_update(); |
|
|
|
|
if (hal.util->get_soft_armed()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static uint32_t compass_cal_stick_gesture_begin = 0; |
|
|
|
|
|
|
|
|
|
if (compass.is_calibrating()) { |
|
|
|
|
if (channel_yaw->get_control_in() < -4000 && channel_throttle->get_control_in() > 900) { |
|
|
|
|
compass.cancel_calibration_all(); |
|
|
|
|