mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 07:31:36 +08:00
tailsitter: avoid doing same calculation twice
Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
@@ -227,8 +227,7 @@ void Tailsitter::update_transition_state()
|
|||||||
_mc_yaw_weight = 0.0f;
|
_mc_yaw_weight = 0.0f;
|
||||||
|
|
||||||
// smoothly move control weight to MC
|
// smoothly move control weight to MC
|
||||||
_mc_roll_weight = 1.0f * time_since_trans_start / _params->back_trans_duration;
|
_mc_roll_weight = _mc_pitch_weight = 1.0f * time_since_trans_start / _params->back_trans_duration;
|
||||||
_mc_pitch_weight = 1.0f * time_since_trans_start / _params->back_trans_duration;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user