diff --git a/firmware/controllers/system/efi_gpio.cpp b/firmware/controllers/system/efi_gpio.cpp index bae96ba29a..4c7493f317 100644 --- a/firmware/controllers/system/efi_gpio.cpp +++ b/firmware/controllers/system/efi_gpio.cpp @@ -534,10 +534,17 @@ void OutputPin::setValue(int logicValue, bool isForce) { setValue(nullptr, logicValue, isForce); } +#if EFI_SIMULATOR +void OutputPin::resetToggleStats() { + durationsInStateMs[0] = durationsInStateMs[1] = 0; + pinToggleCounter = 0; +} +#endif // EFI_SIMULATOR + extern bool qcDirectPinControlMode; void OutputPin::setValue(const char *msg, int logicValue, bool isForce) { - if (qcDirectPinControlMode && !isForce) { + if ((qcDirectPinControlMode || this->exclusivePinControlMode) && !isForce) { return; } diff --git a/firmware/controllers/system/efi_output.h b/firmware/controllers/system/efi_output.h index ffd69b6973..9125c6dc90 100644 --- a/firmware/controllers/system/efi_output.h +++ b/firmware/controllers/system/efi_output.h @@ -72,10 +72,14 @@ public: #if EFI_SIMULATOR Timer pinToggleTimer; uint32_t durationsInStateMs[2]; + + void resetToggleStats(); #endif brain_pin_e brainPin = Gpio::Unassigned; + bool exclusivePinControlMode = false; + #if (EFI_GPIO_HARDWARE && (BOARD_EXT_GPIOCHIPS > 0)) /* used for external pins */ bool ext = false;