mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2025-03-03 13:27:39 +08:00
Check 125k/134k radiobutton when getting lf config
This commit is contained in:
parent
d466e5536b
commit
0738aff2bf
@ -151,6 +151,7 @@ void LF::syncWithUI()
|
||||
ui->LF_LFConf_averagingBox->setChecked(currLFConfig.averaging);
|
||||
ui->LF_LFConf_thresholdBox->setValue(currLFConfig.triggerThreshold);
|
||||
ui->LF_LFConf_skipsBox->setValue(currLFConfig.samplesToSkip);
|
||||
emit LFfreqConfChanged(currLFConfig.divisor, false);
|
||||
}
|
||||
|
||||
void LF::setConfigMap(const QVariantMap& configMap)
|
||||
|
@ -53,7 +53,7 @@ private:
|
||||
void syncWithUI();
|
||||
bool getLFConfig_helper(const QVariantMap& map, QString& str, int* result);
|
||||
signals:
|
||||
|
||||
void LFfreqConfChanged(int divisor, bool isCustomized);
|
||||
};
|
||||
|
||||
#endif // LF_H
|
||||
|
@ -43,6 +43,7 @@ MainWindow::MainWindow(QWidget *parent):
|
||||
mifare = new Mifare(ui, util, this);
|
||||
lf = new LF(ui, util, this);
|
||||
t55xxTab = new T55xxTab(util);
|
||||
connect(lf, &LF::LFfreqConfChanged, this, &MainWindow::onLFfreqConfChanged);
|
||||
connect(t55xxTab, &T55xxTab::setParentGUIState, this, &MainWindow::setState);
|
||||
ui->funcTab->insertTab(2, t55xxTab, tr("T55xx"));
|
||||
|
||||
@ -1511,16 +1512,20 @@ void MainWindow::on_LF_LFConf_freqSlider_valueChanged(int value)
|
||||
onLFfreqConfChanged(value, true);
|
||||
}
|
||||
|
||||
void MainWindow::onLFfreqConfChanged(int value, bool isCustomized)
|
||||
void MainWindow::onLFfreqConfChanged(int divisor, bool isCustomized)
|
||||
{
|
||||
ui->LF_LFConf_freqDivisorBox->blockSignals(true);
|
||||
ui->LF_LFConf_freqSlider->blockSignals(true);
|
||||
|
||||
if(isCustomized)
|
||||
ui->LF_LFConf_freqOtherButton->setChecked(true);
|
||||
ui->LF_LFConf_freqLabel->setText(tr("Actural Freq: ") + QString("%1kHz").arg(LF::divisor2Freq(value), 0, 'f', 3));
|
||||
ui->LF_LFConf_freqDivisorBox->setValue(value);
|
||||
ui->LF_LFConf_freqSlider->setValue(value);
|
||||
else if(divisor == 95)
|
||||
ui->LF_LFConf_freq125kButton->setChecked(true);
|
||||
else if(divisor == 88)
|
||||
ui->LF_LFConf_freq134kButton->setChecked(true);
|
||||
ui->LF_LFConf_freqLabel->setText(tr("Actural Freq: ") + QString("%1kHz").arg(LF::divisor2Freq(divisor), 0, 'f', 3));
|
||||
ui->LF_LFConf_freqDivisorBox->setValue(divisor);
|
||||
ui->LF_LFConf_freqSlider->setValue(divisor);
|
||||
|
||||
ui->LF_LFConf_freqDivisorBox->blockSignals(false);
|
||||
ui->LF_LFConf_freqSlider->blockSignals(false);
|
||||
|
@ -220,6 +220,8 @@ private slots:
|
||||
|
||||
void on_Set_UI_CMDFont_setButton_clicked();
|
||||
|
||||
void onLFfreqConfChanged(int divisor, bool isCustomized);
|
||||
|
||||
private:
|
||||
Ui::MainWindow* ui;
|
||||
QButtonGroup* MFCardTypeBtnGroup;
|
||||
@ -268,7 +270,6 @@ private:
|
||||
void addClientPath(const QString& path);
|
||||
void loadClientPathList();
|
||||
void saveClientPathList();
|
||||
void onLFfreqConfChanged(int value, bool isCustomized);
|
||||
void dockInit();
|
||||
void loadConfig();
|
||||
protected:
|
||||
|
Loading…
x
Reference in New Issue
Block a user