mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-03-10 22:38:45 -04:00
NFM Modulator: save/retrieve CTCSS settings
This commit is contained in:
parent
b0fbf3ac15
commit
f1bfe8962a
@ -89,6 +89,8 @@ void NFMModGUI::resetToDefaults()
|
|||||||
ui->toneFrequency->setValue(100);
|
ui->toneFrequency->setValue(100);
|
||||||
ui->volume->setValue(10);
|
ui->volume->setValue(10);
|
||||||
ui->deltaFrequency->setValue(0);
|
ui->deltaFrequency->setValue(0);
|
||||||
|
ui->ctcssOn->setChecked(false);
|
||||||
|
ui->ctcss->setCurrentIndex(0);
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
applySettings();
|
applySettings();
|
||||||
@ -105,6 +107,8 @@ QByteArray NFMModGUI::serialize() const
|
|||||||
s.writeS32(6, ui->toneFrequency->value());
|
s.writeS32(6, ui->toneFrequency->value());
|
||||||
s.writeS32(7, ui->volume->value());
|
s.writeS32(7, ui->volume->value());
|
||||||
s.writeBlob(8, ui->cwKeyerGUI->serialize());
|
s.writeBlob(8, ui->cwKeyerGUI->serialize());
|
||||||
|
s.writeBool(9, ui->ctcssOn->isChecked());
|
||||||
|
s.writeS32(10, ui->ctcss->currentIndex());
|
||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,6 +127,7 @@ bool NFMModGUI::deserialize(const QByteArray& data)
|
|||||||
QByteArray bytetmp;
|
QByteArray bytetmp;
|
||||||
quint32 u32tmp;
|
quint32 u32tmp;
|
||||||
qint32 tmp;
|
qint32 tmp;
|
||||||
|
bool booltmp;
|
||||||
|
|
||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
m_channelMarker.blockSignals(true);
|
m_channelMarker.blockSignals(true);
|
||||||
@ -148,6 +153,11 @@ bool NFMModGUI::deserialize(const QByteArray& data)
|
|||||||
d.readBlob(8, &bytetmp);
|
d.readBlob(8, &bytetmp);
|
||||||
ui->cwKeyerGUI->deserialize(bytetmp);
|
ui->cwKeyerGUI->deserialize(bytetmp);
|
||||||
|
|
||||||
|
d.readBool(9, &booltmp, false);
|
||||||
|
ui->ctcssOn->setChecked(booltmp);
|
||||||
|
d.readS32(10, &tmp, 0);
|
||||||
|
ui->ctcss->setCurrentIndex(tmp);
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
m_channelMarker.blockSignals(false);
|
m_channelMarker.blockSignals(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user