mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
format/indentation change only
This commit is contained in:
parent
1934fdd0e1
commit
b0915e8332
|
@ -42,8 +42,7 @@ void CommandDistributor::parse(byte clientId,byte * buffer, RingStream * stream
|
||||||
if (buffer[0] == '<') {
|
if (buffer[0] == '<') {
|
||||||
clients[clientId]=COMMAND_TYPE;
|
clients[clientId]=COMMAND_TYPE;
|
||||||
DCCEXParser::parse(stream, buffer, ring);
|
DCCEXParser::parse(stream, buffer, ring);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
clients[clientId]=WITHROTTLE_TYPE;
|
clients[clientId]=WITHROTTLE_TYPE;
|
||||||
WiThrottle::getThrottle(clientId)->parse(ring, buffer);
|
WiThrottle::getThrottle(clientId)->parse(ring, buffer);
|
||||||
}
|
}
|
||||||
|
@ -133,5 +132,3 @@ void CommandDistributor::broadcastPower() {
|
||||||
LCD(2,F("Power %S%S"),state=='1'?F("On"):F("Off"),reason);
|
LCD(2,F("Power %S%S"),state=='1'?F("On"):F("Off"),reason);
|
||||||
broadcast(true);
|
broadcast(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -146,8 +146,7 @@ void loop()
|
||||||
static int ramLowWatermark = __INT_MAX__; // replaced on first loop
|
static int ramLowWatermark = __INT_MAX__; // replaced on first loop
|
||||||
|
|
||||||
int freeNow = minimumFreeMemory();
|
int freeNow = minimumFreeMemory();
|
||||||
if (freeNow < ramLowWatermark)
|
if (freeNow < ramLowWatermark) {
|
||||||
{
|
|
||||||
ramLowWatermark = freeNow;
|
ramLowWatermark = freeNow;
|
||||||
LCD(3,F("Free RAM=%5db"), ramLowWatermark);
|
LCD(3,F("Free RAM=%5db"), ramLowWatermark);
|
||||||
}
|
}
|
||||||
|
|
11
RMFT2.cpp
11
RMFT2.cpp
|
@ -431,8 +431,7 @@ RMFT2::RMFT2(int progCtr) {
|
||||||
if (loopTask==NULL) {
|
if (loopTask==NULL) {
|
||||||
loopTask=this;
|
loopTask=this;
|
||||||
next=this;
|
next=this;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
next=loopTask->next;
|
next=loopTask->next;
|
||||||
loopTask->next=this;
|
loopTask->next=this;
|
||||||
}
|
}
|
||||||
|
@ -442,8 +441,11 @@ RMFT2::RMFT2(int progCtr) {
|
||||||
RMFT2::~RMFT2() {
|
RMFT2::~RMFT2() {
|
||||||
driveLoco(1); // ESTOP my loco if any
|
driveLoco(1); // ESTOP my loco if any
|
||||||
setFlag(taskId,0,TASK_FLAG); // we are no longer using this id
|
setFlag(taskId,0,TASK_FLAG); // we are no longer using this id
|
||||||
if (next==this) loopTask=NULL;
|
if (next==this)
|
||||||
else for (RMFT2* ring=next;;ring=ring->next) if (ring->next == this) {
|
loopTask=NULL;
|
||||||
|
else
|
||||||
|
for (RMFT2* ring=next;;ring=ring->next)
|
||||||
|
if (ring->next == this) {
|
||||||
ring->next=next;
|
ring->next=next;
|
||||||
loopTask=next;
|
loopTask=next;
|
||||||
break;
|
break;
|
||||||
|
@ -977,4 +979,3 @@ void RMFT2::emitRouteDescription(Print * stream, char type, int id, const FSH *
|
||||||
StringFormatter::send(stream,F("]\\[%c%d}|{%S}|{%c"),
|
StringFormatter::send(stream,F("]\\[%c%d}|{%S}|{%c"),
|
||||||
type,id,description, type=='R'?'2':'4');
|
type,id,description, type=='R'?'2':'4');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,8 +137,6 @@ void WiThrottle::parse(RingStream * stream, byte * cmdx) {
|
||||||
// allow heartbeat to slow down once all metadata sent
|
// allow heartbeat to slow down once all metadata sent
|
||||||
StringFormatter::send(stream,F("*%d\n"),HEARTBEAT_SECONDS);
|
StringFormatter::send(stream,F("*%d\n"),HEARTBEAT_SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (cmd[0]) {
|
while (cmd[0]) {
|
||||||
|
@ -226,6 +224,7 @@ void WiThrottle::parse(RingStream * stream, byte * cmdx) {
|
||||||
if (*cmd!='\0') cmd++; // skip \r or \n
|
if (*cmd!='\0') cmd++; // skip \r or \n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int WiThrottle::getInt(byte * cmd) {
|
int WiThrottle::getInt(byte * cmd) {
|
||||||
int i=0;
|
int i=0;
|
||||||
while (cmd[0]>='0' && cmd[0]<='9') {
|
while (cmd[0]>='0' && cmd[0]<='9') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user