Plane: quadpalne: keep motors interlock state upto date with E-stop

This commit is contained in:
Iampete1 2022-01-27 15:49:43 +00:00 committed by Randy Mackay
parent 5181003228
commit 1ca1707f9f

View File

@ -697,7 +697,6 @@ bool QuadPlane::setup(void)
motors->init(frame_class, frame_type);
motors->update_throttle_range();
motors->set_update_rate(rc_speed);
motors->set_interlock(true);
attitude_control->parameter_sanity_check();
// setup the trim of any motors used by AP_Motors so I/O board
@ -1664,6 +1663,9 @@ void QuadPlane::update(void)
return;
}
// keep motors interlock state upto date with E-stop
motors->set_interlock(!SRV_Channels::get_emergency_stop());
if ((ahrs_view != NULL) && !is_equal(_last_ahrs_trim_pitch, ahrs_trim_pitch.get())) {
_last_ahrs_trim_pitch = ahrs_trim_pitch.get();
ahrs_view->set_pitch_trim(_last_ahrs_trim_pitch);