mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
UDP source plugin: serialize/deserialize new AM formats and AGC setting
This commit is contained in:
parent
0b80971455
commit
f07563500b
@ -81,6 +81,7 @@ void UDPSrcGUI::resetToDefaults()
|
|||||||
ui->volume->setValue(20);
|
ui->volume->setValue(20);
|
||||||
ui->audioActive->setChecked(false);
|
ui->audioActive->setChecked(false);
|
||||||
ui->audioStereo->setChecked(false);
|
ui->audioStereo->setChecked(false);
|
||||||
|
ui->agc->setChecked(false);
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
applySettingsImmediate();
|
applySettingsImmediate();
|
||||||
@ -107,6 +108,7 @@ QByteArray UDPSrcGUI::serialize() const
|
|||||||
s.writeS32(15, m_fmDeviation);
|
s.writeS32(15, m_fmDeviation);
|
||||||
s.writeS32(16, ui->squelch->value());
|
s.writeS32(16, ui->squelch->value());
|
||||||
s.writeS32(17, ui->squelchGate->value());
|
s.writeS32(17, ui->squelchGate->value());
|
||||||
|
s.writeBool(18, ui->agc->isChecked());
|
||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,6 +163,12 @@ bool UDPSrcGUI::deserialize(const QByteArray& data)
|
|||||||
case UDPSrc::FormatAMMono:
|
case UDPSrc::FormatAMMono:
|
||||||
ui->sampleFormat->setCurrentIndex(7);
|
ui->sampleFormat->setCurrentIndex(7);
|
||||||
break;
|
break;
|
||||||
|
case UDPSrc::FormatAMNoDCMono:
|
||||||
|
ui->sampleFormat->setCurrentIndex(8);
|
||||||
|
break;
|
||||||
|
case UDPSrc::FormatAMBPFMono:
|
||||||
|
ui->sampleFormat->setCurrentIndex(9);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ui->sampleFormat->setCurrentIndex(0);
|
ui->sampleFormat->setCurrentIndex(0);
|
||||||
break;
|
break;
|
||||||
@ -197,6 +205,8 @@ bool UDPSrcGUI::deserialize(const QByteArray& data)
|
|||||||
d.readS32(17, &s32tmp, 5);
|
d.readS32(17, &s32tmp, 5);
|
||||||
ui->squelchGate->setValue(s32tmp);
|
ui->squelchGate->setValue(s32tmp);
|
||||||
ui->squelchGateText->setText(tr("%1").arg(s32tmp*10.0, 0, 'f', 0));
|
ui->squelchGateText->setText(tr("%1").arg(s32tmp*10.0, 0, 'f', 0));
|
||||||
|
d.readBool(18, &booltmp, false);
|
||||||
|
ui->agc->setChecked(booltmp);
|
||||||
|
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
m_channelMarker.blockSignals(false);
|
m_channelMarker.blockSignals(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user