diff --git a/DCC.cpp b/DCC.cpp index 2ed75f1..0aa623f 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -703,7 +703,7 @@ void DCC::setLocoId(int id,ACK_CALLBACK callback) { } void DCC::setConsistId(int id,bool reverse,ACK_CALLBACK callback) { - if (id<1 || id>10239) { //0x27FF according to standard + if (id<0 || id>10239) { //0x27FF according to standard callback(-1); return; } diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index 6e41473..a8180ec 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -458,7 +458,7 @@ void DCCEXParser::parseOne(Print *stream, byte *com, RingStream * ringStream) DCC::setLocoId(p[0],callback_Wloco); else if (params == 4) // WRITE CV ON PROG DCC::writeCVByte(p[0], p[1], callback_W4); - else if ((params==2 | params==3 ) && p[0]=="CONSIST"_hk ) { + else if ((params==2 || params==3 ) && p[0]=="CONSIST"_hk ) { DCC::setConsistId(p[1],p[2]=="REVERSE"_hk,callback_Wconsist); } else if (params == 2) // WRITE CV ON PROG diff --git a/version.h b/version.h index 2af0a55..a772201 100644 --- a/version.h +++ b/version.h @@ -3,7 +3,9 @@ #include "StringFormatter.h" -#define VERSION "5.2.45" +#define VERSION "5.2.46" +// 5.2.46 - Support for extended consist CV20 in and +// - New cmd to handle long/short consist ids // 5.2.45 - ESP32 Trackmanager reset cab number to 0 when track is not DC // ESP32 fix PWM LEDC inverted pin mode // ESP32 rewrite PWM LEDC to use pin mux