From ab03393c6cecefb612f996dcfb70f4ae31ecedcc Mon Sep 17 00:00:00 2001 From: Arash Aletayeb Date: Wed, 30 Oct 2024 16:51:41 +0330 Subject: [PATCH] HVA & HVB read from scen params and set into ui --- developHw.pro.user | 2 +- hdf5Scenario/hdf5Scenario.cpp | 8 ++++++++ .../core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h | 1 + mainwindow.cpp | 5 +++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/developHw.pro.user b/developHw.pro.user index 14d25c5..1110efe 100644 --- a/developHw.pro.user +++ b/developHw.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/hdf5Scenario/hdf5Scenario.cpp b/hdf5Scenario/hdf5Scenario.cpp index 22461f6..079f042 100644 --- a/hdf5Scenario/hdf5Scenario.cpp +++ b/hdf5Scenario/hdf5Scenario.cpp @@ -980,6 +980,14 @@ void Hdf5::scenarioRead(ScenHardware& scenParams) /**************** /registerParameters/noiseRejectValue *****************/ datasetBranch("/registerParameters/noiseRejectValue", floatArray); scenParams.hwRegister.noiseRejectValue = static_cast(floatArray[0]); + + /**************** /registerParameters/hva *****************/ + datasetBranch("/registerParameters/hva", floatArray); + scenParams.hva = floatArray[0]; + + /**************** /registerParameters/hvb *****************/ + datasetBranch("/registerParameters/hvb", floatArray); + scenParams.hvb = floatArray[0]; } void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam& prbDepParams) diff --git a/include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h b/include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h index 13fb2ff..695801e 100644 --- a/include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h +++ b/include/model/hardware/core/lowLevelApi/TrxBoardUtils/TrxBoardStructures.h @@ -231,6 +231,7 @@ struct ScenHardware QVector rxBeamFormerNumber; QVector pulseInterval; quint8 frameType; + float hva, hvb; HwRegister hwRegister; HwSramIndex indexParams; diff --git a/mainwindow.cpp b/mainwindow.cpp index b23d241..4358697 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -3093,6 +3093,11 @@ void MainWindow::setScenario(const QString& h5Path) { hdf.scanConversionParamsRead(scanConversionParams); } + + double hva = static_cast(scenParams.hva); + double hvb = static_cast(scenParams.hvb); + ui->tb_hvaDacValue->setText(QString::number(hva, 'g', 3)); + ui->tb_hvbDacValue->setText(QString::number(hvb, 'g', 3)); } catch(SonoException& e) {