mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
remove currently unused virtual functions
This commit is contained in:
parent
1fc5f436fd
commit
cadb82ab6b
|
@ -113,14 +113,14 @@ class MotorDriver {
|
||||||
|
|
||||||
MotorDriver(VPIN power_pin, byte signal_pin, byte signal_pin2, int8_t brake_pin,
|
MotorDriver(VPIN power_pin, byte signal_pin, byte signal_pin2, int8_t brake_pin,
|
||||||
byte current_pin, float senseFactor, unsigned int tripMilliamps, byte faultPin);
|
byte current_pin, float senseFactor, unsigned int tripMilliamps, byte faultPin);
|
||||||
virtual void setPower( POWERMODE mode);
|
void setPower( POWERMODE mode);
|
||||||
virtual POWERMODE getPower() { return powerMode;}
|
POWERMODE getPower() { return powerMode;}
|
||||||
// as the port registers can be shadowed to get syncronized DCC signals
|
// as the port registers can be shadowed to get syncronized DCC signals
|
||||||
// we need to take care of that and we have to turn off interrupts if
|
// we need to take care of that and we have to turn off interrupts if
|
||||||
// we setSignal() or setBrake() or setPower() during that time as
|
// we setSignal() or setBrake() or setPower() during that time as
|
||||||
// otherwise the call from interrupt context can undo whatever we do
|
// otherwise the call from interrupt context can undo whatever we do
|
||||||
// from outside interrupt
|
// from outside interrupt
|
||||||
virtual void setBrake( bool on, bool interruptContext=false);
|
void setBrake( bool on, bool interruptContext=false);
|
||||||
__attribute__((always_inline)) inline void setSignal( bool high, bool interruptContext=false) {
|
__attribute__((always_inline)) inline void setSignal( bool high, bool interruptContext=false) {
|
||||||
if (!interruptContext) {noInterrupts();}
|
if (!interruptContext) {noInterrupts();}
|
||||||
if (trackPWM) {
|
if (trackPWM) {
|
||||||
|
@ -145,7 +145,7 @@ class MotorDriver {
|
||||||
pinMode(signalPin, INPUT);
|
pinMode(signalPin, INPUT);
|
||||||
};
|
};
|
||||||
inline pinpair getSignalPin() { return pinpair(signalPin,signalPin2); };
|
inline pinpair getSignalPin() { return pinpair(signalPin,signalPin2); };
|
||||||
virtual void setDCSignal(byte speedByte);
|
void setDCSignal(byte speedByte);
|
||||||
inline void detachDCSignal() {
|
inline void detachDCSignal() {
|
||||||
#if defined(__arm__)
|
#if defined(__arm__)
|
||||||
pinMode(brakePin, OUTPUT);
|
pinMode(brakePin, OUTPUT);
|
||||||
|
@ -155,10 +155,10 @@ class MotorDriver {
|
||||||
setDCSignal(128);
|
setDCSignal(128);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
virtual int getCurrentRaw();
|
int getCurrentRaw();
|
||||||
virtual int getCurrentRawInInterrupt();
|
int getCurrentRawInInterrupt();
|
||||||
virtual unsigned int raw2mA( int raw);
|
unsigned int raw2mA( int raw);
|
||||||
virtual unsigned int mA2raw( unsigned int mA);
|
unsigned int mA2raw( unsigned int mA);
|
||||||
inline bool brakeCanPWM() {
|
inline bool brakeCanPWM() {
|
||||||
#if defined(ARDUINO_ARCH_ESP32) || defined(__arm__)
|
#if defined(ARDUINO_ARCH_ESP32) || defined(__arm__)
|
||||||
// TODO: on ARM we can use digitalPinHasPWM, and may wish/need to
|
// TODO: on ARM we can use digitalPinHasPWM, and may wish/need to
|
||||||
|
|
Loading…
Reference in New Issue
Block a user