Skip to content

Commit

Permalink
XPOM
Browse files Browse the repository at this point in the history
  • Loading branch information
Asbelos committed Nov 25, 2024
1 parent e3ec68a commit e7eff7e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions EXRAIL2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,10 @@ void RMFT2::loop2() {
if (loco) DCC::writeCVByteMain(loco, operand, getOperand(1));
break;

case OPCODE_XPOM:
DCC::writeCVByteMain(operand, getOperand(1), getOperand(2));
break;

case OPCODE_POWEROFF:
TrackManager::setPower(POWERMODE::OFF);
TrackManager::setJoin(false);
Expand Down
2 changes: 1 addition & 1 deletion EXRAIL2.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ enum OPCODE : byte {OPCODE_THROW,OPCODE_CLOSE,OPCODE_TOGGLE_TURNOUT,
OPCODE_ONBUTTON,OPCODE_ONSENSOR,
OPCODE_NEOPIXEL,
OPCODE_ONBLOCKENTER,OPCODE_ONBLOCKEXIT,
OPCODE_ESTOPALL,
OPCODE_ESTOPALL,OPCODE_XPOM,
// OPcodes below this point are skip-nesting IF operations
// placed here so that they may be skipped as a group
// see skipIfBlock()
Expand Down
2 changes: 2 additions & 0 deletions EXRAIL2MacroReset.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
#undef XFOFF
#undef XFON
#undef XFTOGGLE
#undef XPOM

#ifndef RMFT2_UNDEF_ONLY
#define ACTIVATE(addr,subaddr)
Expand Down Expand Up @@ -371,5 +372,6 @@
#define XFOFF(cab,func)
#define XFON(cab,func)
#define XFTOGGLE(cab,func)
#define XPOM(cab,cv,value)

#endif
1 change: 1 addition & 0 deletions EXRAILMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
#define XFOFF(cab,func) OPCODE_XFOFF,V(cab),OPCODE_PAD,V(func),
#define XFON(cab,func) OPCODE_XFON,V(cab),OPCODE_PAD,V(func),
#define XFTOGGLE(cab,func) OPCODE_XFTOGGLE,V(cab),OPCODE_PAD,V(func),
#define XPOM(cab,cv,value) OPCODE_XPOM,V(cab),OPCODE_PAD,V(cv),OPCODE_PAD,V(value),

// Build RouteCode
const int StringMacroTracker2=__COUNTER__;
Expand Down
6 changes: 5 additions & 1 deletion Release_Notes/Railcom.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ Making use of Railcom data
response is `<r loco cv value>`
Additional EXRAIL features in Railcom Branch:
- ESTAOPALL stops all locos immediately
- XPOM(cab,cv,value) POM write cv to sepcific loco
(POM(cv,value) already writes cv to current loco)

0 comments on commit e7eff7e

Please sign in to comment.