From 980956496b05554d3ad28286512e36adc02eb136 Mon Sep 17 00:00:00 2001 From: MarkieMark <66629254+Mf-ff99@users.noreply.github.com> Date: Mon, 1 Dec 2025 10:46:51 -0500 Subject: [PATCH] ICE Control Module: Added option for VTOL state (FW/Transition to FW) to start engine (#25948) * ICE Control Module: Added option to use VTOL transition state to trigger ICE on/off states Signed-off-by: Mf-ff99 * ran make format Signed-off-by: Mf-ff99 * Update src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.cpp to initialize vtol_vehicle_status_s correctly Initialize appropriately Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> * ICE Module: adjusted VTOL logic to use vehicle_status Signed-off-by: Mf-ff99 --------- Signed-off-by: Mf-ff99 Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> --- .../InternalCombustionEngineControl.cpp | 6 ++++++ .../InternalCombustionEngineControl.hpp | 1 + src/modules/internal_combustion_engine_control/module.yaml | 1 + 3 files changed, 8 insertions(+) diff --git a/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.cpp b/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.cpp index f6d575943e..0320870e08 100644 --- a/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.cpp +++ b/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.cpp @@ -134,6 +134,12 @@ void InternalCombustionEngineControl::Run() } } break; + + case ICESource::VtolStatus: { + _user_request = (vehicle_status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING + || vehicle_status.in_transition_to_fw) ? UserOnOffRequest::On : UserOnOffRequest::Off; + } + break; } switch (_state) { diff --git a/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.hpp b/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.hpp index ad9feafec6..4b1cfedeb3 100644 --- a/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.hpp +++ b/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.hpp @@ -108,6 +108,7 @@ private: ArmingState, Aux1, Aux2, + VtolStatus, }; hrt_abstime _state_start_time{0}; diff --git a/src/modules/internal_combustion_engine_control/module.yaml b/src/modules/internal_combustion_engine_control/module.yaml index e0e9a69c57..4e3ca311cd 100644 --- a/src/modules/internal_combustion_engine_control/module.yaml +++ b/src/modules/internal_combustion_engine_control/module.yaml @@ -19,6 +19,7 @@ parameters: 0: On arming - disarming 1: Aux1 2: Aux2 + 3: On Vtol Transitions ICE_CHOKE_ST_DUR: description: