mirror of https://github.com/ArduPilot/ardupilot
Copter: do no compass stick gesture detection while armed
This commit is contained in:
parent
09a11429e1
commit
7207035c34
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue