From 70cce80995ba3ee178765baf635db0838e3d639c Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 17 Jun 2015 02:35:24 +0200 Subject: [PATCH] NFM demod: save CTCSS settings --- Readme.md | 2 +- plugins/channel/nfm/nfmdemodgui.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 3a3468023..b4af90cec 100644 --- a/Readme.md +++ b/Readme.md @@ -106,7 +106,7 @@ Done since the fork - Corrected the nasty audio band resampling bug preventing use of sample rates that are not power of 2 multiples of 48kHz. This was because the resampling ratio was calculated with an integer division instead of a float division. - As a consequence of the above added more interesting values for the available sampling rates of the BladeRF plugin - Variable span for the SSB demod down to 1.5 kHz - - Filter out CTCSS tones in NFMDemod + - Filter out CTCSS tones for audio and full CTCSS support in NFMDemod ===== To Do diff --git a/plugins/channel/nfm/nfmdemodgui.cpp b/plugins/channel/nfm/nfmdemodgui.cpp index eb6681400..63968be5e 100644 --- a/plugins/channel/nfm/nfmdemodgui.cpp +++ b/plugins/channel/nfm/nfmdemodgui.cpp @@ -58,6 +58,7 @@ QByteArray NFMDemodGUI::serialize() const s.writeS32(5, ui->squelch->value()); //s.writeBlob(6, ui->spectrumGUI->serialize()); s.writeU32(7, m_channelMarker->getColor().rgb()); + s.writeS32(8, ui->ctcss->currentIndex()); return s.final(); } @@ -88,6 +89,8 @@ bool NFMDemodGUI::deserialize(const QByteArray& data) //ui->spectrumGUI->deserialize(bytetmp); if(d.readU32(7, &u32tmp)) m_channelMarker->setColor(u32tmp); + d.readS32(8, &tmp, 0); + ui->ctcss->setCurrentIndex(tmp); applySettings(); return true; } else {