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:
parent
9478c3263d
commit
fdbcbdf418
|
@ -47,7 +47,7 @@
|
||||||
#define SENDFLASHLIST(stream,flashList) \
|
#define SENDFLASHLIST(stream,flashList) \
|
||||||
for (int16_t i=0;;i+=sizeof(flashList[0])) { \
|
for (int16_t i=0;;i+=sizeof(flashList[0])) { \
|
||||||
int16_t value=GETHIGHFLASHW(flashList,i); \
|
int16_t value=GETHIGHFLASHW(flashList,i); \
|
||||||
if (value==0) break; \
|
if (value<0) break; \
|
||||||
StringFormatter::send(stream,F(" %d"),value); \
|
StringFormatter::send(stream,F(" %d"),value); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,14 +81,14 @@ void exrailHalSetup() {
|
||||||
#define ROUTE(id, description) id,
|
#define ROUTE(id, description) id,
|
||||||
const int16_t HIGHFLASH RMFT2::routeIdList[]= {
|
const int16_t HIGHFLASH RMFT2::routeIdList[]= {
|
||||||
#include "myAutomation.h"
|
#include "myAutomation.h"
|
||||||
0};
|
-1};
|
||||||
// Pass 2a create throttle automation list
|
// Pass 2a create throttle automation list
|
||||||
#include "EXRAIL2MacroReset.h"
|
#include "EXRAIL2MacroReset.h"
|
||||||
#undef AUTOMATION
|
#undef AUTOMATION
|
||||||
#define AUTOMATION(id, description) id,
|
#define AUTOMATION(id, description) id,
|
||||||
const int16_t HIGHFLASH RMFT2::automationIdList[]= {
|
const int16_t HIGHFLASH RMFT2::automationIdList[]= {
|
||||||
#include "myAutomation.h"
|
#include "myAutomation.h"
|
||||||
0};
|
-1};
|
||||||
|
|
||||||
// Pass 3 Create route descriptions:
|
// Pass 3 Create route descriptions:
|
||||||
#undef ROUTE
|
#undef ROUTE
|
||||||
|
@ -190,7 +190,7 @@ const FSH * RMFT2::getTurnoutDescription(int16_t turnoutid) {
|
||||||
// Pass 6: Roster IDs (count)
|
// Pass 6: Roster IDs (count)
|
||||||
#include "EXRAIL2MacroReset.h"
|
#include "EXRAIL2MacroReset.h"
|
||||||
#undef ROSTER
|
#undef ROSTER
|
||||||
#define ROSTER(cabid,name,funcmap...) +1
|
#define ROSTER(cabid,name,funcmap...) +(cabid == 0 ? 0 : 1)
|
||||||
const byte RMFT2::rosterNameCount=0
|
const byte RMFT2::rosterNameCount=0
|
||||||
#include "myAutomation.h"
|
#include "myAutomation.h"
|
||||||
;
|
;
|
||||||
|
@ -201,7 +201,7 @@ const byte RMFT2::rosterNameCount=0
|
||||||
#define ROSTER(cabid,name,funcmap...) cabid,
|
#define ROSTER(cabid,name,funcmap...) cabid,
|
||||||
const int16_t HIGHFLASH RMFT2::rosterIdList[]={
|
const int16_t HIGHFLASH RMFT2::rosterIdList[]={
|
||||||
#include "myAutomation.h"
|
#include "myAutomation.h"
|
||||||
0};
|
-1};
|
||||||
|
|
||||||
// Pass 7: Roster names getter
|
// Pass 7: Roster names getter
|
||||||
#include "EXRAIL2MacroReset.h"
|
#include "EXRAIL2MacroReset.h"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#define GITHUB_SHA "devel-202305221431Z"
|
#define GITHUB_SHA "devel-202305222043Z"
|
||||||
|
|
|
@ -533,6 +533,7 @@ void WiThrottle::sendRoster(Print* stream) {
|
||||||
StringFormatter::send(stream,F("RL%d"), RMFT2::rosterNameCount);
|
StringFormatter::send(stream,F("RL%d"), RMFT2::rosterNameCount);
|
||||||
for (int16_t r=0;r<RMFT2::rosterNameCount;r++) {
|
for (int16_t r=0;r<RMFT2::rosterNameCount;r++) {
|
||||||
int16_t cabid=GETHIGHFLASHW(RMFT2::rosterIdList,r*2);
|
int16_t cabid=GETHIGHFLASHW(RMFT2::rosterIdList,r*2);
|
||||||
|
if (cabid > 0)
|
||||||
StringFormatter::send(stream,F("]\\[%S}|{%d}|{%c"),
|
StringFormatter::send(stream,F("]\\[%S}|{%d}|{%c"),
|
||||||
RMFT2::getRosterName(cabid),cabid,cabid<128?'S':'L');
|
RMFT2::getRosterName(cabid),cabid,cabid<128?'S':'L');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user