From 1888073dc230aa18794490c44a94bd1c05620d59 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Mon, 19 Jun 2023 08:43:50 +0200 Subject: [PATCH] set lastPowerChange we doing the power on retry after overload --- GITHUB_SHA.h | 2 +- MotorDriver.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/GITHUB_SHA.h b/GITHUB_SHA.h index 41f732d..8b6faac 100644 --- a/GITHUB_SHA.h +++ b/GITHUB_SHA.h @@ -1 +1 @@ -#define GITHUB_SHA "devel-202306182233Z" +#define GITHUB_SHA "devel-202306190642Z" diff --git a/MotorDriver.cpp b/MotorDriver.cpp index 5ed8684..0eed19a 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -478,6 +478,10 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) { power_sample_overload_wait = POWER_SAMPLE_RETRY_MAX; // power on test setPower(POWERMODE::ON); + // here we change power but not the overloadNow as that was + // already changed to false when we entered POWERMODE::OVERLOAD + // so we need to set the lastPowerChange anyway. + lastPowerChange = micros(); DIAG(F("TRACK %c POWER RESTORE (was off %lus)"), trackno + 'A', power_sample_overload_wait); } break;