1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-01 19:45:24 +02:00

Withrottle ->exrail >64k arrays

This commit is contained in:
Asbelos 2022-11-07 12:05:52 +00:00
parent 41b568989a
commit 555e777c81

View File

@ -214,16 +214,20 @@ void WiThrottle::parse(RingStream * stream, byte * cmdx) {
exRailSent=true; exRailSent=true;
#ifdef EXRAIL_ACTIVE #ifdef EXRAIL_ACTIVE
StringFormatter::send(stream,F("PRT]\\[Routes}|{Route]\\[Set}|{2]\\[Handoff}|{4\nPRL")); StringFormatter::send(stream,F("PRT]\\[Routes}|{Route]\\[Set}|{2]\\[Handoff}|{4\nPRL"));
for (byte pass=0;pass<2;pass++) { // first pass automations
// first pass automations, second pass routes.
for (int ix=0;;ix+=2) { for (int ix=0;;ix+=2) {
int16_t id=GETHIGHFLASHW((pass?RMFT2::automationIdList:RMFT2::routeIdList),ix); int16_t id =GETHIGHFLASHW(RMFT2::automationIdList,ix);
if (id==0) break; if (id==0) break;
const FSH * desc=RMFT2::getRouteDescription(id); const FSH * desc=RMFT2::getRouteDescription(id);
StringFormatter::send(stream,F("]\\[%c%d}|{%S}|{%c"), StringFormatter::send(stream,F("]\\[A%d}|{%S}|{4"),id,desc);
pass?'A':'R',id,desc, pass?'4':'2'); }
// second pass routes.
for (int ix=0;;ix+=2) {
int16_t id=GETHIGHFLASHW(RMFT2::routeIdList,ix);
if (id==0) break;
const FSH * desc=RMFT2::getRouteDescription(id);
StringFormatter::send(stream,F("]\\[R%d}|{%S}|{2"),id,desc);
} }
}
StringFormatter::send(stream,F("\n")); StringFormatter::send(stream,F("\n"));
#endif #endif
// allow heartbeat to slow down once all metadata sent // allow heartbeat to slow down once all metadata sent