Skip to content
Snippets Groups Projects
Commit c1ba7ab6 authored by tumbili's avatar tumbili Committed by Roman
Browse files

vtol attitude control: fixed code style


Signed-off-by: default avatartumbili <roman@px4.io>
parent bbf85278
No related branches found
No related tags found
No related merge requests found
......@@ -188,7 +188,7 @@ void Standard::update_vtol_state()
} else if (_vtol_schedule.flight_mode == TRANSITION_TO_FW) {
// continue the transition to fw mode while monitoring airspeed for a final switch to fw mode
if (((_params_standard.airspeed_mode == control_state_s::AIRSPD_MODE_DISABLED ||
_airspeed->indicated_airspeed_m_s >= _params_standard.airspeed_trans) &&
_airspeed->indicated_airspeed_m_s >= _params_standard.airspeed_trans) &&
(float)hrt_elapsed_time(&_vtol_schedule.transition_start)
> (_params_standard.front_trans_time_min * 1000000.0f)) ||
can_transition_on_ground()) {
......@@ -250,11 +250,13 @@ void Standard::update_transition_state()
_mc_yaw_weight = weight;
_mc_throttle_weight = weight;
// time based blending when no airspeed sensor is set
// time based blending when no airspeed sensor is set
} else if (_params_standard.airspeed_mode == control_state_s::AIRSPD_MODE_DISABLED &&
(float)hrt_elapsed_time(&_vtol_schedule.transition_start) < (_params_standard.front_trans_time_min * 1000000.0f)
) {
float weight = 1.0f - (float)(hrt_elapsed_time(&_vtol_schedule.transition_start) / (_params_standard.front_trans_time_min * 1000000.0f));
(float)hrt_elapsed_time(&_vtol_schedule.transition_start) < (_params_standard.front_trans_time_min * 1000000.0f)
) {
float weight = 1.0f - (float)(hrt_elapsed_time(&_vtol_schedule.transition_start) /
(_params_standard.front_trans_time_min * 1000000.0f));
_mc_roll_weight = weight;
_mc_pitch_weight = weight;
_mc_yaw_weight = weight;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment