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

EXRAIL FORGET current loco

This commit is contained in:
Asbelos 2022-03-24 10:40:49 +00:00
parent 269e1b36ea
commit 349f5d5362
4 changed files with 12 additions and 2 deletions

View File

@ -570,6 +570,13 @@ void RMFT2::loop2() {
driveLoco(operand); driveLoco(operand);
break; break;
case OPCODE_FORGET:
if (loco!=0) {
DCC::forgetLoco(loco);
loco=0;
}
break;
case OPCODE_INVERT_DIRECTION: case OPCODE_INVERT_DIRECTION:
invert= !invert; invert= !invert;
driveLoco(speedo); driveLoco(speedo);

View File

@ -44,7 +44,7 @@ enum OPCODE : byte {OPCODE_THROW,OPCODE_CLOSE,
OPCODE_SERVO,OPCODE_SIGNAL,OPCODE_TURNOUT,OPCODE_WAITFOR, OPCODE_SERVO,OPCODE_SIGNAL,OPCODE_TURNOUT,OPCODE_WAITFOR,
OPCODE_PAD,OPCODE_FOLLOW,OPCODE_CALL,OPCODE_RETURN, OPCODE_PAD,OPCODE_FOLLOW,OPCODE_CALL,OPCODE_RETURN,
OPCODE_JOIN,OPCODE_UNJOIN,OPCODE_READ_LOCO1,OPCODE_READ_LOCO2,OPCODE_POM, OPCODE_JOIN,OPCODE_UNJOIN,OPCODE_READ_LOCO1,OPCODE_READ_LOCO2,OPCODE_POM,
OPCODE_START,OPCODE_SETLOCO,OPCODE_SENDLOCO, OPCODE_START,OPCODE_SETLOCO,OPCODE_SENDLOCO,OPCODE_FORGET,
OPCODE_PAUSE, OPCODE_RESUME,OPCODE_POWEROFF,OPCODE_POWERON, OPCODE_PAUSE, OPCODE_RESUME,OPCODE_POWEROFF,OPCODE_POWERON,
OPCODE_ONCLOSE, OPCODE_ONTHROW, OPCODE_SERVOTURNOUT, OPCODE_PINTURNOUT, OPCODE_ONCLOSE, OPCODE_ONTHROW, OPCODE_SERVOTURNOUT, OPCODE_PINTURNOUT,
OPCODE_PRINT,OPCODE_DCCACTIVATE, OPCODE_PRINT,OPCODE_DCCACTIVATE,

View File

@ -54,6 +54,7 @@
#undef FOFF #undef FOFF
#undef FOLLOW #undef FOLLOW
#undef FON #undef FON
#undef FORGET
#undef FREE #undef FREE
#undef FWD #undef FWD
#undef GREEN #undef GREEN
@ -149,6 +150,7 @@
#define FOFF(func) #define FOFF(func)
#define FOLLOW(route) #define FOLLOW(route)
#define FON(func) #define FON(func)
#define FORGET
#define FREE(blockid) #define FREE(blockid)
#define FWD(speed) #define FWD(speed)
#define GREEN(signal_id) #define GREEN(signal_id)

View File

@ -198,6 +198,7 @@ const FLASH int16_t RMFT2::SignalDefinitions[] = {
#define FOFF(func) OPCODE_FOFF,V(func), #define FOFF(func) OPCODE_FOFF,V(func),
#define FOLLOW(route) OPCODE_FOLLOW,V(route), #define FOLLOW(route) OPCODE_FOLLOW,V(route),
#define FON(func) OPCODE_FON,V(func), #define FON(func) OPCODE_FON,V(func),
#define FORGET OPCODE_FORGET,0,0,
#define FREE(blockid) OPCODE_FREE,V(blockid), #define FREE(blockid) OPCODE_FREE,V(blockid),
#define FWD(speed) OPCODE_FWD,V(speed), #define FWD(speed) OPCODE_FWD,V(speed),
#define GREEN(signal_id) OPCODE_GREEN,V(signal_id), #define GREEN(signal_id) OPCODE_GREEN,V(signal_id),