From f22c3b36ef7d855b3ffe2df9c48c7cac724ab58d Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sun, 15 Dec 2024 18:24:27 +0000 Subject: [PATCH] Remove deprecated functions --- usbcontroller.cpp | 31 ------------------------------- usbcontroller.h | 1 - wfmain.cpp | 24 ------------------------ wfmain.h | 3 --- 4 files changed, 59 deletions(-) diff --git a/usbcontroller.cpp b/usbcontroller.cpp index 3938a1c..93be069 100644 --- a/usbcontroller.cpp +++ b/usbcontroller.cpp @@ -2111,37 +2111,6 @@ void usbController::buttonState(QString name, double val) /* End of Gamepad functions*/ - -/* This should be replaced with the cache */ -void usbController::receiveLevel(funcs cmd, quint8 level) -{ - - /* - // Update knob if relevant, step through all devices - QMutexLocker locker(mutex); - - for (auto devIt = devices->begin(); devIt != devices->end(); devIt++) - { - auto dev = &devIt.value(); - - auto kb = std::find_if(knobList->begin(), knobList->end(), [dev, cmd](const KNOB& k) - { return (k.command && dev->connected && k.path == dev->path && k.page == dev->currentPage && k.command->command == cmd);}); - if (kb != knobList->end() && kb->num < dev->knobValues.size()) { - // qInfo(logUsbControl()) << "Received value:" << level << "for knob" << kb->num; - // Set both current and previous knobvalue to the received value - dev->knobValues[kb->num].value = level/dev->sensitivity; - dev->knobValues[kb->num].previous = level/dev->sensitivity; - } - auto bt = std::find_if(buttonList->begin(), buttonList->end(), [dev, cmd](const BUTTON& b) - { return (b.onCommand && dev->connected && b.path == dev->path && b.page == dev->currentPage && b.onCommand->command == cmd && b.led != 0 && b.led <= dev->type.leds);}); - if (bt != buttonList->end()) { - // qInfo(logUsbControl()) << "Received value:" << level << "for led" << bt->led; - QTimer::singleShot(0, this, [=]() { sendRequest(dev,usbFeatureType::featureLEDControl,bt->led,QString("%1").arg(level)); }); - } - } - */ -} - void usbController::backupController(USBDEVICE* dev, QString file) { QMutexLocker locker(mutex); diff --git a/usbcontroller.h b/usbcontroller.h index 624da8d..edc1462 100644 --- a/usbcontroller.h +++ b/usbcontroller.h @@ -236,7 +236,6 @@ public slots: void run(); void runTimer(); void receivePTTStatus(bool on); - void receiveLevel(funcs cmd, quint8 level); void programPages(USBDEVICE* dev, int pages); void programDisable(USBDEVICE* dev, bool disabled); diff --git a/wfmain.cpp b/wfmain.cpp index 3c36aa8..b576ead 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -564,7 +564,6 @@ void wfmain::makeRig() // Repeater, duplex, and split: //connect(rpt, SIGNAL(getDuplexMode()), rig, SLOT(getDuplexMode())); //connect(rpt, SIGNAL(setDuplexMode(duplexMode_t)), rig, SLOT(setDuplexMode(duplexMode_t))); - //connect(rig, SIGNAL(haveDuplexMode(duplexMode_t)), rpt, SLOT(receiveDuplexMode(duplexMode_t))); //connect(this, SIGNAL(getRptDuplexOffset()), rig, SLOT(getRptDuplexOffset())); connect(rig, SIGNAL(haveRptOffsetFrequency(freqt)), rpt, SLOT(handleRptOffsetFrequency(freqt))); @@ -4486,29 +4485,6 @@ void wfmain::receiveModInput(rigInput input, quint8 data) } } -void wfmain::receivePassband(quint16 pass) -{ - double pb = (double)(pass / 1000000.0); - if (receivers.size() && receivers[0]->getPassbandWidth() != pb) { - receivers[0]->setPassbandWidth(pb); - - qDebug(logSystem()) << QString("Received new IF Filter/Passband %0 Hz").arg(pass); - showStatusBarText(QString("IF filter width %0 Hz (%1 MHz)").arg(pass).arg(passbandWidth)); - } -} - -void wfmain::receiveCwPitch(quint8 pitch) { - if (currentModeInfo.mk == modeCW || currentModeInfo.mk == modeCW_R) { - quint16 p = round((((600.0 / 255.0) * pitch) + 300) / 5.0) * 5.0; - if (p != cwPitch) - { - passbandCenterFrequency = p / 2000000.0; - qDebug(logSystem()) << QString("Received new CW Pitch %0 Hz was %1 (center freq %2 MHz)").arg(p).arg(cwPitch).arg(passbandCenterFrequency); - cwPitch = p; - } - } -} - void wfmain::receiveTuningStep(quint8 step) { if (step > 0) diff --git a/wfmain.h b/wfmain.h index eb453a8..2d31cf0 100644 --- a/wfmain.h +++ b/wfmain.h @@ -382,9 +382,6 @@ private slots: void receiveRITStatus(bool ritEnabled); void receiveRITValue(int ritValHz); void receiveModInput(rigInput input, quint8 data); - //void receiveDuplexMode(duplexMode_t dm); - void receivePassband(quint16 pass); - void receiveCwPitch(quint8 pitch); void receiveMonitor(bool en); void receiveTuningStep(quint8 step);