From 24a51074d61634fd2f179be0ec709da57c8a68b7 Mon Sep 17 00:00:00 2001 From: Elliott Liggett Date: Sun, 2 Dec 2018 23:16:08 -0800 Subject: [PATCH] Added additional mode command return support because we seem to sometimes get the other formats. --- rigcommander.cpp | 11 ++++++++++- wfmain.cpp | 3 ++- wfview.pro | 1 - 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/rigcommander.cpp b/rigcommander.cpp index 1e0847d..f1c392b 100644 --- a/rigcommander.cpp +++ b/rigcommander.cpp @@ -481,6 +481,14 @@ void rigCommander::parseCommand() //qDebug() << "Have mode data"; this->parseMode(); break; + case '\x05': + //qDebug() << "Have mode data"; + this->parseMode(); + break; + case '\x06': + //qDebug() << "Have mode data"; + this->parseMode(); + break; case '\x14': // read levels parseLevels(); @@ -914,7 +922,8 @@ void rigCommander::parseMode() break; default: qDebug() << "Mode: Unknown: " << payloadIn[01]; - mode = QString("Unk: %1").arg(payloadIn[01]); + printHex(payloadIn, false, true); + mode = QString(""); } emit haveMode(mode); diff --git a/wfmain.cpp b/wfmain.cpp index beab496..3082fa2 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -870,7 +870,8 @@ void wfmain::receiveMode(QString mode) //ui->modeLabel->setText(mode); int index; //bool ok; - index = modes.indexOf(QRegExp(mode)); + index = modes.indexOf(QRegExp(mode)); // find the number corresponding to the mode + qDebug() << "Received mode " << mode << " current mode: " << currentModeIndex << " search index: " << index; if( currentModeIndex == index) { // do nothing, no need to change the selected mode and fire more events off. diff --git a/wfview.pro b/wfview.pro index f769874..59fb1a1 100644 --- a/wfview.pro +++ b/wfview.pro @@ -52,7 +52,6 @@ SOURCES += main.cpp\ rigidentities.cpp HEADERS += wfmain.h \ - ../../../../../usr/include/qcustomplot.h \ commhandler.h \ rigcommander.h \ freqmemory.h \