mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-02-16 22:19:14 +01:00
Remove warnings
This commit is contained in:
parent
9e5d780c14
commit
c91d66549c
@ -748,7 +748,7 @@ void RMFT2::loop2() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OPCODE_IFLOCO: // do if the loco is the active one
|
case OPCODE_IFLOCO: // do if the loco is the active one
|
||||||
skipIf=loco!=operand;
|
skipIf=loco!=(uint16_t)operand; // bad luck if someone enters negative loco numbers into EXRAIL
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPCODE_IFNOT: // do next operand if sensor not set
|
case OPCODE_IFNOT: // do next operand if sensor not set
|
||||||
|
@ -135,6 +135,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _loop(unsigned long currentMicros) override {
|
void _loop(unsigned long currentMicros) override {
|
||||||
|
(void)currentMicros; // remove warning
|
||||||
_commandBuffer[0] = EXIORDD;
|
_commandBuffer[0] = EXIORDD;
|
||||||
I2CManager.read(_i2cAddress, _digitalInputStates, _digitalPinBytes, _commandBuffer, 1);
|
I2CManager.read(_i2cAddress, _digitalInputStates, _digitalPinBytes, _commandBuffer, 1);
|
||||||
_commandBuffer[0] = EXIORDAN;
|
_commandBuffer[0] = EXIORDAN;
|
||||||
@ -209,4 +210,4 @@ private:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -525,7 +525,7 @@ void WiThrottle::sendTurnouts(Print* stream) {
|
|||||||
}
|
}
|
||||||
void WiThrottle::sendRoster(Print* stream) {
|
void WiThrottle::sendRoster(Print* stream) {
|
||||||
rosterSent=true;
|
rosterSent=true;
|
||||||
#ifdef EXRAIL_ACTIVE
|
#ifdef EXRAIL_ACTIVE
|
||||||
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);
|
||||||
@ -533,11 +533,13 @@ void WiThrottle::sendRoster(Print* stream) {
|
|||||||
RMFT2::getRosterName(cabid),cabid,cabid<128?'S':'L');
|
RMFT2::getRosterName(cabid),cabid,cabid<128?'S':'L');
|
||||||
}
|
}
|
||||||
StringFormatter::send(stream,F("\n"));
|
StringFormatter::send(stream,F("\n"));
|
||||||
|
#else
|
||||||
|
(void)stream; // remove warning
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void WiThrottle::sendRoutes(Print* stream) {
|
void WiThrottle::sendRoutes(Print* stream) {
|
||||||
routesSent=true;
|
routesSent=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"));
|
||||||
// first pass automations
|
// first pass automations
|
||||||
for (int ix=0;;ix+=2) {
|
for (int ix=0;;ix+=2) {
|
||||||
@ -554,7 +556,8 @@ void WiThrottle::sendRoutes(Print* stream) {
|
|||||||
StringFormatter::send(stream,F("]\\[R%d}|{%S}|{2"),id,desc);
|
StringFormatter::send(stream,F("]\\[R%d}|{%S}|{2"),id,desc);
|
||||||
}
|
}
|
||||||
StringFormatter::send(stream,F("\n"));
|
StringFormatter::send(stream,F("\n"));
|
||||||
|
#else
|
||||||
|
(void)stream; // remove warning
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -609,4 +612,4 @@ void WiThrottle::sendFunctions(Print* stream, byte loco) {
|
|||||||
int fstate=DCC::getFn(locoid,fKey);
|
int fstate=DCC::getFn(locoid,fKey);
|
||||||
if (fstate>=0) StringFormatter::send(stream,F("M%cA%c%d<;>F%d%d\n"),myLocos[loco].throttle,LorS(locoid),locoid,fstate,fKey);
|
if (fstate>=0) StringFormatter::send(stream,F("M%cA%c%d<;>F%d%d\n"),myLocos[loco].throttle,LorS(locoid),locoid,fstate,fKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user