mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 22:23:33 +08:00
tailsitter, tiltrotor:
- use the transition trust when waiting for TECS to kick in after transition
This commit is contained in:
@@ -292,8 +292,6 @@ void Tiltrotor::update_transition_state()
|
||||
{
|
||||
if (!_flag_was_in_trans_mode) {
|
||||
// save desired heading for transition and last thrust value
|
||||
_yaw_transition = _v_att->yaw;
|
||||
_throttle_transition = _actuators_mc_in->control[actuator_controls_s::INDEX_THROTTLE];
|
||||
_flag_was_in_trans_mode = true;
|
||||
}
|
||||
|
||||
@@ -326,6 +324,8 @@ void Tiltrotor::update_transition_state()
|
||||
_mc_yaw_weight = 0.0f;
|
||||
}
|
||||
|
||||
_thrust_transition = _mc_virtual_att_sp->thrust;
|
||||
|
||||
} else if (_vtol_schedule.flight_mode == TRANSITION_FRONT_P2) {
|
||||
// the plane is ready to go into fixed wing mode, tilt the rotors forward completely
|
||||
_tilt_control = _params_tiltrotor.tilt_transition +
|
||||
@@ -333,6 +333,8 @@ void Tiltrotor::update_transition_state()
|
||||
&_vtol_schedule.transition_start) / (_params_tiltrotor.front_trans_dur_p2 * 1000000.0f);
|
||||
_mc_roll_weight = 0.0f;
|
||||
|
||||
_thrust_transition = _mc_virtual_att_sp->thrust;
|
||||
|
||||
} else if (_vtol_schedule.flight_mode == TRANSITION_BACK) {
|
||||
if (_rear_motors != IDLE) {
|
||||
set_rear_motor_state(IDLE);
|
||||
@@ -364,6 +366,12 @@ void Tiltrotor::update_transition_state()
|
||||
memcpy(_v_att_sp, _mc_virtual_att_sp, sizeof(vehicle_attitude_setpoint_s));
|
||||
}
|
||||
|
||||
void Tiltrotor::waiting_on_tecs()
|
||||
{
|
||||
// keep multicopter thrust until we get data from TECS
|
||||
_v_att_sp->thrust = _thrust_transition;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write data to actuator output topic.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user