From 8d53fa0bd666ec7f7d0552c28dd7773906bf40a6 Mon Sep 17 00:00:00 2001 From: Silvan Date: Tue, 25 Aug 2026 14:44:24 +0200 Subject: [PATCH] fix(ice_controller): zero-initialize the published engine status Only four fields of internal_combustion_engine_status are assigned before publishing, so the remaining ones carried indeterminate stack contents. The topic is forwarded to the ground station as MAVLink EFI_STATUS, which therefore reported garbage engine speed, temperatures, pressures and fuel figures on setups without a DroneCAN ECU filling them in. Assisted-by: Claude:claude-opus-5[1m] Signed-off-by: Silvan --- .../InternalCombustionEngineControl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.cpp b/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.cpp index 95287e061ff..280530070a8 100644 --- a/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.cpp +++ b/src/modules/internal_combustion_engine_control/InternalCombustionEngineControl.cpp @@ -302,7 +302,7 @@ void InternalCombustionEngineControl::publishControl(const hrt_abstime now) ice_control.user_request = static_cast(_user_request); _internal_combustion_engine_control_pub.publish(ice_control); - internal_combustion_engine_status_s ice_status; + internal_combustion_engine_status_s ice_status{}; ice_status.state = static_cast(_state); ice_status.substate = static_cast(_sub_state); ice_status.timestamp = now;