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:
parent
bd87f5f23b
commit
92362303b8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue