kopia lustrzana https://github.com/meshtastic/firmware
Merge pull request #1710 from meshtastic/serial-flush
Fix Serial comms with new frameworkpull/1706/head^2
commit
c0bfb979fd
|
@ -20,6 +20,9 @@ void consolePrintf(const char *format, ...)
|
|||
va_start(arg, format);
|
||||
console->vprintf(format, arg);
|
||||
va_end(arg);
|
||||
#ifdef ARCH_ESP32
|
||||
console->flush();
|
||||
#endif
|
||||
}
|
||||
|
||||
SerialConsole::SerialConsole() : StreamAPI(&Port), RedirectablePrint(&Port)
|
||||
|
|
|
@ -103,10 +103,7 @@ void StreamAPI::emitTxBuffer(size_t len)
|
|||
|
||||
auto totalLen = len + HEADER_LEN;
|
||||
stream->write(txBuf, totalLen);
|
||||
/* for(size_t i = 0; i < totalLen; i++) {
|
||||
stream->write(txBuf[i]);
|
||||
// stream->flush();
|
||||
} */
|
||||
stream->flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,4 +130,4 @@ void StreamAPI::onConnectionChanged(bool connected)
|
|||
// received a packet in a while
|
||||
powerFSM.trigger(EVENT_SERIAL_DISCONNECTED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue