From d4745c93c25cbc36b2f03d511963dea3e4349d99 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 13 Sep 2024 20:14:22 -0700 Subject: [PATCH] Added serial flush to write --- VortexEngine/src/Serial/Serial.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VortexEngine/src/Serial/Serial.cpp b/VortexEngine/src/Serial/Serial.cpp index a3433b79fd..5079e80455 100644 --- a/VortexEngine/src/Serial/Serial.cpp +++ b/VortexEngine/src/Serial/Serial.cpp @@ -81,6 +81,7 @@ void SerialComs::write(const char *msg, ...) Vortex::vcallbacks()->serialWrite(buf, len); #else Serial.write(buf, len); + Serial.flush(); #endif va_end(list); #endif @@ -100,6 +101,7 @@ void SerialComs::write(ByteStream &byteStream) #else Serial.write((const uint8_t *)&size, sizeof(size)); Serial.write((const uint8_t *)byteStream.rawData(), byteStream.rawSize()); + Serial.flush(); #endif #endif }