diff --git a/MotorDriver.cpp b/MotorDriver.cpp index a5488ba..a679582 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -25,7 +25,6 @@ #include "DCCTimer.h" #include "DIAG.h" -bool MotorDriver::usePWM=false; bool MotorDriver::commonFaultPin=false; volatile byte fakePORTA; diff --git a/MotorDriver.h b/MotorDriver.h index 93a337b..13545e3 100644 --- a/MotorDriver.h +++ b/MotorDriver.h @@ -122,8 +122,7 @@ class MotorDriver { } bool isPWMCapable(); bool canMeasureCurrent(); - bool trackPWM; - static bool usePWM; // TODO: Remove + bool trackPWM; // this track uses PWM timer to generate the DCC waveform static bool commonFaultPin; // This is a stupid motor shield which has only a common fault pin for both outputs inline byte getFaultPin() { return faultPin; diff --git a/TrackManager.cpp b/TrackManager.cpp index 505a006..7265b95 100644 --- a/TrackManager.cpp +++ b/TrackManager.cpp @@ -73,8 +73,6 @@ void TrackManager::Setup(const FSH * shieldname, // TODO Fault pin config for odd motor boards (example pololu) // MotorDriver::commonFaultPin = ((mainDriver->getFaultPin() == progDriver->getFaultPin()) // && (mainDriver->getFaultPin() != UNUSED_PIN)); - DIAG(F("Signal pin config: %S accuracy waveform"), - MotorDriver::usePWM ? F("high") : F("normal") ); DCC::begin(shieldname); } @@ -211,10 +209,6 @@ bool TrackManager::setTrackMode(byte trackToSet, TRACK_MODE mode, int16_t dcAddr } DCCTimer::clearPWM(); // has to be AFTER trackPWM changes because if trackPWM==true this is undone for that track } - //if (MotorDriver::usePWM != canDo) - // DIAG(F("HA mode changed from %d to %d"), MotorDriver::usePWM, canDo); - MotorDriver::usePWM=canDo; - // Normal running tracks are set to the global power state track[trackToSet]->setPower(