From 4125e73318a7b06a3723c443bc9c56da890b9fcd Mon Sep 17 00:00:00 2001 From: Asbelos Date: Sat, 29 Mar 2025 10:33:36 +0000 Subject: [PATCH 1/4] Fix CLEAR_ALL_STASH --- EXRAIL2MacroReset.h | 2 +- version.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/EXRAIL2MacroReset.h b/EXRAIL2MacroReset.h index 6b6db29..4db69df 100644 --- a/EXRAIL2MacroReset.h +++ b/EXRAIL2MacroReset.h @@ -217,7 +217,7 @@ #define BROADCAST(msg) #define CALL(route) #define CLEAR_STASH(id) -#define CLEAR_ALL_STASH(id) +#define CLEAR_ALL_STASH #define CLOSE(id) #define CONFIGURE_SERVO(vpin,pos1,pos2,profile) #define DCC_SIGNAL(id,add,subaddr) diff --git a/version.h b/version.h index cded291..2199e42 100644 --- a/version.h +++ b/version.h @@ -3,7 +3,8 @@ #include "StringFormatter.h" -#define VERSION "5.4.6" +#define VERSION "5.4.7" +// 5.4.7 - Bugfix: EXRAIL fix CLEAR_ALL_STASH // 5.4.6 - Bugfix: Do not drop further commands in same packet // 5.4.5 - ESP32: Better detection of correct IDF version // - track power is always turned on after setJoin() not by setJoin() From 839ea582a4dbd597e453812e2c8df4d73cf56277 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Mon, 14 Apr 2025 21:14:24 +0200 Subject: [PATCH 2/4] insert idle after speed packet only --- DCC.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/DCC.cpp b/DCC.cpp index a5eafec..454c81b 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -759,7 +759,15 @@ void DCC::issueReminders() { if (!DCCWaveform::mainTrack.isReminderWindowOpen()) return; // Move to next loco slot. If occupied, send a reminder. int reg = lastLocoReminder+1; - if (reg > highestUsedReg) reg = 0; // Go to start of table + if (reg > highestUsedReg) { + if (loopStatus == 0 /*only needed if numLocos == 1 but we do not have a counter*/) { + // insert idle packet in the speed packet loop to fullfill the *censored* + // >5ms between packets to same decoder rule + const byte idlepacket[] = {0xFF, 0x00, 0xFF}; + DCCWaveform::mainTrack.schedulePacket(idlepacket, 3, 0); + } + reg = 0; // Go to start of table + } if (speedTable[reg].loco > 0) { // have found loco to remind if (issueReminder(reg)) From 8aabede3eefbe0f0c41f81488e6b400f05a9e891 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Mon, 14 Apr 2025 21:27:51 +0200 Subject: [PATCH 3/4] treat all function groups equal; remove unused no reminders compile option --- DCC.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/DCC.cpp b/DCC.cpp index 454c81b..5f0cad2 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -788,40 +788,23 @@ bool DCC::issueReminder(int reg) { break; case 1: // remind function group 1 (F0-F4) if (flags & FN_GROUP_1) -#ifndef DISABLE_FUNCTION_REMINDERS setFunctionInternal(loco,0, 128 | ((functions>>1)& 0x0F) | ((functions & 0x01)<<4),0); // 100D DDDD -#else - setFunctionInternal(loco,0, 128 | ((functions>>1)& 0x0F) | ((functions & 0x01)<<4),2); - flags&= ~FN_GROUP_1; // dont send them again -#endif break; case 2: // remind function group 2 F5-F8 if (flags & FN_GROUP_2) -#ifndef DISABLE_FUNCTION_REMINDERS setFunctionInternal(loco,0, 176 | ((functions>>5)& 0x0F),0); // 1011 DDDD -#else - setFunctionInternal(loco,0, 176 | ((functions>>5)& 0x0F),2); - flags&= ~FN_GROUP_2; // dont send them again -#endif break; case 3: // remind function group 3 F9-F12 if (flags & FN_GROUP_3) -#ifndef DISABLE_FUNCTION_REMINDERS setFunctionInternal(loco,0, 160 | ((functions>>9)& 0x0F),0); // 1010 DDDD -#else - setFunctionInternal(loco,0, 160 | ((functions>>9)& 0x0F),2); - flags&= ~FN_GROUP_3; // dont send them again -#endif break; case 4: // remind function group 4 F13-F20 if (flags & FN_GROUP_4) - setFunctionInternal(loco,222, ((functions>>13)& 0xFF),2); - flags&= ~FN_GROUP_4; // dont send them again + setFunctionInternal(loco,222, ((functions>>13)& 0xFF),0); break; case 5: // remind function group 5 F21-F28 if (flags & FN_GROUP_5) - setFunctionInternal(loco,223, ((functions>>21)& 0xFF),2); - flags&= ~FN_GROUP_5; // dont send them again + setFunctionInternal(loco,223, ((functions>>21)& 0xFF),0); break; } loopStatus++; From 8ac61b88d444ff1e8d48e17b590ba383ed591560 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Mon, 14 Apr 2025 21:51:35 +0200 Subject: [PATCH 4/4] version 5.4.8 --- version.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/version.h b/version.h index 2199e42..ccf326c 100644 --- a/version.h +++ b/version.h @@ -3,7 +3,8 @@ #include "StringFormatter.h" -#define VERSION "5.4.7" +#define VERSION "5.4.8" +// 5.4.8 - Bugfix: Insert idle packet at end of speed reminder loop; treat all function groups equal // 5.4.7 - Bugfix: EXRAIL fix CLEAR_ALL_STASH // 5.4.6 - Bugfix: Do not drop further commands in same packet // 5.4.5 - ESP32: Better detection of correct IDF version