Merge pull request #123 from geeksville/screen

fix missing carriage returns.  thanks to @gregwalters in #119
This commit is contained in:
Kevin Hester 2020-05-02 20:24:03 -07:00 committed by GitHub
commit 29fd8dc7a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,13 @@ class SerialConsole : public StreamAPI, public RedirectablePrint
* debug serial output. * debug serial output.
*/ */
virtual void handleToRadio(const uint8_t *buf, size_t len); virtual void handleToRadio(const uint8_t *buf, size_t len);
virtual size_t write(uint8_t c)
{
if (c == '\n') // prefix any newlines with carriage return
RedirectablePrint::write('\r');
return RedirectablePrint::write(c);
}
}; };
extern SerialConsole console; extern SerialConsole console;