1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-27 01:56:14 +01:00

Exrail ESTOPALL

This commit is contained in:
Asbelos 2024-11-24 14:44:36 +00:00
parent 6798bd97cd
commit e3ec68a587
4 changed files with 8 additions and 0 deletions

View File

@ -585,6 +585,10 @@ void RMFT2::loop2() {
case OPCODE_SPEED: case OPCODE_SPEED:
if (loco) DCC::setThrottle(loco,operand,DCC::getThrottleDirection(loco)); if (loco) DCC::setThrottle(loco,operand,DCC::getThrottleDirection(loco));
break; break;
case OPCODE_ESTOPALL:
DCC::setThrottle(0,1,1); // all locos speed=1
break;
case OPCODE_FORGET: case OPCODE_FORGET:
if (loco!=0) { if (loco!=0) {

View File

@ -78,6 +78,7 @@ enum OPCODE : byte {OPCODE_THROW,OPCODE_CLOSE,OPCODE_TOGGLE_TURNOUT,
OPCODE_ONBUTTON,OPCODE_ONSENSOR, OPCODE_ONBUTTON,OPCODE_ONSENSOR,
OPCODE_NEOPIXEL, OPCODE_NEOPIXEL,
OPCODE_ONBLOCKENTER,OPCODE_ONBLOCKEXIT, OPCODE_ONBLOCKENTER,OPCODE_ONBLOCKEXIT,
OPCODE_ESTOPALL,
// OPcodes below this point are skip-nesting IF operations // OPcodes below this point are skip-nesting IF operations
// placed here so that they may be skipped as a group // placed here so that they may be skipped as a group
// see skipIfBlock() // see skipIfBlock()

View File

@ -60,6 +60,7 @@
#undef ENDIF #undef ENDIF
#undef ENDTASK #undef ENDTASK
#undef ESTOP #undef ESTOP
#undef ESTOPALL
#undef EXRAIL #undef EXRAIL
#undef EXTT_TURNTABLE #undef EXTT_TURNTABLE
#undef FADE #undef FADE
@ -234,6 +235,7 @@
#define ENDIF #define ENDIF
#define ENDTASK #define ENDTASK
#define ESTOP #define ESTOP
#define ESTOPALL
#define EXRAIL #define EXRAIL
#define EXTT_TURNTABLE(id,vpin,home,description...) #define EXTT_TURNTABLE(id,vpin,home,description...)
#define FADE(pin,value,ms) #define FADE(pin,value,ms)

View File

@ -516,6 +516,7 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
#define ENDIF OPCODE_ENDIF,0,0, #define ENDIF OPCODE_ENDIF,0,0,
#define ENDTASK OPCODE_ENDTASK,0,0, #define ENDTASK OPCODE_ENDTASK,0,0,
#define ESTOP OPCODE_SPEED,V(1), #define ESTOP OPCODE_SPEED,V(1),
#define ESTOPALL OPCODE_ESTOPALL,0,0,
#define EXRAIL #define EXRAIL
#ifndef IO_NO_HAL #ifndef IO_NO_HAL
#define EXTT_TURNTABLE(id,vpin,home,description...) OPCODE_EXTTTURNTABLE,V(id),OPCODE_PAD,V(vpin),OPCODE_PAD,V(home), #define EXTT_TURNTABLE(id,vpin,home,description...) OPCODE_EXTTTURNTABLE,V(id),OPCODE_PAD,V(vpin),OPCODE_PAD,V(home),