|
@@ -206,12 +206,9 @@ void MiLightClient::formatPacket(uint8_t* packet, char* buffer) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void MiLightClient::flushPacket() {
|
|
void MiLightClient::flushPacket() {
|
|
|
- Serial.print("Flushing packets");
|
|
|
|
|
-
|
|
|
|
|
PacketStream& stream = formatter->buildPackets();
|
|
PacketStream& stream = formatter->buildPackets();
|
|
|
|
|
|
|
|
while (stream.hasNext()) {
|
|
while (stream.hasNext()) {
|
|
|
- Serial.print(".");
|
|
|
|
|
write(stream.next());
|
|
write(stream.next());
|
|
|
|
|
|
|
|
if (stream.hasNext()) {
|
|
if (stream.hasNext()) {
|
|
@@ -219,7 +216,5 @@ void MiLightClient::flushPacket() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- Serial.println();
|
|
|
|
|
-
|
|
|
|
|
formatter->reset();
|
|
formatter->reset();
|
|
|
}
|
|
}
|