Stop polling after one successful frame read
This commit is contained in:
parent
f78561cef7
commit
17abb57ed6
@ -73,11 +73,7 @@ void VeDirectFrameHandler::loop()
|
||||
unsigned long now = millis();
|
||||
|
||||
if ((millis() - getLastUpdate()) > (_pollInterval * 1000)) {
|
||||
while ( Serial2.available()) {
|
||||
if ((millis() - now) > 500) {
|
||||
now = millis();
|
||||
yield();
|
||||
}
|
||||
while ( Serial2.available() && (getLastUpdate() < now)) {
|
||||
rxData(Serial2.read());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user