Send PROTOBUF over serial without delay

This commit is contained in:
Thomas Göttgens 2022-09-21 15:36:17 +02:00 committed by GitHub
parent 0b81a25fda
commit fc729b0cbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,10 +103,7 @@ void StreamAPI::emitTxBuffer(size_t len)
auto totalLen = len + HEADER_LEN; auto totalLen = len + HEADER_LEN;
stream->write(txBuf, totalLen); stream->write(txBuf, totalLen);
/* for(size_t i = 0; i < totalLen; i++) { stream->flush();
stream->write(txBuf[i]);
// stream->flush();
} */
} }
} }
@ -133,4 +130,4 @@ void StreamAPI::onConnectionChanged(bool connected)
// received a packet in a while // received a packet in a while
powerFSM.trigger(EVENT_SERIAL_DISCONNECTED); powerFSM.trigger(EVENT_SERIAL_DISCONNECTED);
} }
} }