Merge pull request #3: housekeeping
Cleaned up whitespace and removed obsolete variables and comments.
This commit is contained in:
commit
fc97f13a26
|
@ -53,28 +53,26 @@ void setup()
|
|||
// needs to change, slowing things down tremendously.
|
||||
uint8_t
|
||||
buffer[256],
|
||||
indexIn = 0,
|
||||
indexOut = 0,
|
||||
mode = MODE_HEADER,
|
||||
hi, lo, chk, i, spiFlag;
|
||||
indexIn = 0,
|
||||
indexOut = 0,
|
||||
mode = MODE_HEADER,
|
||||
hi, lo, chk, i;
|
||||
int16_t
|
||||
bytesBuffered = 0,
|
||||
hold = 0,
|
||||
c;
|
||||
c;
|
||||
int32_t
|
||||
bytesRemaining;
|
||||
unsigned long
|
||||
startTime,
|
||||
lastByteTime,
|
||||
lastAckTime,
|
||||
t;
|
||||
int32_t outPos = 0;
|
||||
lastByteTime,
|
||||
lastAckTime,
|
||||
t;
|
||||
int32_t
|
||||
outPos = 0;
|
||||
|
||||
Serial.begin(SPEED); // Teensy/32u4 disregards baud rate; is OK!
|
||||
|
||||
Serial.print("Ada\n"); // Send ACK string to host
|
||||
|
||||
startTime = micros();
|
||||
lastByteTime = lastAckTime = millis();
|
||||
|
||||
// loop() is avoided as even that small bit of function overhead
|
||||
|
@ -156,13 +154,9 @@ void setup()
|
|||
bytesBuffered--;
|
||||
bytesRemaining--;
|
||||
}
|
||||
// If serial buffer is threatening to underrun, start
|
||||
// introducing progressively longer pauses to allow more
|
||||
// data to arrive (up to a point).
|
||||
}
|
||||
else {
|
||||
// End of data -- issue latch:
|
||||
startTime = micros();
|
||||
mode = MODE_HEADER; // Begin next header search
|
||||
FastLED.show();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue