From 79437bbf379ac0eb0fb80f4a54e47f7280cd6c7d Mon Sep 17 00:00:00 2001 From: Neil McKechnie Date: Sat, 14 Jan 2023 17:10:45 +0000 Subject: [PATCH] Update MotorDriver.cpp Remove unnecessary and undesirable interrupt disable/enable when writing to HAL driver. --- MotorDriver.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/MotorDriver.cpp b/MotorDriver.cpp index c41420a..e87755b 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -144,16 +144,12 @@ bool MotorDriver::isPWMCapable() { void MotorDriver::setPower(POWERMODE mode) { bool on=mode==POWERMODE::ON; if (on) { - noInterrupts(); IODevice::write(powerPin,invertPower ? LOW : HIGH); - interrupts(); if (isProgTrack) DCCWaveform::progTrack.clearResets(); } else { - noInterrupts(); IODevice::write(powerPin,invertPower ? HIGH : LOW); - interrupts(); } powerMode=mode; }