1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-28 15:56:33 -04:00

Demod GUI corrections (2)

This commit is contained in:
f4exb 2017-10-12 08:24:21 +02:00
parent f8d06c19fb
commit c1e86afa80
3 changed files with 2 additions and 89 deletions

View File

@ -59,20 +59,6 @@ void NFMDemodGUI::resetToDefaults()
QByteArray NFMDemodGUI::serialize() const
{
return m_settings.serialize();
// SimpleSerializer s(1);
// s.writeS32(1, m_channelMarker.getCenterFrequency());
// s.writeS32(2, ui->rfBW->currentIndex());
// s.writeS32(3, ui->afBW->value());
// s.writeS32(4, ui->volume->value());
// s.writeS32(5, ui->squelch->value());
// s.writeU32(7, m_channelMarker.getColor().rgb());
// s.writeS32(8, ui->ctcss->currentIndex());
// s.writeBool(9, ui->ctcssOn->isChecked());
// s.writeBool(10, ui->audioMute->isChecked());
// s.writeS32(11, ui->squelchGate->value());
// s.writeBool(12, ui->deltaSquelch->isChecked());
// s.writeBlob(13, m_channelMarker.serialize());
// return s.final();
}
bool NFMDemodGUI::deserialize(const QByteArray& data)
@ -85,69 +71,6 @@ bool NFMDemodGUI::deserialize(const QByteArray& data)
resetToDefaults();
return false;
}
// SimpleDeserializer d(data);
//
// if (!d.isValid())
// {
// resetToDefaults();
// return false;
// }
//
// if (d.getVersion() == 1)
// {
// QByteArray bytetmp;
// quint32 u32tmp;
// qint32 tmp;
// bool boolTmp;
//
// blockApplySettings(true);
// m_channelMarker.blockSignals(true);
//
// d.readBlob(13, &bytetmp);
// m_channelMarker.deserialize(bytetmp);
//
// d.readS32(1, &tmp, 0);
// m_channelMarker.setCenterFrequency(tmp);
// d.readS32(2, &tmp, 4);
// ui->rfBW->setCurrentIndex(tmp);
// d.readS32(3, &tmp, 3);
// ui->afBW->setValue(tmp);
// d.readS32(4, &tmp, 20);
// ui->volume->setValue(tmp);
// d.readS32(5, &tmp, -40);
// ui->squelch->setValue(tmp);
//
// if(d.readU32(7, &u32tmp))
// {
// m_channelMarker.setColor(u32tmp);
// }
//
// d.readS32(8, &tmp, 0);
// ui->ctcss->setCurrentIndex(tmp);
// d.readBool(9, &boolTmp, false);
// ui->ctcssOn->setChecked(boolTmp);
// d.readBool(10, &boolTmp, false);
// ui->audioMute->setChecked(boolTmp);
// d.readS32(11, &tmp, 5);
// ui->squelchGate->setValue(tmp);
// d.readBool(12, &boolTmp, false);
// ui->deltaSquelch->setChecked(boolTmp);
//
// this->setWindowTitle(m_channelMarker.getTitle());
// displayUDPAddress();
//
// blockApplySettings(false);
// m_channelMarker.blockSignals(false);
//
// applySettings(true);
// return true;
// }
// else
// {
// resetToDefaults();
// return false;
// }
}
bool NFMDemodGUI::handleMessage(const Message& message __attribute__((unused)))

View File

@ -17,13 +17,6 @@
#include "wfmdemod.h"
const QString WFMDemodGUI::m_channelID = "de.maintech.sdrangelove.channel.wfm";
const int WFMDemodGUI::m_rfBW[] = {
12500, 25000, 40000, 60000, 75000, 80000, 100000, 125000, 140000, 160000, 180000, 200000, 220000, 250000
};
const int WFMDemodGUI::m_nbRfBW = 14;
WFMDemodGUI* WFMDemodGUI::create(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI)
{
WFMDemodGUI* gui = new WFMDemodGUI(pluginAPI, deviceAPI);
@ -167,8 +160,8 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidg
blockApplySettings(true);
ui->rfBW->clear();
for (int i = 0; i < m_nbRfBW; i++) {
ui->rfBW->addItem(QString("%1").arg(m_rfBW[i] / 1000.0, 0, 'f', 2));
for (int i = 0; i < WFMDemodSettings::m_nbRFBW; i++) {
ui->rfBW->addItem(QString("%1").arg(WFMDemodSettings::getRFBW(i) / 1000.0, 0, 'f', 2));
}
ui->rfBW->setCurrentIndex(6);
blockApplySettings(false);

View File

@ -65,9 +65,6 @@ private:
MovingAverage<double> m_channelPowerDbAvg;
MessageQueue m_inputMessageQueue;
static const int m_rfBW[];
static const int m_nbRfBW;
explicit WFMDemodGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* parent = NULL);
virtual ~WFMDemodGUI();