mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
disable more PROG stuff (JOIN/UNJOIN from EXRAIL)
This commit is contained in:
parent
72d131035e
commit
4eaad2d05b
|
@ -3,7 +3,7 @@
|
||||||
* © 2021 Neil McKechnie
|
* © 2021 Neil McKechnie
|
||||||
* © 2021 Mike S
|
* © 2021 Mike S
|
||||||
* © 2021 Herb Morton
|
* © 2021 Herb Morton
|
||||||
* © 2020-2022 Harald Barth
|
* © 2020-2023 Harald Barth
|
||||||
* © 2020-2021 M Steve Todd
|
* © 2020-2021 M Steve Todd
|
||||||
* © 2020-2021 Fred Decker
|
* © 2020-2021 Fred Decker
|
||||||
* © 2020-2021 Chris Harlow
|
* © 2020-2021 Chris Harlow
|
||||||
|
@ -55,7 +55,6 @@
|
||||||
// These keywords are used in the <1> command. The number is what you get if you use the keyword as a parameter.
|
// These keywords are used in the <1> command. The number is what you get if you use the keyword as a parameter.
|
||||||
// To discover new keyword numbers , use the <$ YOURKEYWORD> command
|
// To discover new keyword numbers , use the <$ YOURKEYWORD> command
|
||||||
const int16_t HASH_KEYWORD_MAIN = 11339;
|
const int16_t HASH_KEYWORD_MAIN = 11339;
|
||||||
const int16_t HASH_KEYWORD_JOIN = -30750;
|
|
||||||
const int16_t HASH_KEYWORD_CABS = -11981;
|
const int16_t HASH_KEYWORD_CABS = -11981;
|
||||||
const int16_t HASH_KEYWORD_RAM = 25982;
|
const int16_t HASH_KEYWORD_RAM = 25982;
|
||||||
const int16_t HASH_KEYWORD_CMD = 9962;
|
const int16_t HASH_KEYWORD_CMD = 9962;
|
||||||
|
@ -64,6 +63,7 @@ const int16_t HASH_KEYWORD_ON = 2657;
|
||||||
const int16_t HASH_KEYWORD_DCC = 6436;
|
const int16_t HASH_KEYWORD_DCC = 6436;
|
||||||
const int16_t HASH_KEYWORD_SLOW = -17209;
|
const int16_t HASH_KEYWORD_SLOW = -17209;
|
||||||
#ifndef DISABLE_PROG
|
#ifndef DISABLE_PROG
|
||||||
|
const int16_t HASH_KEYWORD_JOIN = -30750;
|
||||||
const int16_t HASH_KEYWORD_PROG = -29718;
|
const int16_t HASH_KEYWORD_PROG = -29718;
|
||||||
const int16_t HASH_KEYWORD_PROGBOOST = -6353;
|
const int16_t HASH_KEYWORD_PROGBOOST = -6353;
|
||||||
#endif
|
#endif
|
||||||
|
@ -470,15 +470,15 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
|
||||||
prog=true;
|
prog=true;
|
||||||
}
|
}
|
||||||
if (params==1) {
|
if (params==1) {
|
||||||
if (p[0] == HASH_KEYWORD_JOIN) { // <1 JOIN>
|
if (p[0]==HASH_KEYWORD_MAIN) { // <1 MAIN>
|
||||||
|
main=true;
|
||||||
|
}
|
||||||
|
#ifndef DISABLE_PROG
|
||||||
|
else if (p[0] == HASH_KEYWORD_JOIN) { // <1 JOIN>
|
||||||
main=true;
|
main=true;
|
||||||
prog=true;
|
prog=true;
|
||||||
join=true;
|
join=true;
|
||||||
}
|
}
|
||||||
else if (p[0]==HASH_KEYWORD_MAIN) { // <1 MAIN>
|
|
||||||
main=true;
|
|
||||||
}
|
|
||||||
#ifndef DISABLE_PROG
|
|
||||||
else if (p[0]==HASH_KEYWORD_PROG) { // <1 PROG>
|
else if (p[0]==HASH_KEYWORD_PROG) { // <1 PROG>
|
||||||
prog=true;
|
prog=true;
|
||||||
}
|
}
|
||||||
|
|
16
EXRAIL2.cpp
16
EXRAIL2.cpp
|
@ -705,11 +705,9 @@ void RMFT2::loop2() {
|
||||||
pausingTask=this;
|
pausingTask=this;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifndef DISABLE_PROG
|
|
||||||
case OPCODE_POM:
|
case OPCODE_POM:
|
||||||
if (loco) DCC::writeCVByteMain(loco, operand, getOperand(1));
|
if (loco) DCC::writeCVByteMain(loco, operand, getOperand(1));
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
case OPCODE_POWEROFF:
|
case OPCODE_POWEROFF:
|
||||||
TrackManager::setPower(POWERMODE::OFF);
|
TrackManager::setPower(POWERMODE::OFF);
|
||||||
|
@ -885,18 +883,13 @@ void RMFT2::loop2() {
|
||||||
while(loopTask) loopTask->kill(F("KILLALL"));
|
while(loopTask) loopTask->kill(F("KILLALL"));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifndef DISABLE_PROG
|
||||||
case OPCODE_JOIN:
|
case OPCODE_JOIN:
|
||||||
TrackManager::setPower(POWERMODE::ON);
|
TrackManager::setPower(POWERMODE::ON);
|
||||||
TrackManager::setJoin(true);
|
TrackManager::setJoin(true);
|
||||||
CommandDistributor::broadcastPower();
|
CommandDistributor::broadcastPower();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPCODE_POWERON:
|
|
||||||
TrackManager::setMainPower(POWERMODE::ON);
|
|
||||||
TrackManager::setJoin(false);
|
|
||||||
CommandDistributor::broadcastPower();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case OPCODE_UNJOIN:
|
case OPCODE_UNJOIN:
|
||||||
TrackManager::setJoin(false);
|
TrackManager::setJoin(false);
|
||||||
CommandDistributor::broadcastPower();
|
CommandDistributor::broadcastPower();
|
||||||
|
@ -922,6 +915,13 @@ void RMFT2::loop2() {
|
||||||
forward=true;
|
forward=true;
|
||||||
invert=false;
|
invert=false;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OPCODE_POWERON:
|
||||||
|
TrackManager::setMainPower(POWERMODE::ON);
|
||||||
|
TrackManager::setJoin(false);
|
||||||
|
CommandDistributor::broadcastPower();
|
||||||
|
break;
|
||||||
|
|
||||||
case OPCODE_START:
|
case OPCODE_START:
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,10 +45,10 @@ enum OPCODE : byte {OPCODE_THROW,OPCODE_CLOSE,
|
||||||
OPCODE_RED,OPCODE_GREEN,OPCODE_AMBER,OPCODE_DRIVE,
|
OPCODE_RED,OPCODE_GREEN,OPCODE_AMBER,OPCODE_DRIVE,
|
||||||
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,
|
|
||||||
#ifndef DISABLE_PROG
|
#ifndef DISABLE_PROG
|
||||||
OPCODE_POM,
|
OPCODE_JOIN,OPCODE_UNJOIN,OPCODE_READ_LOCO1,OPCODE_READ_LOCO2,
|
||||||
#endif
|
#endif
|
||||||
|
OPCODE_POM,
|
||||||
OPCODE_START,OPCODE_SETLOCO,OPCODE_SENDLOCO,OPCODE_FORGET,
|
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,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#define GITHUB_SHA "devel-202304231822Z"
|
#define GITHUB_SHA "devel-202304232045Z"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user