1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

Do not send default roster entry on withrottle but on JR

This commit is contained in:
Harald Barth 2023-05-22 22:51:35 +02:00
parent 9478c3263d
commit fdbcbdf418
4 changed files with 9 additions and 8 deletions

View File

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

View File

@ -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"

View File

@ -1 +1 @@
#define GITHUB_SHA "devel-202305221431Z"
#define GITHUB_SHA "devel-202305222043Z"

View File

@ -533,8 +533,9 @@ void WiThrottle::sendRoster(Print* stream) {
StringFormatter::send(stream,F("RL%d"), RMFT2::rosterNameCount);
for (int16_t r=0;r<RMFT2::rosterNameCount;r++) {
int16_t cabid=GETHIGHFLASHW(RMFT2::rosterIdList,r*2);
StringFormatter::send(stream,F("]\\[%S}|{%d}|{%c"),
RMFT2::getRosterName(cabid),cabid,cabid<128?'S':'L');
if (cabid > 0)
StringFormatter::send(stream,F("]\\[%S}|{%d}|{%c"),
RMFT2::getRosterName(cabid),cabid,cabid<128?'S':'L');
}
StringFormatter::send(stream,F("\n"));
#else