From 217e6218bf82b7cb674cbc4ee30c10ab36176c47 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 21 Aug 2022 00:45:39 -0400 Subject: [PATCH] AddressSanitizer does not like "yeah, not really refactoring"? --- firmware/controllers/actuators/idle_thread_io.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/firmware/controllers/actuators/idle_thread_io.cpp b/firmware/controllers/actuators/idle_thread_io.cpp index 817452a840..b04e686722 100644 --- a/firmware/controllers/actuators/idle_thread_io.cpp +++ b/firmware/controllers/actuators/idle_thread_io.cpp @@ -211,9 +211,7 @@ void startIdleThread() { // Force the idle controller to use 0 offset, as this is handled by the open loop table instead. engineConfiguration->idleRpmPid.offset = 0; - IdleController *controller = &engine->module().unmock(); - - controller->init(); + engine->module().unmock().init(); #if ! EFI_UNIT_TEST // todo: we still have to explicitly init all hardware on start in addition to handling configuration change via @@ -221,9 +219,9 @@ void startIdleThread() { initIdleHardware(); #endif /* EFI_UNIT_TEST */ - controller->idleState = INIT; - controller->baseIdlePosition = -100.0f; - controller->currentIdlePosition = -100.0f; + engine->module().unmock().idleState = INIT; + engine->module().unmock().baseIdlePosition = -100.0f; + engine->module().unmock().currentIdlePosition = -100.0f; #if ! EFI_UNIT_TEST