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

Compare commits

..

No commits in common. "a2fb58584f489c24ace18f089da954d70b15bdac" and "0d07aa6271813b38dbcc74dd00d86a9c0dc6f060" have entirely different histories.

5 changed files with 34 additions and 41 deletions

View File

@ -1001,12 +1001,11 @@ void RMFT2::loop2() {
StringFormatter::send(LCCSerial,F("<L x%h>"),(uint16_t)operand); StringFormatter::send(LCCSerial,F("<L x%h>"),(uint16_t)operand);
break; break;
case OPCODE_ACON: // MERG adapter case OPCODE_MERGON: // MERG adapter
case OPCODE_ACOF: case OPCODE_MERGOFF:
if ((compileFeatures & FEATURE_LCC) && LCCSerial) if ((compileFeatures & FEATURE_LCC) && LCCSerial)
StringFormatter::send(LCCSerial,F("<L x%c%h%h>"), StringFormatter::send(LCCSerial,F("<L x%c%h>"),
opcode==OPCODE_ACON?'0':'1', opcode==OPCODE_MERGON?'1':'0',(uint16_t)operand);
(uint16_t)operand,getOperand(progCounter,1));
break; break;
case OPCODE_LCCX: // long form LCC case OPCODE_LCCX: // long form LCC
@ -1096,8 +1095,8 @@ void RMFT2::loop2() {
case OPCODE_PINTURNOUT: // Turnout definition ignored at runtime case OPCODE_PINTURNOUT: // Turnout definition ignored at runtime
case OPCODE_ONCLOSE: // Turnout event catchers ignored here case OPCODE_ONCLOSE: // Turnout event catchers ignored here
case OPCODE_ONLCC: // LCC event catchers ignored here case OPCODE_ONLCC: // LCC event catchers ignored here
case OPCODE_ONACON: // MERG event catchers ignored here case OPCODE_ONMERGON: // MERG event catchers ignored here
case OPCODE_ONACOF: // MERG event catchers ignored here case OPCODE_ONMERGOFF: // MERG event catchers ignored here
case OPCODE_ONTHROW: case OPCODE_ONTHROW:
case OPCODE_ONACTIVATE: // Activate event catchers ignored here case OPCODE_ONACTIVATE: // Activate event catchers ignored here
case OPCODE_ONDEACTIVATE: case OPCODE_ONDEACTIVATE:

View File

@ -69,8 +69,8 @@ enum OPCODE : byte {OPCODE_THROW,OPCODE_CLOSE,OPCODE_TOGGLE_TURNOUT,
OPCODE_TTADDPOSITION,OPCODE_DCCTURNTABLE,OPCODE_EXTTTURNTABLE, OPCODE_TTADDPOSITION,OPCODE_DCCTURNTABLE,OPCODE_EXTTTURNTABLE,
OPCODE_ONROTATE,OPCODE_ROTATE,OPCODE_WAITFORTT, OPCODE_ONROTATE,OPCODE_ROTATE,OPCODE_WAITFORTT,
OPCODE_LCC,OPCODE_LCCX,OPCODE_ONLCC, OPCODE_LCC,OPCODE_LCCX,OPCODE_ONLCC,
OPCODE_ACON, OPCODE_ACOF, OPCODE_MERGON, OPCODE_MERGOFF,
OPCODE_ONACON, OPCODE_ONACOF, OPCODE_ONMERGON, OPCODE_ONMERGOFF,
OPCODE_ONOVERLOAD, OPCODE_ONOVERLOAD,
OPCODE_ROUTE_ACTIVE,OPCODE_ROUTE_INACTIVE,OPCODE_ROUTE_HIDDEN, OPCODE_ROUTE_ACTIVE,OPCODE_ROUTE_INACTIVE,OPCODE_ROUTE_HIDDEN,
OPCODE_ROUTE_DISABLED, OPCODE_ROUTE_DISABLED,

View File

@ -99,10 +99,10 @@
#undef LCCX #undef LCCX
#undef LCN #undef LCN
#undef MOVETT #undef MOVETT
#undef ACON #undef MERGON
#undef ACOF #undef MERGOFF
#undef ONACON #undef ONMERGON
#undef ONACOF #undef ONMERGOFF
#undef MESSAGE #undef MESSAGE
#undef ONACTIVATE #undef ONACTIVATE
#undef ONACTIVATEL #undef ONACTIVATEL
@ -269,10 +269,10 @@
#define LCN(msg) #define LCN(msg)
#define MESSAGE(msg) #define MESSAGE(msg)
#define MOVETT(id,steps,activity) #define MOVETT(id,steps,activity)
#define ACON(eventid) #define MERGON(eventid)
#define ACOF(eventid) #define MERGOFF(eventid)
#define ONACON(eventid) #define ONMERGON(eventid)
#define ONACOF(eventid) #define ONMERGOFF(eventid)
#define ONACTIVATE(addr,subaddr) #define ONACTIVATE(addr,subaddr)
#define ONACTIVATEL(linear) #define ONACTIVATEL(linear)
#define ONAMBER(signal_id) #define ONAMBER(signal_id)

View File

@ -78,10 +78,8 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16
getOperand(progCounter,0) getOperand(progCounter,0)
); );
} }
if (opcode==OPCODE_ACON) StringFormatter::send(stream,F("<LS x0%h%h>\n"), if (opcode==OPCODE_MERGON) StringFormatter::send(stream,F("<LS x1%h>\n"),getOperand(progCounter,0));
getOperand(progCounter,0),getOperand(progCounter,1)); if (opcode==OPCODE_MERGOFF) StringFormatter::send(stream,F("<LS x0%h>\n"),getOperand(progCounter,0));
if (opcode==OPCODE_ACOF) StringFormatter::send(stream,F("<LS x1%h%h>\n"),
getOperand(progCounter,0),getOperand(progCounter,1));
} }
// we stream the hex events we wish to listen to // we stream the hex events we wish to listen to
@ -103,12 +101,12 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16
); );
eventIndex++; eventIndex++;
} }
if (opcode==OPCODE_ONACON || opcode==OPCODE_ONACOF) { if (opcode==OPCODE_ONMERGON || opcode==OPCODE_ONMERGOFF) {
onLCCLookup[eventIndex]=progCounter; // TODO skip... onLCCLookup[eventIndex]=progCounter; // TODO skip...
StringFormatter::send(stream,F("<LL %d x%c%h%h>\n"), StringFormatter::send(stream,F("<LL %d x%c%h>\n"),
eventIndex, eventIndex,
opcode==OPCODE_ONACON?'0':'1', opcode==OPCODE_ONMERGON?'1':'0',
getOperand(progCounter,0),getOperand(progCounter,1) getOperand(progCounter,0)
); );
eventIndex++; eventIndex++;
} }

View File

@ -189,14 +189,10 @@ bool exrailHalSetup() {
#define LCCX(senderid,eventid) | FEATURE_LCC #define LCCX(senderid,eventid) | FEATURE_LCC
#undef ONLCC #undef ONLCC
#define ONLCC(senderid,eventid) | FEATURE_LCC #define ONLCC(senderid,eventid) | FEATURE_LCC
#undef ACON #undef ONMERGON
#define ACON(eventid) | FEATURE_LCC #define ONMERGON(eventid) | FEATURE_LCC
#undef ACOF #undef ONMERGOFF
#define ACOF(eventid) | FEATURE_LCC #define ONMERGOFF(eventid) | FEATURE_LCC
#undef ONACON
#define ONACON(eventid) | FEATURE_LCC
#undef ONACOF
#define ONACOF(eventid) | FEATURE_LCC
#undef ROUTE_ACTIVE #undef ROUTE_ACTIVE
#define ROUTE_ACTIVE(id) | FEATURE_ROUTESTATE #define ROUTE_ACTIVE(id) | FEATURE_ROUTESTATE
#undef ROUTE_INACTIVE #undef ROUTE_INACTIVE
@ -441,10 +437,10 @@ const HIGHFLASH int16_t RMFT2::SignalDefinitions[] = {
#include "EXRAIL2MacroReset.h" #include "EXRAIL2MacroReset.h"
#undef ONLCC #undef ONLCC
#define ONLCC(sender,event) +1 #define ONLCC(sender,event) +1
#undef ONACON #undef ONMERGON
#define ONACON(event) +1 #define ONMERGON(event) +1
#undef ONACOF #undef ONMERGOFF
#define ONACOF(event) +1 #define ONMERGOFF(event) +1
const int RMFT2::countLCCLookup=0 const int RMFT2::countLCCLookup=0
#include "myAutomation.h" #include "myAutomation.h"
@ -541,10 +537,10 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
OPCODE_PAD,V((((uint64_t)sender)>>32)&0xFFFF),\ OPCODE_PAD,V((((uint64_t)sender)>>32)&0xFFFF),\
OPCODE_PAD,V((((uint64_t)sender)>>16)&0xFFFF),\ OPCODE_PAD,V((((uint64_t)sender)>>16)&0xFFFF),\
OPCODE_PAD,V((((uint64_t)sender)>>0)&0xFFFF), OPCODE_PAD,V((((uint64_t)sender)>>0)&0xFFFF),
#define ACON(eventid) OPCODE_ACON,V(((uint32_t)eventid >>16) & 0xFFFF),OPCODE_PAD,V(eventid & 0xFFFF), #define MERGON(eventid) OPCODE_MERGON,V(eventid),
#define ACOF(eventid) OPCODE_ACOF,V(((uint32_t)eventid >>16) & 0xFFFF),OPCODE_PAD,V(eventid & 0xFFFF), #define MERGOFF(eventid) OPCODE_MERGOFF,V(eventid),
#define ONACON(eventid) OPCODE_ONACON,V((uint32_t)(eventid) >>16),OPCODE_PAD,V(eventid & 0xFFFF), #define ONMERGON(eventid) OPCODE_ONMERGON,V(eventid),
#define ONACOF(eventid) OPCODE_ONACOF,V((uint32_t)(eventid) >>16),OPCODE_PAD,V(eventid & 0xFFFF), #define ONMERGOFF(eventid) OPCODE_ONMERGOFF,V(eventid),
#define LCD(id,msg) PRINT(msg) #define LCD(id,msg) PRINT(msg)
#define SCREEN(display,id,msg) PRINT(msg) #define SCREEN(display,id,msg) PRINT(msg)
#define STEALTH(code...) PRINT(dummy) #define STEALTH(code...) PRINT(dummy)