From 6c18226cb592f3244cc314d2a7d4ae280c4d2475 Mon Sep 17 00:00:00 2001 From: Asbelos Date: Fri, 10 Nov 2023 23:46:17 +0000 Subject: [PATCH] Fix non-exrail crash --- MotorDriver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MotorDriver.cpp b/MotorDriver.cpp index 61e229f..af322b8 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -676,8 +676,10 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) { power_sample_overload_wait *= 2; if (power_sample_overload_wait > POWER_SAMPLE_RETRY_MAX) power_sample_overload_wait = POWER_SAMPLE_RETRY_MAX; + #ifdef EXRAIL_ACTIVE DIAG(F("Calling EXRAIL")); RMFT2::powerEvent(trackno, true); // Tell EXRAIL we have an overload + #endif // power on test DIAG(F("TRACK %c POWER RESTORE (after %4M)"), trackno + 'A', mslpc); setPower(POWERMODE::ALERT);