mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
Comments correction
This commit is contained in:
parent
57178dac4d
commit
7842166722
|
@ -145,7 +145,7 @@ void DCCEXParser::parse(Print & stream, const byte *com, bool blocking) {
|
||||||
// Convert JMRI bizarre -1=emergency stop, 0-126 as speeds
|
// Convert JMRI bizarre -1=emergency stop, 0-126 as speeds
|
||||||
// to DCC 0=stop, 1= emergency stop, 2-127 speeds
|
// to DCC 0=stop, 1= emergency stop, 2-127 speeds
|
||||||
int tspeed=p[2];
|
int tspeed=p[2];
|
||||||
if (tspeed>126 | tspeed<-1) break; // invalid JMRI speed code
|
if (tspeed>126 || tspeed<-1) break; // invalid JMRI speed code
|
||||||
if (tspeed<0) tspeed=1; // emergency stop DCC speed
|
if (tspeed<0) tspeed=1; // emergency stop DCC speed
|
||||||
else if (tspeed>0) tspeed++; // map 1-126 -> 2-127
|
else if (tspeed>0) tspeed++; // map 1-126 -> 2-127
|
||||||
DCC::setThrottle(p[1],tspeed,p[3]);
|
DCC::setThrottle(p[1],tspeed,p[3]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user