1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00

Consist version.

This commit is contained in:
Asbelos 2024-04-06 23:49:26 +01:00
parent 3317b4666e
commit 182479c07b
3 changed files with 5 additions and 3 deletions

View File

@ -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;
}

View File

@ -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 <W CV VALUE [CALLBACKNUM] [CALLBACKSUB]>
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 <W CV VALUE>

View File

@ -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 <R> and <W id>
// - New cmd <W CONSIST id [REVERSE]> 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