LF: Support write LF config

When setting LF freq, the "lf config" and "hw setlfdivisor" will both be called.
Change some UI
This commit is contained in:
wh201906
2021-02-23 17:56:16 +08:00
parent 466cd0ecc1
commit 15538a9892
5 changed files with 668 additions and 512 deletions
+24
View File
@@ -1337,5 +1337,29 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
void MainWindow::on_LF_Conf_getButton_clicked()
{
setState(false);
lf->getConfig();
setState(true);
}
void MainWindow::on_LF_Conf_setButton_clicked()
{
LF::Config config;
setState(false);
config.divisor = ui->LF_Conf_freqDivisorBox->value();
config.bitPerSample = ui->LF_Conf_bitPerSampleBox->value();
config.decimation = ui->LF_Conf_decimationBox->value();
config.averaging = ui->LF_Conf_averagingBox->isChecked();
config.triggerThreshold = ui->LF_Conf_thresholdBox->value();
config.samplesToSkip = ui->LF_Conf_skipsBox->value();
lf->setConfig(config);
Util::gotoRawTab();
setState(true);
}
void MainWindow::on_LF_Conf_resetButton_clicked()
{
setState(false);
lf->resetConfig();
setState(true);
}
+4
View File
@@ -199,6 +199,10 @@ private slots:
void on_LF_Conf_getButton_clicked();
void on_LF_Conf_setButton_clicked();
void on_LF_Conf_resetButton_clicked();
private:
Ui::MainWindow* ui;
QButtonGroup* MFCardTypeBtnGroup;
+591 -508
View File
File diff suppressed because it is too large Load Diff