Increase uart receive timeout

This commit is contained in:
BlackMark 2020-04-12 00:12:56 +02:00
parent b20d0aced8
commit 355160dedb

View File

@ -21,9 +21,9 @@ struct Message {
uint8_t checksum; 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)) if (serial.rxByte(data))
return true; return true;
} }