diff --git a/EXRAIL2Parser.cpp b/EXRAIL2Parser.cpp index 29a9bcd8..8c498ab3 100644 --- a/EXRAIL2Parser.cpp +++ b/EXRAIL2Parser.cpp @@ -96,7 +96,7 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16 return; case OPCODE_ACON: // CBUS ACON - case OPCODE_ACOF: // CBUS ACON + case OPCODE_ACOF: // CBUS ACOF StringFormatter::send(stream,F("\n"), exrailOpcode==OPCODE_ACOF?'1':'0', getOperand(progCounter,0),getOperand(progCounter,1)); @@ -108,7 +108,6 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16 // and at the same time build the event index looku. case OPCODE_ONLCC: - onLCCLookup[lccEventIndex]=progCounter; StringFormatter::send(stream,F("\n"), lccEventIndex, getOperand(progCounter,1), @@ -116,23 +115,27 @@ void RMFT2::ComandFilter(Print * stream, byte & opcode, byte & paramCount, int16 getOperand(progCounter,3), getOperand(progCounter,0) ); - lccEventIndex++; SKIPOP;SKIPOP;SKIPOP;SKIPOP; + // start on handler at next + onLCCLookup[lccEventIndex]=progCounter; + lccEventIndex++; lccProgCounter=progCounter; return; case OPCODE_ONACON: case OPCODE_ONACOF: - onLCCLookup[lccEventIndex]=progCounter; StringFormatter::send(stream,F("\n"), lccEventIndex, exrailOpcode==OPCODE_ONACOF?'1':'0', getOperand(progCounter,0),getOperand(progCounter,1) ); + SKIPOP;SKIPOP; + // start on handler at next + onLCCLookup[lccEventIndex]=progCounter; lccEventIndex++; - SKIPOP;SKIPOP; lccProgCounter=progCounter; return; + default: break; }