mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 09:53:45 +02:00
eliminate resetsCounterP/setResetCounterPointer and replace with isProgTrack/makeProgTrack method
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
#include <Arduino.h>
|
||||
#include "MotorDriver.h"
|
||||
#include "DCCWaveform.h"
|
||||
#include "DCCTimer.h"
|
||||
#include "DIAG.h"
|
||||
|
||||
@@ -122,8 +123,8 @@ void MotorDriver::setPower(POWERMODE mode) {
|
||||
bool on=mode==POWERMODE::ON;
|
||||
if (on) {
|
||||
IODevice::write(powerPin,HIGH);
|
||||
if (resetsCounterP != NULL)
|
||||
*resetsCounterP = 0;
|
||||
if (isProgTrack)
|
||||
DCCWaveform::progTrack.clearResets();
|
||||
}
|
||||
else IODevice::write(powerPin,LOW);
|
||||
powerMode=mode;
|
||||
|
Reference in New Issue
Block a user