1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

Fix </> command for signals

This commit is contained in:
Asbelos 2022-05-18 17:44:41 +01:00
parent 632d777fe7
commit 506b65d0ea
2 changed files with 16 additions and 5 deletions

View File

@ -320,12 +320,22 @@ bool RMFT2::parseSlash(Print * stream, byte & paramCount, int16_t p[]) {
// Now stream the flags
for (int id=0;id<MAX_FLAGS; id++) {
byte flag=flags[id];
if (flag & ~TASK_FLAG) { // not interested in TASK_FLAG only. Already shown above
StringFormatter::send(stream,F("\nflags[%d} "),id);
if (flag & ~TASK_FLAG & ~SIGNAL_MASK) { // not interested in TASK_FLAG only. Already shown above
StringFormatter::send(stream,F("\nflags[%d] "),id);
if (flag & SECTION_FLAG) StringFormatter::send(stream,F(" RESERVED"));
if (flag & LATCH_FLAG) StringFormatter::send(stream,F(" LATCHED"));
}
}
// do the signals
// flags[n] represents the state of the nth signal in the table
for (int id=0;id<MAX_FLAGS; id++) {
byte flag=flags[id] & SIGNAL_MASK;
if (flag==0) break; // no more will be found
VPIN sigid=GETFLASHW(RMFT2::SignalDefinitions+4*id) & (~ SERVO_SIGNAL_FLAG) & (~ACTIVE_HIGH_SIGNAL_FLAG);
StringFormatter::send(stream,F("\nSignal[%d] %S"), sigid,
(flag == SIGNAL_RED)? F("RED") : (flag==SIGNAL_GREEN) ? F("GREEN") : F("AMBER"));
}
StringFormatter::send(stream,F(" *>\n"));
return true;
}

View File

@ -4,9 +4,10 @@
#include "StringFormatter.h"
#define VERSION "4.1.1 rc2"
#define VERSION "4.1.1 rc3"
// 4.1.1 Bugfix: preserve turnout format
// Bugfix: parse multiple commands in one buffer string correct
// Bugfix: </> command signal status in Exrail
// 4.1.0 ...
//
// 4.0.2 EXRAIL additions: