mc_rate_control: don't publish thrust + torque sp if vtol

This commit is contained in:
Beat Küng 2021-11-29 13:52:51 +01:00 committed by Daniel Agar
parent 28e995ede2
commit a81f11acdd
1 changed files with 4 additions and 2 deletions

View File

@ -256,8 +256,10 @@ MulticopterRateControl::Run()
actuators.control[actuator_controls_s::INDEX_LANDING_GEAR] = _landing_gear;
actuators.timestamp_sample = angular_velocity.timestamp_sample;
publishTorqueSetpoint(att_control, angular_velocity.timestamp_sample);
publishThrustSetpoint(angular_velocity.timestamp_sample);
if (!_vehicle_status.is_vtol) {
publishTorqueSetpoint(att_control, angular_velocity.timestamp_sample);
publishThrustSetpoint(angular_velocity.timestamp_sample);
}
// scale effort by battery status if enabled
if (_param_mc_bat_scale_en.get()) {