diff --git a/MotorDriver.cpp b/MotorDriver.cpp index 160d8ad..444d502 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -501,9 +501,9 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) { case POWERMODE::ALERT: { // set local flags that handle how much is output to diag (do not output duplicates) bool notFromOverload = (lastPowerMode != POWERMODE::OVERLOAD); - bool newPowerMode = (powerMode != lastPowerMode); + bool powerModeChange = (powerMode != lastPowerMode); unsigned long now = micros(); - if (newPowerMode) + if (powerModeChange) lastBadSample = now; lastPowerMode = POWERMODE::ALERT; // check how long we have been in this state @@ -513,7 +513,7 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) { lastBadSample = now; unsigned long timeout = checkCurrent(useProgLimit) ? POWER_SAMPLE_IGNORE_FAULT_HIGH : POWER_SAMPLE_IGNORE_FAULT_LOW; if ( mslpc < timeout) { - if (newPowerMode) + if (powerModeChange) DIAG(F("TRACK %c FAULT PIN (%M ignore)"), trackno + 'A', timeout); break; } @@ -525,7 +525,7 @@ void MotorDriver::checkPowerOverload(bool useProgLimit, byte trackno) { if (checkCurrent(useProgLimit)) { lastBadSample = now; if (mslpc < POWER_SAMPLE_IGNORE_CURRENT) { - if (newPowerMode) { + if (powerModeChange) { unsigned int mA=raw2mA(lastCurrent); DIAG(F("TRACK %c CURRENT (%M ignore) %dmA"), trackno + 'A', POWER_SAMPLE_IGNORE_CURRENT, mA); } diff --git a/TrackManager.cpp b/TrackManager.cpp index 1725a8d..8588383 100644 --- a/TrackManager.cpp +++ b/TrackManager.cpp @@ -190,7 +190,7 @@ void TrackManager::setDCSignal(int16_t cab, byte speedbyte) { bool TrackManager::setTrackMode(byte trackToSet, TRACK_MODE mode, int16_t dcAddr) { if (trackToSet>lastTrack || track[trackToSet]==NULL) return false; - DIAG(F("Track=%c Mode=%d"),trackToSet+'A', mode); + //DIAG(F("Track=%c Mode=%d"),trackToSet+'A', mode); // DC tracks require a motorDriver that can set brake! if ((mode==TRACK_MODE_DC || mode==TRACK_MODE_DCX) && !track[trackToSet]->brakeCanPWM()) {