mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
ACON/ACOF 32 bit + 1=OFF
This commit is contained in:
parent
fca4ea052e
commit
a2fb58584f
|
@ -1004,8 +1004,9 @@ void RMFT2::loop2() {
|
|||
case OPCODE_ACON: // MERG adapter
|
||||
case OPCODE_ACOF:
|
||||
if ((compileFeatures & FEATURE_LCC) && LCCSerial)
|
||||
StringFormatter::send(LCCSerial,F("<L x%c%h>"),
|
||||
opcode==OPCODE_ACON?'1':'0',(uint16_t)operand);
|
||||
StringFormatter::send(LCCSerial,F("<L x%c%h%h>"),
|
||||
opcode==OPCODE_ACON?'0':'1',
|
||||
(uint16_t)operand,getOperand(progCounter,1));
|
||||
break;
|
||||
|
||||
case OPCODE_LCCX: // long form LCC
|
||||
|
|
|
@ -78,8 +78,10 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16
|
|||
getOperand(progCounter,0)
|
||||
);
|
||||
}
|
||||
if (opcode==OPCODE_ACON) StringFormatter::send(stream,F("<LS x1%h>\n"),getOperand(progCounter,0));
|
||||
if (opcode==OPCODE_ACOF) StringFormatter::send(stream,F("<LS x0%h>\n"),getOperand(progCounter,0));
|
||||
if (opcode==OPCODE_ACON) StringFormatter::send(stream,F("<LS x0%h%h>\n"),
|
||||
getOperand(progCounter,0),getOperand(progCounter,1));
|
||||
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
|
||||
|
@ -103,10 +105,10 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16
|
|||
}
|
||||
if (opcode==OPCODE_ONACON || opcode==OPCODE_ONACOF) {
|
||||
onLCCLookup[eventIndex]=progCounter; // TODO skip...
|
||||
StringFormatter::send(stream,F("<LL %d x%c%h>\n"),
|
||||
StringFormatter::send(stream,F("<LL %d x%c%h%h>\n"),
|
||||
eventIndex,
|
||||
opcode==OPCODE_ONACON?'1':'0',
|
||||
getOperand(progCounter,0)
|
||||
opcode==OPCODE_ONACON?'0':'1',
|
||||
getOperand(progCounter,0),getOperand(progCounter,1)
|
||||
);
|
||||
eventIndex++;
|
||||
}
|
||||
|
|
|
@ -541,10 +541,10 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
|
|||
OPCODE_PAD,V((((uint64_t)sender)>>32)&0xFFFF),\
|
||||
OPCODE_PAD,V((((uint64_t)sender)>>16)&0xFFFF),\
|
||||
OPCODE_PAD,V((((uint64_t)sender)>>0)&0xFFFF),
|
||||
#define ACON(eventid) OPCODE_ACON,V(eventid),
|
||||
#define ACOF(eventid) OPCODE_ACOF,V(eventid),
|
||||
#define ONACON(eventid) OPCODE_ONACON,V(eventid),
|
||||
#define ONACOF(eventid) OPCODE_ONACOF,V(eventid),
|
||||
#define ACON(eventid) OPCODE_ACON,V(((uint32_t)eventid >>16) & 0xFFFF),OPCODE_PAD,V(eventid & 0xFFFF),
|
||||
#define ACOF(eventid) OPCODE_ACOF,V(((uint32_t)eventid >>16) & 0xFFFF),OPCODE_PAD,V(eventid & 0xFFFF),
|
||||
#define ONACON(eventid) OPCODE_ONACON,V((uint32_t)(eventid) >>16),OPCODE_PAD,V(eventid & 0xFFFF),
|
||||
#define ONACOF(eventid) OPCODE_ONACOF,V((uint32_t)(eventid) >>16),OPCODE_PAD,V(eventid & 0xFFFF),
|
||||
#define LCD(id,msg) PRINT(msg)
|
||||
#define SCREEN(display,id,msg) PRINT(msg)
|
||||
#define STEALTH(code...) PRINT(dummy)
|
||||
|
|
Loading…
Reference in New Issue
Block a user