From f1e84330caff19bd9a02991a529697e02e1735ef Mon Sep 17 00:00:00 2001 From: Asbelos Date: Sat, 14 Aug 2021 16:42:56 +0100 Subject: [PATCH] PIN and SERVO turnout ids --- RMFT2.cpp | 22 ++++++++++------------ RMFTMacros.h | 8 ++++---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/RMFT2.cpp b/RMFT2.cpp index 09fbe8a..97392f8 100644 --- a/RMFT2.cpp +++ b/RMFT2.cpp @@ -57,7 +57,7 @@ byte RMFT2::flags[MAX_FLAGS]; DCCEXParser::setRMFTFilter(RMFT2::ComandFilter); for (int f=0;f commands to do the following: +// This filter intercepts <> commands to do the following: // - Implement RMFT specific commands/diagnostics // - Reject/modify JMRI commands that would interfere with RMFT processing void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16_t p[]) { @@ -114,10 +116,6 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16 opcode=0; } break; - - case 't': // THROTTLE - // TODO - Monitor throttle commands and reject any that are in current automation - break; case '/': // New EXRAIL command reject=!parseSlash(stream,paramCount,p); diff --git a/RMFTMacros.h b/RMFTMacros.h index 88a6b71..ca7acad 100644 --- a/RMFTMacros.h +++ b/RMFTMacros.h @@ -96,8 +96,8 @@ #define STOP #undef SIGNAL #define SIGNAL(redpin,amberpin,greenpin) -#define SERVO_TURNOUT(pin,activeAngle,inactiveAngle) -#define PIN_TURNOUT(pin) +#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle) +#define PIN_TURNOUT(id,pin) #define THROW(id) #define TURNOUT(id,addr,subaddr) #define UNJOIN @@ -233,8 +233,8 @@ const int StringMacroTracker1=__COUNTER__; #define SPEED(speed) OPCODE_SPEED,V(speed), #define STOP OPCODE_SPEED,V(0), #define SIGNAL(redpin,amberpin,greenpin) OPCODE_SIGNAL,V(redpin),OPCODE_PAD,V(amberpin),OPCODE_PAD,V(greenpin), -#define SERVO_TURNOUT(pin,activeAngle,inactiveAngle) OPCODE_SERVOTURNOUT,V(pin),OPCODE_PAD,V(actibeAngle),OPCODE -#define PIN_TURNOUT(pin) OPCODE_PINTURNOUT,V(pin), +#define SERVO_TURNOUT(id,pin,activeAngle,inactiveAngle) OPCODE_SERVOTURNOUT,V(id),OPCODE_PAD,V(pin),OPCODE_PAD,V(activeAngle),OPCODE_PAD,V(inactiveAngle), +#define PIN_TURNOUT(id,pin) OPCODE_PINTURNOUT,V(id),OPCODE_PAD,V(pin), #define THROW(id) OPCODE_THROW,V(id), #define TURNOUT(id,addr,subaddr) OPCODE_TURNOUT,V(id),OPCODE_PAD,V(addr),OPCODE_PAD,V(subaddr), #define UNJOIN OPCODE_UNJOIN,NOP,