From 38fbc3553524dbb20111ee3d74902f9cebaf5ee9 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sun, 7 Mar 2021 09:55:28 +0000 Subject: [PATCH] Better detection of transceive command --- pttyhandler.cpp | 2 +- wfmain.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pttyhandler.cpp b/pttyhandler.cpp index a255c81..28115f9 100644 --- a/pttyhandler.cpp +++ b/pttyhandler.cpp @@ -183,7 +183,7 @@ void pttyHandler::receiveDataIn() port->commitTransaction(); // filter 1A 05 01 12/27 = C-IV transceive command before forwarding on. - if (inPortData.length() > 7 && (inPortData.mid(4, 4) == QByteArrayLiteral("\x1a\x05\x01\x12") && (inPortData.mid(4, 4) == QByteArrayLiteral("\x1a\x05\x01\x27")))) + if (inPortData.contains(QByteArrayLiteral("\x1a\x05\x01\x12")) || inPortData.contains(QByteArrayLiteral("\x1a\x05\x01\x27"))) { //qDebug(logSerial()) << "Filtered transceive command"; //printHex(inPortData, false, true); diff --git a/wfmain.cpp b/wfmain.cpp index 4b3b94b..ddab534 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -1940,7 +1940,7 @@ void wfmain::receiveFreq(double freqMhz) void wfmain::receivePTTstatus(bool pttOn) { // This is the only place where amTransmitting and the transmit button text should be changed: - qDebug(logSystem()) << "PTT status: " << pttOn; + //qDebug(logSystem()) << "PTT status: " << pttOn; if (pttOn && !amTransmitting) { pttLed->setState(QLedLabel::State::StateError);