1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 08:06:13 +01:00

Change to EXRAIL Set_Power

Change to EXRAIL SET_Power
This commit is contained in:
Colin Murdoch 2023-09-25 09:59:17 +01:00
parent aacb980dc8
commit 9e3ae21bb8
2 changed files with 2 additions and 6 deletions

View File

@ -588,10 +588,7 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
prog=false; prog=false;
} }
singletrack=true; singletrack=true;
DIAG(F("Calling SetPower %d - %d - %d"), POWERMODE::ON, false, t);
if (main) TrackManager::setTrackPower(POWERMODE::ON, t); if (main) TrackManager::setTrackPower(POWERMODE::ON, t);
//if (main) TrackManager::SetMainTrackPower(POWERMODE::ON, t);
//if (prog) TrackManager::SetProgTrackPower(POWERMODE::ON, t);
} }
else break; // will reply <X> else break; // will reply <X>
} }
@ -622,7 +619,7 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
else if (p[0]==HASH_KEYWORD_PROG) { // <0 PROG> else if (p[0]==HASH_KEYWORD_PROG) { // <0 PROG>
prog=true; prog=true;
} }
#endif #endif <=
else if (p[0] >= 'A' && p[0] <= 'H') { // <1 A-H> else if (p[0] >= 'A' && p[0] <= 'H') { // <1 A-H>
byte t = (p[0] - 'A'); byte t = (p[0] - 'A');
DIAG(F("Processing track - %d "), t); DIAG(F("Processing track - %d "), t);
@ -636,7 +633,6 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
prog=false; prog=false;
} }
singletrack=true; singletrack=true;
DIAG(F("Calling SetPower %d - %d - %d"), POWERMODE::OFF, false, t);
if (main) TrackManager::setTrackPower(POWERMODE::OFF, t); if (main) TrackManager::setTrackPower(POWERMODE::OFF, t);
} }

View File

@ -412,7 +412,7 @@ const HIGHFLASH int16_t RMFT2::SignalDefinitions[] = {
#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile,description...) OPCODE_SERVOTURNOUT,V(id),OPCODE_PAD,V(pin),OPCODE_PAD,V(activeAngle),OPCODE_PAD,V(inactiveAngle),OPCODE_PAD,V(PCA9685::ProfileType::profile), #define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle,profile,description...) OPCODE_SERVOTURNOUT,V(id),OPCODE_PAD,V(pin),OPCODE_PAD,V(activeAngle),OPCODE_PAD,V(inactiveAngle),OPCODE_PAD,V(PCA9685::ProfileType::profile),
#define SET(pin) OPCODE_SET,V(pin), #define SET(pin) OPCODE_SET,V(pin),
#define SET_TRACK(track,mode) OPCODE_SET_TRACK,V(TRACK_MODE_##mode <<8 | TRACK_NUMBER_##track), #define SET_TRACK(track,mode) OPCODE_SET_TRACK,V(TRACK_MODE_##mode <<8 | TRACK_NUMBER_##track),
#define SET_POWER(track,onoff) OPCODE_SET_POWER,V(TRACK_POWER_##onoff, TRACK_NUMBER_##track), #define SET_POWER(track,onoff) OPCODE_SET_POWER,V(TRACK_POWER_##onoff),OPCODE_PAD, V(TRACK_NUMBER_##track),
#define SETLOCO(loco) OPCODE_SETLOCO,V(loco), #define SETLOCO(loco) OPCODE_SETLOCO,V(loco),
#define SIGNAL(redpin,amberpin,greenpin) #define SIGNAL(redpin,amberpin,greenpin)
#define SIGNALH(redpin,amberpin,greenpin) #define SIGNALH(redpin,amberpin,greenpin)