mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
Merge branch 'devel' of https://github.com/DCC-EX/CommandStation-EX into devel
This commit is contained in:
commit
f935756538
@ -115,6 +115,7 @@ Once a new OPCODE is decided upon, update this list.
|
||||
#include "DCCTimer.h"
|
||||
#include "EXRAIL2.h"
|
||||
#include "Turntables.h"
|
||||
#include "version.h"
|
||||
|
||||
// This macro can't be created easily as a portable function because the
|
||||
// flashlist requires a far pointer for high flash access.
|
||||
@ -841,6 +842,9 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
|
||||
|
||||
case '@': // JMRI saying "give me virtual LCD msgs"
|
||||
CommandDistributor::setVirtualLCDSerial(stream);
|
||||
StringFormatter::send(stream,
|
||||
F("<@ 0 0 \"DCC-EX v" VERSION "\">\n"
|
||||
"<@ 0 1 \"Lic GPLv3\">\n"));
|
||||
return;
|
||||
|
||||
default: //anything else will diagnose and drop out to <X>
|
||||
|
@ -932,6 +932,9 @@ void RMFT2::loop2() {
|
||||
case OPCODE_ROUTE_ACTIVE:
|
||||
manageRouteState(operand,1);
|
||||
break;
|
||||
case OPCODE_ROUTE_DISABLED:
|
||||
manageRouteState(operand,4);
|
||||
break;
|
||||
|
||||
case OPCODE_ROUTE:
|
||||
case OPCODE_AUTOMATION:
|
||||
|
@ -69,6 +69,7 @@ enum OPCODE : byte {OPCODE_THROW,OPCODE_CLOSE,
|
||||
OPCODE_LCC,OPCODE_LCCX,OPCODE_ONLCC,
|
||||
OPCODE_ONOVERLOAD,
|
||||
OPCODE_ROUTE_ACTIVE,OPCODE_ROUTE_INACTIVE,OPCODE_ROUTE_HIDDEN,
|
||||
OPCODE_ROUTE_DISABLED,
|
||||
|
||||
// OPcodes below this point are skip-nesting IF operations
|
||||
// placed here so that they may be skipped as a group
|
||||
|
@ -129,6 +129,7 @@
|
||||
#undef ROUTE_ACTIVE
|
||||
#undef ROUTE_INACTIVE
|
||||
#undef ROUTE_HIDDEN
|
||||
#undef ROUTE_DISABLED
|
||||
#undef ROUTE_CAPTION
|
||||
#undef SENDLOCO
|
||||
#undef SEQUENCE
|
||||
@ -274,6 +275,7 @@
|
||||
#define ROUTE_ACTIVE(id)
|
||||
#define ROUTE_INACTIVE(id)
|
||||
#define ROUTE_HIDDEN(id)
|
||||
#define ROUTE_DISABLED(id)
|
||||
#define ROUTE_CAPTION(id,caption)
|
||||
#define SENDLOCO(cab,route)
|
||||
#define SEQUENCE(id)
|
||||
|
@ -108,6 +108,8 @@ void exrailHalSetup() {
|
||||
#define ROUTE_INACTIVE(id) | FEATURE_ROUTESTATE
|
||||
#undef ROUTE_HIDDEN
|
||||
#define ROUTE_HIDDEN(id) | FEATURE_ROUTESTATE
|
||||
#undef ROUTE_DISABLED
|
||||
#define ROUTE_DISABLED(id) | FEATURE_ROUTESTATE
|
||||
#undef ROUTE_CAPTION
|
||||
#define ROUTE_CAPTION(id,caption) | FEATURE_ROUTESTATE
|
||||
|
||||
@ -457,6 +459,7 @@ int RMFT2::onLCCLookup[RMFT2::countLCCLookup];
|
||||
#define ROUTE_ACTIVE(id) OPCODE_ROUTE_ACTIVE,V(id),
|
||||
#define ROUTE_INACTIVE(id) OPCODE_ROUTE_INACTIVE,V(id),
|
||||
#define ROUTE_HIDDEN(id) OPCODE_ROUTE_HIDDEN,V(id),
|
||||
#define ROUTE_DISABLED(id) OPCODE_ROUTE_DISABLED,V(id),
|
||||
#define ROUTE_CAPTION(id,caption) PRINT(caption)
|
||||
#define SENDLOCO(cab,route) OPCODE_SENDLOCO,V(cab),OPCODE_PAD,V(route),
|
||||
#define SEQUENCE(id) OPCODE_SEQUENCE, V(id),
|
||||
|
@ -39,15 +39,18 @@ void StringFormatter::diag( const FSH* input...) {
|
||||
|
||||
void StringFormatter::lcd(byte row, const FSH* input...) {
|
||||
va_list args;
|
||||
Print * virtualLCD=CommandDistributor::getVirtualLCDSerial(0,row);
|
||||
|
||||
// Issue the LCD as a diag first
|
||||
// Unless the same serial is asking for the virtual @ respomnse
|
||||
if (virtualLCD!=&USB_SERIAL) {
|
||||
send(&USB_SERIAL,F("<* LCD%d:"),row);
|
||||
va_start(args, input);
|
||||
send2(&USB_SERIAL,input,args);
|
||||
send(&USB_SERIAL,F(" *>\n"));
|
||||
}
|
||||
|
||||
// send to virtual LCD collector (if any)
|
||||
Print * virtualLCD=CommandDistributor::getVirtualLCDSerial(0,row);
|
||||
if (virtualLCD) {
|
||||
va_start(args, input);
|
||||
send2(virtualLCD,input,args);
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "StringFormatter.h"
|
||||
|
||||
#define VERSION "5.2.3"
|
||||
// 5.2.4 - LCD macro will not do diag if that duplicates @ to same target.
|
||||
// - Added ROUTE_DISABLED macro in EXRAIL
|
||||
// 5.2.3 - Bugfix: Catch stange input to parser
|
||||
// 5.2.2 - Added option to allow MAX_CHARACTER_ROWS to be defined in config.h
|
||||
// 5.2.1 - Trackmanager rework for simpler structure
|
||||
|
Loading…
Reference in New Issue
Block a user