Skip to content

Commit

Permalink
Break input parsing loop if new data or error
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerBroker2 authored Sep 15, 2020
1 parent b899d44 commit 7ddd89d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/I2CTransfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ void I2CTransfer::processData(int numBytes)
recChar = classToUse->port->read();
classToUse->bytesRead = classToUse->packet.parse(recChar);
classToUse->status = classToUse->packet.status;

if (classToUse->status != CONTINUE)
break;
}
}

Expand Down

0 comments on commit 7ddd89d

Please sign in to comment.