Removed 'bytesRemaining' check

Slight efficiency improvement. In data mode bytes remaining is always
greater than 0, because the LED count is always set to greater than 0 in
the header setting. When it reaches 0 mode is immediately switched.
This commit is contained in:
David Madison 2017-05-05 07:54:41 -04:00
parent bd87f5f23b
commit 92362303b8
1 changed files with 4 additions and 5 deletions

View File

@ -189,12 +189,11 @@ void headerMode(){
}
void dataMode(){
if(bytesRemaining > 0) {
if (outPos < sizeof(leds)){
dataSet();
}
bytesRemaining--;
if (outPos < sizeof(leds)){
dataSet();
}
bytesRemaining--;
if(bytesRemaining == 0) {
// End of data -- issue latch:
mode = MODE_HEADER; // Begin next header search