From 424285469696cfe944a5921b59561f9abab1952a Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Fri, 14 Apr 2023 10:19:54 -0400 Subject: [PATCH] work around the stream operator sometimes not writing the correct bytes --- platform/qt/dmxwidget/dmxwidget.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/qt/dmxwidget/dmxwidget.cpp b/platform/qt/dmxwidget/dmxwidget.cpp index e8b0f4a..5a27fd9 100644 --- a/platform/qt/dmxwidget/dmxwidget.cpp +++ b/platform/qt/dmxwidget/dmxwidget.cpp @@ -152,8 +152,7 @@ void DmxWidget::sendMessage(std::shared_ptr msg) const *stream << ENTTEC::Pro::START_DELIMITER; *stream << msg->label; *stream << length; - if (length) - *stream << msg; + msg->oStream(stream); *stream << ENTTEC::Pro::END_DELIMITER; port_->write(buffer, sizeof(buffer));