diff options
author | David Crocker <dcrocker@eschertech.com> | 2017-12-23 20:44:33 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2017-12-23 20:44:33 +0300 |
commit | 01055ad6390f6b81eb71480d01ee38dc336055e0 (patch) | |
tree | c6099a76ee9d22f82e13fc04f539689d81348d4d /src/Platform.cpp | |
parent | 51b64dfeac44ce1e11299df66672eae1bb83d4a0 (diff) |
Version 1.20v1.20
Fixed sending of motor currents to DWC
Immediate LCD messages are now sent in a more timely manner
Clear system paramerters area when uploading new wifi firmware
Baud rates for wifi firmware upload now start at 230400 and end at 9600
Diffstat (limited to 'src/Platform.cpp')
-rw-r--r-- | src/Platform.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Platform.cpp b/src/Platform.cpp index 86f820bb..4c54bc67 100644 --- a/src/Platform.cpp +++ b/src/Platform.cpp @@ -1231,7 +1231,8 @@ void Platform::SendAuxMessage(const char* msg) buf->copy("{\"message\":"); buf->EncodeString(msg, strlen(msg), false, true); buf->cat("}\n"); - Message(LcdMessage, buf); + auxOutput->Push(buf); + FlushAuxMessages(); } } @@ -1310,7 +1311,7 @@ void Platform::SetNetMask(byte nm[]) } // Flush messages to USB and aux, returning true if there is more to send -bool Platform::FlushMessages() +bool Platform::FlushAuxMessages() { // Write non-blocking data to the AUX line OutputBuffer *auxOutputBuffer = auxOutput->GetFirstItem(); @@ -1328,6 +1329,13 @@ bool Platform::FlushMessages() auxOutput->SetFirstItem(auxOutputBuffer); } } + return auxOutput->GetFirstItem() != nullptr; +} + +// Flush messages to USB and aux, returning true if there is more to send +bool Platform::FlushMessages() +{ + const bool auxHasMore = FlushAuxMessages(); #ifdef SERIAL_AUX2_DEVICE // Write non-blocking data to the second AUX line @@ -1375,7 +1383,7 @@ bool Platform::FlushMessages() } } - return auxOutput->GetFirstItem() != nullptr + return auxHasMore #ifdef SERIAL_AUX2_DEVICE || aux2Output->GetFirstItem() != nullptr #endif @@ -3459,7 +3467,7 @@ void Platform::RawMessage(MessageType type, const char *message) logger->LogMessage(realTime, message); } - // Send the nessage to the destinations + // Send the message to the destinations if ((type & ImmediateLcdMessage) != 0) { SendAuxMessage(message); |