|
|
@ -108,6 +108,8 @@ void MainWindow::updatePage() { |
|
|
|
uint32_t bias; |
|
|
|
uint32_t division; |
|
|
|
uint32_t multiplication; |
|
|
|
uint32_t cnt; |
|
|
|
// TriInX_setSequentialControlPluseCntMax
|
|
|
|
|
|
|
|
#define UPDATE(index) \
|
|
|
|
src = ExtTriggerSrcType(ui->TriInX_SrcSelect_Val_##index->currentText().toStdString()); \ |
|
|
@ -117,13 +119,15 @@ void MainWindow::updatePage() { |
|
|
|
edge = TriggerEdge(ui->TriInX_TriggerModeTriggerEdge_Val_##index->currentText().toStdString()); \ |
|
|
|
division = ui->TriInX_TriggerModeFreqDivision_Val_##index->text().toUInt(); \ |
|
|
|
multiplication = ui->TriInX_TriggerModeFreqMultiplication_Val_##index->text().toUInt(); \ |
|
|
|
cnt = ui->TriInX_SequentialControlPluseCntMax_Val_##index->text().toUInt(); \ |
|
|
|
DO(m_clstc->TriInX_setSrcSelect(index, src)); \ |
|
|
|
DO(m_clstc->TriInX_setFileterCoefficient(index, coefficient)); \ |
|
|
|
DO(m_clstc->TriInX_setFreqDetectBias(index, bias)); \ |
|
|
|
DO(m_clstc->TriInX_setMode(index, mode)); \ |
|
|
|
DO(m_clstc->TriInX_setTriggerModeTriggerEdge(index, edge)); \ |
|
|
|
DO(m_clstc->TriInX_setTriggerModeFreqDivision(index, division)); \ |
|
|
|
DO(m_clstc->TriInX_setTriggerModeFreqMultiplication(index, multiplication)); |
|
|
|
DO(m_clstc->TriInX_setTriggerModeFreqMultiplication(index, multiplication));\ |
|
|
|
DO(m_clstc->TriInX_setSequentialControlPluseCntMax(index, cnt)); |
|
|
|
|
|
|
|
UPDATE(1); |
|
|
|
UPDATE(2); |
|
|
@ -166,22 +170,25 @@ void MainWindow::updatePage() { |
|
|
|
uint32_t bindstate3; |
|
|
|
uint32_t bindstate4; |
|
|
|
InternalSig sig; |
|
|
|
uint32_t reversal; |
|
|
|
|
|
|
|
#define UPDATE(index) \
|
|
|
|
mode = SigProcessMode(ui->ShutterX_OutputCtrlMode_##index->currentText().toStdString()); \ |
|
|
|
offset = ui->ShutterX_LtEnOffset_##index->text().toUInt(); \ |
|
|
|
bindstate1 = ui->ShutterX_LtEnBind_val1_##index->checkState() == Qt::CheckState::Checked; \ |
|
|
|
bindstate2 = ui->ShutterX_LtEnBind_val2_##index->checkState() == Qt::CheckState::Checked; \ |
|
|
|
bindstate3 = ui->ShutterX_LtEnBind_val3_##index->checkState() == Qt::CheckState::Checked; \ |
|
|
|
bindstate4 = ui->ShutterX_LtEnBind_val4_##index->checkState() == Qt::CheckState::Checked; \ |
|
|
|
sig = InternalSig(ui->ShutterX_InSigSelect_##index->currentText().toStdString()); \ |
|
|
|
DO(m_clstc->ShutterX_setOutputCtrlMode(index, mode)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnOffset(index, offset)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnBind(index, 1, bindstate1)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnBind(index, 2, bindstate2)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnBind(index, 3, bindstate3)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnBind(index, 4, bindstate4)); \ |
|
|
|
DO(m_clstc->ShutterX_setInSigSelect(index, sig)); |
|
|
|
#define UPDATE(index) \
|
|
|
|
mode = SigProcessMode(ui->ShutterX_OutputCtrlMode_##index->currentText().toStdString()); \ |
|
|
|
offset = ui->ShutterX_LtEnOffset_##index->text().toUInt(); \ |
|
|
|
bindstate1 = ui->ShutterX_LtEnBind_val1_##index->checkState() == Qt::CheckState::Checked; \ |
|
|
|
bindstate2 = ui->ShutterX_LtEnBind_val2_##index->checkState() == Qt::CheckState::Checked; \ |
|
|
|
bindstate3 = ui->ShutterX_LtEnBind_val3_##index->checkState() == Qt::CheckState::Checked; \ |
|
|
|
bindstate4 = ui->ShutterX_LtEnBind_val4_##index->checkState() == Qt::CheckState::Checked; \ |
|
|
|
sig = InternalSig(ui->ShutterX_InSigSelect_##index->currentText().toStdString()); \ |
|
|
|
reversal = ui->ShutterX_OutPolarityReversal_##index->checkState() == Qt::CheckState::Checked; \ |
|
|
|
DO(m_clstc->ShutterX_setOutputCtrlMode(index, mode)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnOffset(index, offset)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnBind(index, 1, bindstate1)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnBind(index, 2, bindstate2)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnBind(index, 3, bindstate3)); \ |
|
|
|
DO(m_clstc->ShutterX_setLtEnBind(index, 4, bindstate4)); \ |
|
|
|
DO(m_clstc->ShutterX_setInSigSelect(index, sig)); \ |
|
|
|
DO(m_clstc->ShutterX_setOutPolarityReversal(index, reversal)); |
|
|
|
|
|
|
|
UPDATE(1); |
|
|
|
UPDATE(2); |
|
|
@ -312,26 +319,29 @@ void MainWindow::refreshPage() { |
|
|
|
uint32_t multiplication; |
|
|
|
float infreq; |
|
|
|
float outfreq; |
|
|
|
|
|
|
|
#define UPDATE(index) \
|
|
|
|
DO(m_clstc->TriInX_getSrcSelect(index, src)); \ |
|
|
|
DO(m_clstc->TriInX_getFileterCoefficient(index, coefficient)); \ |
|
|
|
DO(m_clstc->TriInX_getFreqDetectBias(index, bias)); \ |
|
|
|
DO(m_clstc->TriInX_getMode(index, mode)); \ |
|
|
|
DO(m_clstc->TriInX_getTriggerModeTriggerEdge(index, edge)); \ |
|
|
|
DO(m_clstc->TriInX_getTriggerModeFreqDivision(index, division)); \ |
|
|
|
DO(m_clstc->TriInX_getTriggerModeFreqMultiplication(index, multiplication)); \ |
|
|
|
DO(m_clstc->TriInX_readInSignalFreq(index, infreq)); \ |
|
|
|
DO(m_clstc->TriInX_readOutSignalFreq(index, outfreq)); \ |
|
|
|
ui->TriInX_SrcSelect_Val_##index->setCurrentText(QString::fromStdString(src.toString())); \ |
|
|
|
ui->TriInX_FileterCoefficient_Val_##index->setText(QString::number(coefficient)); \ |
|
|
|
ui->TriInX_FreqDetectBias_Val_##index->setText(QString::number(bias)); \ |
|
|
|
ui->TriInX_Mode_Val_##index->setCurrentText(QString::fromStdString(mode.toString())); \ |
|
|
|
ui->TriInX_OutSignalFreq_Val_##index->setText(QString::number(outfreq, 'f', 2)); \ |
|
|
|
ui->TriInX_InSignalFreq_Val_##index->setText(QString::number(infreq, 'f', 2)); \ |
|
|
|
ui->TriInX_TriggerModeFreqDivision_Val_##index->setText(QString::number(division)); \ |
|
|
|
ui->TriInX_TriggerModeFreqMultiplication_Val_##index->setText(QString::number(multiplication)); \ |
|
|
|
ui->TriInX_TriggerModeTriggerEdge_Val_##index->setCurrentText(QString::fromStdString(edge.toString())); |
|
|
|
uint32_t cnt; |
|
|
|
// TriInX_setSequentialControlPluseCntMax
|
|
|
|
#define UPDATE(index) \
|
|
|
|
DO(m_clstc->TriInX_getSrcSelect(index, src)); \ |
|
|
|
DO(m_clstc->TriInX_getFileterCoefficient(index, coefficient)); \ |
|
|
|
DO(m_clstc->TriInX_getFreqDetectBias(index, bias)); \ |
|
|
|
DO(m_clstc->TriInX_getMode(index, mode)); \ |
|
|
|
DO(m_clstc->TriInX_getTriggerModeTriggerEdge(index, edge)); \ |
|
|
|
DO(m_clstc->TriInX_getTriggerModeFreqDivision(index, division)); \ |
|
|
|
DO(m_clstc->TriInX_getTriggerModeFreqMultiplication(index, multiplication)); \ |
|
|
|
DO(m_clstc->TriInX_readInSignalFreq(index, infreq)); \ |
|
|
|
DO(m_clstc->TriInX_readOutSignalFreq(index, outfreq)); \ |
|
|
|
DO(m_clstc->TriInX_getSequentialControlPluseCntMax(index, cnt)); \ |
|
|
|
ui->TriInX_SrcSelect_Val_##index->setCurrentText(QString::fromStdString(src.toString())); \ |
|
|
|
ui->TriInX_FileterCoefficient_Val_##index->setText(QString::number(coefficient)); \ |
|
|
|
ui->TriInX_FreqDetectBias_Val_##index->setText(QString::number(bias)); \ |
|
|
|
ui->TriInX_Mode_Val_##index->setCurrentText(QString::fromStdString(mode.toString())); \ |
|
|
|
ui->TriInX_OutSignalFreq_Val_##index->setText(QString::number(outfreq, 'f', 2)); \ |
|
|
|
ui->TriInX_InSignalFreq_Val_##index->setText(QString::number(infreq, 'f', 2)); \ |
|
|
|
ui->TriInX_TriggerModeFreqDivision_Val_##index->setText(QString::number(division)); \ |
|
|
|
ui->TriInX_TriggerModeFreqMultiplication_Val_##index->setText(QString::number(multiplication)); \ |
|
|
|
ui->TriInX_TriggerModeTriggerEdge_Val_##index->setCurrentText(QString::fromStdString(edge.toString())); \ |
|
|
|
ui->TriInX_SequentialControlPluseCntMax_Val_##index->setText(QString::number(cnt)); |
|
|
|
|
|
|
|
UPDATE(1); |
|
|
|
UPDATE(2); |
|
|
@ -385,6 +395,9 @@ void MainWindow::refreshPage() { |
|
|
|
uint32_t bindstate3; |
|
|
|
uint32_t bindstate4; |
|
|
|
InternalSig sig; |
|
|
|
uint32_t reversal; |
|
|
|
|
|
|
|
// zaf_error_code_t ShutterX_setOutPolarityReversal(int32_t index, uint32_t reversal);
|
|
|
|
|
|
|
|
#define UPDATE(index) \
|
|
|
|
DO(m_clstc->ShutterX_getOutputCtrlMode(index, mode)); \ |
|
|
@ -394,13 +407,15 @@ void MainWindow::refreshPage() { |
|
|
|
DO(m_clstc->ShutterX_getLtEnBind(index, 3, bindstate3)); \ |
|
|
|
DO(m_clstc->ShutterX_getLtEnBind(index, 4, bindstate4)); \ |
|
|
|
DO(m_clstc->ShutterX_getInSigSelect(index, sig)); \ |
|
|
|
DO(m_clstc->ShutterX_getOutPolarityReversal(index, reversal)); \ |
|
|
|
ui->ShutterX_OutputCtrlMode_##index->setCurrentText(QString::fromStdString(mode.toString())); \ |
|
|
|
ui->ShutterX_LtEnOffset_##index->setText(QString::number(offset)); \ |
|
|
|
ui->ShutterX_LtEnBind_val1_##index->setChecked(bindstate1 != 0 ? Qt::CheckState::Checked : Qt::CheckState::Unchecked); \ |
|
|
|
ui->ShutterX_LtEnBind_val2_##index->setChecked(bindstate2 != 0 ? Qt::CheckState::Checked : Qt::CheckState::Unchecked); \ |
|
|
|
ui->ShutterX_LtEnBind_val3_##index->setChecked(bindstate3 != 0 ? Qt::CheckState::Checked : Qt::CheckState::Unchecked); \ |
|
|
|
ui->ShutterX_LtEnBind_val4_##index->setChecked(bindstate4 != 0 ? Qt::CheckState::Checked : Qt::CheckState::Unchecked); \ |
|
|
|
ui->ShutterX_InSigSelect_##index->setCurrentText(QString::fromStdString(sig.toString())); |
|
|
|
ui->ShutterX_InSigSelect_##index->setCurrentText(QString::fromStdString(sig.toString())); \ |
|
|
|
ui->ShutterX_OutPolarityReversal_##index->setChecked(reversal != 0 ? Qt::CheckState::Checked : Qt::CheckState::Unchecked); |
|
|
|
|
|
|
|
// ui->ShutterX_LtEnBind_val1_1->checkState()
|
|
|
|
|
|
|
|