Fixed receiving the NUL '\x00' character on Serial

This commit is contained in:
Enrico Pozzobon
2019-11-17 02:52:06 +01:00
parent d4a0f06d05
commit 0cfbfacc40

View File

@@ -187,8 +187,8 @@ uarths_rec_callback(void *ctx)
int data;
auto &driver = *reinterpret_cast<UARTHSClass *>(ctx);
data = uarths_getc();
if(data != 0){
if(data != EOF){
driver._buff->store_char((char)data);
}
return 0;
}
}