work around the stream operator sometimes not writing the correct bytes

This commit is contained in:
Kevin Matz 2023-04-14 10:19:54 -04:00
parent 107a239287
commit 4242854696

View File

@ -152,8 +152,7 @@ void DmxWidget::sendMessage(std::shared_ptr<ENTTEC::Pro::MessageData> 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));