Increase uart receive timeout
This commit is contained in:
parent
b20d0aced8
commit
355160dedb
@ -21,9 +21,9 @@ struct Message {
|
||||
uint8_t checksum;
|
||||
};
|
||||
|
||||
static inline bool receiveByte(uint8_t &data, uint16_t timeout = 1000)
|
||||
static inline bool receiveByte(uint8_t &data, uint32_t timeout = 100000)
|
||||
{
|
||||
for (uint16_t i = 0; i < timeout; ++i) {
|
||||
for (uint32_t i = 0; i < timeout; ++i) {
|
||||
if (serial.rxByte(data))
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user