mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 12:51:24 +01:00
remove global usePWM flag
This commit is contained in:
parent
40dfda47c7
commit
4297ed5572
@ -25,7 +25,6 @@
|
||||
#include "DCCTimer.h"
|
||||
#include "DIAG.h"
|
||||
|
||||
bool MotorDriver::usePWM=false;
|
||||
bool MotorDriver::commonFaultPin=false;
|
||||
|
||||
volatile byte fakePORTA;
|
||||
|
@ -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;
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user