mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
Bugfix for issue #299 TurnoutDescription NULL
This commit is contained in:
parent
7e16ec7088
commit
1f5eafbcca
|
@ -599,14 +599,19 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream)
|
||||||
else { // <JT id>
|
else { // <JT id>
|
||||||
Turnout * t=Turnout::get(id);
|
Turnout * t=Turnout::get(id);
|
||||||
if (!t || t->isHidden()) StringFormatter::send(stream, F(" %d X"),id);
|
if (!t || t->isHidden()) StringFormatter::send(stream, F(" %d X"),id);
|
||||||
else StringFormatter::send(stream, F(" %d %c \"%S\""),
|
else {
|
||||||
id,t->isThrown()?'T':'C',
|
const FSH *tdesc = NULL;
|
||||||
#ifdef EXRAIL_ACTIVE
|
#ifdef EXRAIL_ACTIVE
|
||||||
RMFT2::getTurnoutDescription(id)
|
tdesc = RMFT2::getTurnoutDescription(id);
|
||||||
#else
|
|
||||||
F("")
|
|
||||||
#endif
|
#endif
|
||||||
);
|
if (tdesc == NULL)
|
||||||
|
StringFormatter::send(stream, F(" %d %c"),
|
||||||
|
id,t->isThrown()?'T':'C');
|
||||||
|
else
|
||||||
|
StringFormatter::send(stream, F(" %d %c \"%S\""),
|
||||||
|
id,t->isThrown()?'T':'C',
|
||||||
|
tdesc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
StringFormatter::send(stream, F(">\n"));
|
StringFormatter::send(stream, F(">\n"));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
#include "StringFormatter.h"
|
#include "StringFormatter.h"
|
||||||
|
|
||||||
#define VERSION "4.1.3"
|
#define VERSION "4.1.4"
|
||||||
|
// 4.1.4 Bugfix for issue #299 TurnoutDescription NULL
|
||||||
// 4.1.3 Bugfix: Ethernet init order
|
// 4.1.3 Bugfix: Ethernet init order
|
||||||
// 4.1.2 Bugfix: Ethernet shield W5100 does not report HW or link level
|
// 4.1.2 Bugfix: Ethernet shield W5100 does not report HW or link level
|
||||||
// 4.1.1 Bugfix: preserve turnout format
|
// 4.1.1 Bugfix: preserve turnout format
|
||||||
|
|
Loading…
Reference in New Issue
Block a user