|
|
|
@ -111,6 +111,10 @@ void ActuatorEffectivenessTiltrotorVTOL::updateSetpoint(const matrix::Vector<flo
@@ -111,6 +111,10 @@ void ActuatorEffectivenessTiltrotorVTOL::updateSetpoint(const matrix::Vector<flo
|
|
|
|
|
if (_actuator_controls_1_sub.copy(&actuator_controls_1)) { |
|
|
|
|
float control_tilt = actuator_controls_1.control[4] * 2.f - 1.f; |
|
|
|
|
|
|
|
|
|
// set control_tilt to exactly -1 or 1 if close to these end points
|
|
|
|
|
control_tilt = control_tilt < -0.99f ? -1.f : control_tilt; |
|
|
|
|
control_tilt = control_tilt > 0.99f ? 1.f : control_tilt; |
|
|
|
|
|
|
|
|
|
// initialize _last_tilt_control
|
|
|
|
|
if (!PX4_ISFINITE(_last_tilt_control)) { |
|
|
|
|
_last_tilt_control = control_tilt; |
|
|
|
|