mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
Add EXRAIL IFLOCO function
This commit is contained in:
parent
fcf16c1367
commit
88b572a148
|
@ -747,6 +747,10 @@ void RMFT2::loop2() {
|
||||||
skipIf=IODevice::readAnalogue(operand)>=(int)(getOperand(1));
|
skipIf=IODevice::readAnalogue(operand)>=(int)(getOperand(1));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OPCODE_IFLOCO: // do if the loco is the active one
|
||||||
|
skipIf=loco!=operand;
|
||||||
|
break;
|
||||||
|
|
||||||
case OPCODE_IFNOT: // do next operand if sensor not set
|
case OPCODE_IFNOT: // do next operand if sensor not set
|
||||||
skipIf=readSensor(operand);
|
skipIf=readSensor(operand);
|
||||||
break;
|
break;
|
||||||
|
@ -1244,4 +1248,3 @@ void RMFT2::thrungeString(uint32_t strfar, thrunger mode, byte id) {
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ enum OPCODE : byte {OPCODE_THROW,OPCODE_CLOSE,
|
||||||
OPCODE_IFRANDOM,OPCODE_IFRESERVE,
|
OPCODE_IFRANDOM,OPCODE_IFRESERVE,
|
||||||
OPCODE_IFCLOSED,OPCODE_IFTHROWN,
|
OPCODE_IFCLOSED,OPCODE_IFTHROWN,
|
||||||
OPCODE_IFRE,
|
OPCODE_IFRE,
|
||||||
|
OPCODE_IFLOCO
|
||||||
};
|
};
|
||||||
|
|
||||||
enum thrunger: byte {
|
enum thrunger: byte {
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
#undef IFCLOSED
|
#undef IFCLOSED
|
||||||
#undef IFGREEN
|
#undef IFGREEN
|
||||||
#undef IFGTE
|
#undef IFGTE
|
||||||
|
#undef IFLOCO
|
||||||
#undef IFLT
|
#undef IFLT
|
||||||
#undef IFNOT
|
#undef IFNOT
|
||||||
#undef IFRANDOM
|
#undef IFRANDOM
|
||||||
|
@ -182,6 +183,7 @@
|
||||||
#define IFCLOSED(turnout_id)
|
#define IFCLOSED(turnout_id)
|
||||||
#define IFGREEN(signal_id)
|
#define IFGREEN(signal_id)
|
||||||
#define IFGTE(sensor_id,value)
|
#define IFGTE(sensor_id,value)
|
||||||
|
#define IFLOCO(loco_id)
|
||||||
#define IFLT(sensor_id,value)
|
#define IFLT(sensor_id,value)
|
||||||
#define IFNOT(sensor_id)
|
#define IFNOT(sensor_id)
|
||||||
#define IFRANDOM(percent)
|
#define IFRANDOM(percent)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user