diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 63844626c3..5d842539f2 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -324,13 +324,13 @@ void Engine::updateSwitchInputs() { acController.acSwitchLastChangeTimeMs = US2MS(getTimeNowUs()); } } - engine->clutchUpState = getClutchUpState(); + engine->engineState.clutchUpState = getClutchUpState(); if (isBrainPinValid(engineConfiguration->throttlePedalUpPin)) { engine->module().unmock().throttlePedalUpState = efiReadPin(engineConfiguration->throttlePedalUpPin); } - engine->brakePedalState = getBrakePedalState(); + engine->engineState.brakePedalState = getBrakePedalState(); #endif // EFI_GPIO_HARDWARE } diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index 0663eef23a..219a0090cb 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -356,9 +356,6 @@ public: void updateSwitchInputs(); void updateTriggerWaveform(); - bool clutchUpState = false; - bool brakePedalState = false; - bool isRunningPwmTest = false; /** diff --git a/firmware/controllers/lua/lua_hooks.cpp b/firmware/controllers/lua/lua_hooks.cpp index 8133c9e90a..2fbd58dc19 100644 --- a/firmware/controllers/lua/lua_hooks.cpp +++ b/firmware/controllers/lua/lua_hooks.cpp @@ -286,8 +286,8 @@ static int lua_getDigital(lua_State* l) { switch (idx) { case 0: state = engine->engineState.clutchDownState; break; - case 1: state = engine->clutchUpState; break; - case 2: state = engine->brakePedalState; break; + case 1: state = engine->engineState.clutchUpState; break; + case 2: state = engine->engineState.brakePedalState; break; case 3: state = engine->module().unmock().acButtonState; break; default: // Return nil to indicate invalid parameter diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index ed91897188..d820692f7c 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -129,7 +129,7 @@ void printConfiguration(const engine_configuration_s *engineConfiguration) { boolToString(engineConfiguration->isCylinderCleanupEnabled)); efiPrintf("clutchUp@%s: %s", hwPortname(engineConfiguration->clutchUpPin), - boolToString(engine->clutchUpState)); + boolToString(engine->engineState.clutchUpState)); efiPrintf("clutchDown@%s: %s", hwPortname(engineConfiguration->clutchDownPin), boolToString(engine->engineState.clutchDownState));