mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
Update MotorDriver.cpp
Replace duplicate call to EXRAIL with single in overload.
This commit is contained in:
parent
1ac104704e
commit
ab393047c1
|
@ -576,8 +576,6 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) {
|
||||||
DIAG(F("TRACK %c FAULT PIN detected after %4M. Pause %4M)"), trackno + 'A', mslpc, power_sample_overload_wait);
|
DIAG(F("TRACK %c FAULT PIN detected after %4M. Pause %4M)"), trackno + 'A', mslpc, power_sample_overload_wait);
|
||||||
throttleInrush(false);
|
throttleInrush(false);
|
||||||
setPower(POWERMODE::OVERLOAD);
|
setPower(POWERMODE::OVERLOAD);
|
||||||
DIAG(F("Calling EXRAIL"));
|
|
||||||
RMFT2::powerEvent(trackno, true); // Tell EXRAIL we have an overload
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (checkCurrent(useProgLimit)) {
|
if (checkCurrent(useProgLimit)) {
|
||||||
|
@ -595,8 +593,6 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) {
|
||||||
trackno + 'A', mA, maxmA, mslpc, power_sample_overload_wait);
|
trackno + 'A', mA, maxmA, mslpc, power_sample_overload_wait);
|
||||||
throttleInrush(false);
|
throttleInrush(false);
|
||||||
setPower(POWERMODE::OVERLOAD);
|
setPower(POWERMODE::OVERLOAD);
|
||||||
DIAG(F("Calling EXRAIL"));
|
|
||||||
RMFT2::powerEvent(trackno, true); // Tell EXRAIL we have an overload
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// all well
|
// all well
|
||||||
|
@ -619,7 +615,9 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) {
|
||||||
// adjust next wait time
|
// adjust next wait time
|
||||||
power_sample_overload_wait *= 2;
|
power_sample_overload_wait *= 2;
|
||||||
if (power_sample_overload_wait > POWER_SAMPLE_RETRY_MAX)
|
if (power_sample_overload_wait > POWER_SAMPLE_RETRY_MAX)
|
||||||
power_sample_overload_wait = POWER_SAMPLE_RETRY_MAX;
|
power_sample_overload_wait = POWER_SAMPLE_RETRY_MAX;
|
||||||
|
DIAG(F("Calling EXRAIL"));
|
||||||
|
RMFT2::powerEvent(trackno, true); // Tell EXRAIL we have an overload
|
||||||
// power on test
|
// power on test
|
||||||
DIAG(F("TRACK %c POWER RESTORE (after %4M)"), trackno + 'A', mslpc);
|
DIAG(F("TRACK %c POWER RESTORE (after %4M)"), trackno + 'A', mslpc);
|
||||||
setPower(POWERMODE::ALERT);
|
setPower(POWERMODE::ALERT);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user