auto-sync

This commit is contained in:
rusEfi 2015-02-24 16:04:22 -06:00
parent e737debcc1
commit 6b391fa4e4
1 changed files with 5 additions and 5 deletions

View File

@ -23,9 +23,9 @@
#include "rfiutil.h" #include "rfiutil.h"
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__) #if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
#include "usbcfg.h" #include "usbcfg.h"
#include "usbconsole.h" #include "usbconsole.h"
extern SerialUSBDriver SDU1; extern SerialUSBDriver SDU1;
#endif #endif
int lastWriteSize; int lastWriteSize;
@ -82,7 +82,7 @@ static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size)
if (c < 0 || c == 4) { if (c < 0 || c == 4) {
return TRUE; return TRUE;
} }
if (c == 8) { if (c == 8) {
if (p != line) { if (p != line) {
// backspace // backspace
@ -101,7 +101,7 @@ static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size)
} }
if (c < 0x20) { if (c < 0x20) {
continue; continue;
} }
if (p < line + size - 1) { if (p < line + size - 1) {
consolePutChar((uint8_t) c); consolePutChar((uint8_t) c);
*p++ = (char) c; *p++ = (char) c;