skip a few parsing steps if the buffer is empty
This commit is contained in:
parent
32c6ccb60c
commit
ea3bf9e5e8
@ -66,6 +66,8 @@ void DmxWidget::parseMessageBuffer()
|
||||
uint16_t length;
|
||||
const int fixed_length = 5; // start + label + 2xlength + end
|
||||
auto fast_forward = [this](int offset = 0) {
|
||||
if (message_rx_buffer_.isEmpty())
|
||||
return false;
|
||||
if (offset == 0)
|
||||
offset = message_rx_buffer_.indexOf(ENTTEC::Pro::START_DELIMITER);
|
||||
if (offset < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user