From 60520b59395474e1ed585595325aee90bf0bd79d Mon Sep 17 00:00:00 2001 From: Andy Huska Date: Sat, 17 Sep 2022 12:52:03 -0500 Subject: [PATCH] Added handing of ok message from RAW mode switch coming in out of order with other messages... For now I made it its own else statement so it can be detected --- connections/socketcand.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/connections/socketcand.cpp b/connections/socketcand.cpp index 15db439..20f2ae8 100644 --- a/connections/socketcand.cpp +++ b/connections/socketcand.cpp @@ -402,6 +402,12 @@ void SocketCANd::procRXData(QString data, int busNum) rx_state[busNum] = RAWMODE; decodeFrames(data, busNum); } + else if(data.indexOf("< ok >", 0, Qt::CaseSensitivity::CaseInsensitive) > 0) + { + qDebug() << "Ok found at in middle of compound message, switching to RAW and decoding immediately"; + rx_state[busNum] = RAWMODE; + decodeFrames(data, busNum); + } break; case RAWMODE: decodeFrames(data, busNum);