diff --git a/firmware/controllers/system/efi_gpio.cpp b/firmware/controllers/system/efi_gpio.cpp index 012c86f8a3..b63ddd35ac 100644 --- a/firmware/controllers/system/efi_gpio.cpp +++ b/firmware/controllers/system/efi_gpio.cpp @@ -63,15 +63,17 @@ RegisteredOutputPin::RegisteredOutputPin(const char *name, short pinOffset, } void RegisteredOutputPin::unregister() { +#if EFI_PROD_CODE brain_pin_e curPin = *(brain_pin_e *) ((void *) (&((char*)&activeConfiguration)[pinOffset])); brain_pin_e newPin = *(brain_pin_e *) ((void *) (&((char*) engineConfiguration)[pinOffset])); - pin_output_mode_e curMode = *(pin_output_mode_e *) ((void *) (&((char*)&activeConfiguration)[pinOffset])); - pin_output_mode_e newMode = *(pin_output_mode_e *) ((void *) (&((char*) engineConfiguration)[pinOffset])); + pin_output_mode_e curMode = *(pin_output_mode_e *) ((void *) (&((char*)&activeConfiguration)[pinModeOffset])); + pin_output_mode_e newMode = *(pin_output_mode_e *) ((void *) (&((char*) engineConfiguration)[pinModeOffset])); if (curPin != newPin || curMode != newMode) { unregisterOutput(curPin); } +#endif // EFI_PROD_CODE } EnginePins::EnginePins() :