From d5978b1578ef461fdd23317ebc4f92ca47f8b00d Mon Sep 17 00:00:00 2001 From: peteGSX Date: Thu, 12 Oct 2023 13:28:39 +1000 Subject: [PATCH] Change broadcast --- CommandDistributor.cpp | 2 +- DCCEXParser.cpp | 12 ++++++------ version.h | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CommandDistributor.cpp b/CommandDistributor.cpp index a521b52..1651771 100644 --- a/CommandDistributor.cpp +++ b/CommandDistributor.cpp @@ -162,7 +162,7 @@ void CommandDistributor::broadcastTurnout(int16_t id, bool isClosed ) { } void CommandDistributor::broadcastTurntable(int16_t id, uint8_t position, bool moving) { - broadcastReply(COMMAND_TYPE, F("\n"), id, position, moving); + broadcastReply(COMMAND_TYPE, F("\n"), id, position, moving); } void CommandDistributor::broadcastClockTime(int16_t time, int8_t rate) { diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index 9cff75a..e53b882 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -60,8 +60,8 @@ Once a new OPCODE is decided upon, update this list. G, h, H, Turnout state broadcast - i, Reserved for future use - Turntable object broadcast - I, Reserved for future use - Turntable object command and control + i, Server details string + I, Turntable object command, control, and broadcast j, Throttle responses J, Throttle queries k, Reserved for future use - Potentially Railcom @@ -1244,7 +1244,7 @@ bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[]) if (tto) { bool type = tto->isEXTT(); uint8_t position = tto->getPosition(); - StringFormatter::send(stream, F("\n"), type, position); + StringFormatter::send(stream, F("\n"), type, position); } else { return false; } @@ -1270,7 +1270,7 @@ bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[]) if (!DCCTurntable::create(p[0])) return false; Turntable *tto = Turntable::get(p[0]); tto->addPosition(0, 0, p[2]); - StringFormatter::send(stream, F("\n")); + StringFormatter::send(stream, F("\n")); } else { if (!tto) return false; if (!tto->isEXTT()) return false; @@ -1287,7 +1287,7 @@ bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[]) if (!EXTTTurntable::create(p[0], (VPIN)p[2])) return false; Turntable *tto = Turntable::get(p[0]); tto->addPosition(0, 0, p[3]); - StringFormatter::send(stream, F("\n")); + StringFormatter::send(stream, F("\n")); } else { return false; } @@ -1301,7 +1301,7 @@ bool DCCEXParser::parseI(Print *stream, int16_t params, int16_t p[]) // tto must exist, no more than 48 positions, angle 0 - 3600 if (!tto || p[2] > 48 || p[4] < 0 || p[4] > 3600) return false; tto->addPosition(p[2], p[3], p[4]); - StringFormatter::send(stream, F("\n")); + StringFormatter::send(stream, F("\n")); } else { return false; } diff --git a/version.h b/version.h index e9e1e79..ee65765 100644 --- a/version.h +++ b/version.h @@ -3,7 +3,8 @@ #include "StringFormatter.h" -#define VERSION "5.1.12" +#define VERSION "5.1.13" +// 5.1.13 - Changed turntable broadcast from i to I due to server string conflict // 5.1.12 - Added Power commands <0 A> & <1 A> etc. and update to <=> // Added EXRAIL SET_POWER(track, ON/OFF) // Fixed a problem whereby <1 MAIN> also powered on PROG track