Merge pull request #123 from geeksville/screen

fix missing carriage returns.  thanks to @gregwalters in #119
pull/128/head
Kevin Hester 2020-05-02 20:24:03 -07:00 zatwierdzone przez GitHub
commit 29fd8dc7a5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -19,6 +19,13 @@ class SerialConsole : public StreamAPI, public RedirectablePrint
* debug serial output.
*/
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;