1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00

set lastPowerChange we doing the power on retry after overload

This commit is contained in:
Harald Barth 2023-06-19 08:43:50 +02:00
parent 6dd175f63b
commit 1888073dc2
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
#define GITHUB_SHA "devel-202306182233Z"
#define GITHUB_SHA "devel-202306190642Z"

View File

@ -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;