mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
INT16_MAX was missing at more places
This commit is contained in:
parent
951a6637f0
commit
c22d789513
|
@ -266,12 +266,12 @@ void RMFT2::setTurnoutHiddenState(Turnout * t) {
|
|||
char RMFT2::getRouteType(int16_t id) {
|
||||
for (int16_t i=0;;i+=2) {
|
||||
int16_t rid= GETHIGHFLASHW(routeIdList,i);
|
||||
if (rid==0) break;
|
||||
if (rid==INT16_MAX) break;
|
||||
if (rid==id) return 'R';
|
||||
}
|
||||
for (int16_t i=0;;i+=2) {
|
||||
int16_t rid= GETHIGHFLASHW(automationIdList,i);
|
||||
if (rid==0) break;
|
||||
if (rid==INT16_MAX) break;
|
||||
if (rid==id) return 'A';
|
||||
}
|
||||
return 'X';
|
||||
|
|
|
@ -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...) +(cabid == 0 ? 0 : 1)
|
||||
#define ROSTER(cabid,name,funcmap...) +(cabid <= 0 ? 0 : 1)
|
||||
const byte RMFT2::rosterNameCount=0
|
||||
#include "myAutomation.h"
|
||||
;
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define GITHUB_SHA "devel-202305222043Z"
|
||||
#define GITHUB_SHA "devel-202305231659Z"
|
||||
|
|
|
@ -531,11 +531,13 @@ void WiThrottle::sendRoster(Print* stream) {
|
|||
rosterSent=true;
|
||||
#ifdef EXRAIL_ACTIVE
|
||||
StringFormatter::send(stream,F("RL%d"), RMFT2::rosterNameCount);
|
||||
for (int16_t r=0;r<RMFT2::rosterNameCount;r++) {
|
||||
for (int16_t r=0;;r++) {
|
||||
int16_t cabid=GETHIGHFLASHW(RMFT2::rosterIdList,r*2);
|
||||
if (cabid > 0)
|
||||
StringFormatter::send(stream,F("]\\[%S}|{%d}|{%c"),
|
||||
RMFT2::getRosterName(cabid),cabid,cabid<128?'S':'L');
|
||||
else if (cabid == INT16_MAX)
|
||||
break;
|
||||
}
|
||||
StringFormatter::send(stream,F("\n"));
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue
Block a user