diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index e4f270f..cd929e0 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -47,7 +47,7 @@ #define SENDFLASHLIST(stream,flashList) \ for (int16_t i=0;;i+=sizeof(flashList[0])) { \ int16_t value=GETHIGHFLASHW(flashList,i); \ - if (value==0) break; \ + if (value<0) break; \ StringFormatter::send(stream,F(" %d"),value); \ } diff --git a/EXRAILMacros.h b/EXRAILMacros.h index 5e81612..aea997d 100644 --- a/EXRAILMacros.h +++ b/EXRAILMacros.h @@ -81,14 +81,14 @@ void exrailHalSetup() { #define ROUTE(id, description) id, const int16_t HIGHFLASH RMFT2::routeIdList[]= { #include "myAutomation.h" - 0}; + -1}; // Pass 2a create throttle automation list #include "EXRAIL2MacroReset.h" #undef AUTOMATION #define AUTOMATION(id, description) id, const int16_t HIGHFLASH RMFT2::automationIdList[]= { #include "myAutomation.h" - 0}; + -1}; // Pass 3 Create route descriptions: #undef ROUTE @@ -190,7 +190,7 @@ const FSH * RMFT2::getTurnoutDescription(int16_t turnoutid) { // Pass 6: Roster IDs (count) #include "EXRAIL2MacroReset.h" #undef ROSTER -#define ROSTER(cabid,name,funcmap...) +1 +#define ROSTER(cabid,name,funcmap...) +(cabid == 0 ? 0 : 1) const byte RMFT2::rosterNameCount=0 #include "myAutomation.h" ; @@ -201,7 +201,7 @@ const byte RMFT2::rosterNameCount=0 #define ROSTER(cabid,name,funcmap...) cabid, const int16_t HIGHFLASH RMFT2::rosterIdList[]={ #include "myAutomation.h" - 0}; + -1}; // Pass 7: Roster names getter #include "EXRAIL2MacroReset.h" diff --git a/GITHUB_SHA.h b/GITHUB_SHA.h index bc74cd0..01f7c20 100644 --- a/GITHUB_SHA.h +++ b/GITHUB_SHA.h @@ -1 +1 @@ -#define GITHUB_SHA "devel-202305221431Z" +#define GITHUB_SHA "devel-202305222043Z" diff --git a/WiThrottle.cpp b/WiThrottle.cpp index c77c1ef..11a28fb 100644 --- a/WiThrottle.cpp +++ b/WiThrottle.cpp @@ -533,8 +533,9 @@ void WiThrottle::sendRoster(Print* stream) { StringFormatter::send(stream,F("RL%d"), RMFT2::rosterNameCount); for (int16_t r=0;r 0) + StringFormatter::send(stream,F("]\\[%S}|{%d}|{%c"), + RMFT2::getRosterName(cabid),cabid,cabid<128?'S':'L'); } StringFormatter::send(stream,F("\n")); #else