From 9e3ae21bb8fc26e25b5e448498217cea53159207 Mon Sep 17 00:00:00 2001 From: Colin Murdoch Date: Mon, 25 Sep 2023 09:59:17 +0100 Subject: [PATCH] Change to EXRAIL Set_Power Change to EXRAIL SET_Power --- DCCEXParser.cpp | 6 +----- EXRAILMacros.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index 9c94f82..a8c257b 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -588,10 +588,7 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream) prog=false; } singletrack=true; - DIAG(F("Calling SetPower %d - %d - %d"), POWERMODE::ON, false, 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 } @@ -622,7 +619,7 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream) else if (p[0]==HASH_KEYWORD_PROG) { // <0 PROG> prog=true; } -#endif +#endif <= else if (p[0] >= 'A' && p[0] <= 'H') { // <1 A-H> byte t = (p[0] - 'A'); DIAG(F("Processing track - %d "), t); @@ -636,7 +633,6 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream) prog=false; } singletrack=true; - DIAG(F("Calling SetPower %d - %d - %d"), POWERMODE::OFF, false, t); if (main) TrackManager::setTrackPower(POWERMODE::OFF, t); } diff --git a/EXRAILMacros.h b/EXRAILMacros.h index 62b852a..b85b68a 100644 --- a/EXRAILMacros.h +++ b/EXRAILMacros.h @@ -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 SET(pin) OPCODE_SET,V(pin), #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 SIGNAL(redpin,amberpin,greenpin) #define SIGNALH(redpin,amberpin,greenpin)