Refactor quadchute logic (#20704)

* moved computation of _time_since_trans_start into base class

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* refactor quadchute logic
- move entired logic into VtolType class
- split into smaller functions

Signed-off-by: RomanBapst <bapstroman@gmail.com>

* Update src/modules/vtol_att_control/vtol_type.h

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Roman Bapst
2022-12-08 11:56:20 +03:00
committed by GitHub
co-authored by Silvan Fuhrer
parent 2b1d8c1d8e
commit cfb670fbb3
10 changed files with 336 additions and 237 deletions
@@ -225,6 +225,10 @@ VtolAttitudeControl::quadchute(QuadchuteReason reason)
events::send(events::ID("vtol_att_ctrl_quadchute_max_roll"), events::Log::Critical,
"Quadchute triggered, due to maximum roll angle exceeded");
break;
case QuadchuteReason::None:
// should never get in here
return;
}
_vtol_vehicle_status.vtol_transition_failsafe = true;