From 5d629f7b8fa20d08651cf18fe507c17df13c4f96 Mon Sep 17 00:00:00 2001 From: Arash Aletayeb Date: Wed, 6 Dec 2023 10:47:31 +0330 Subject: [PATCH] Round-Robin delay related to mps dac is modified. Some sono exception handling is done. Functionality of exit app completed. --- developHw.pro.user | 2 +- mainwindow.cpp | 57 ++++++------ mainwindow.ui | 87 ++++++++++++++----- .../boardsCtrlMngt/BoardsCtrlMngt.cpp | 2 +- 4 files changed, 97 insertions(+), 51 deletions(-) diff --git a/developHw.pro.user b/developHw.pro.user index 3725ed2..7b2133d 100644 --- a/developHw.pro.user +++ b/developHw.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/mainwindow.cpp b/mainwindow.cpp index 684a9ce..5957c50 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -745,7 +745,7 @@ void MainWindow::getPrbChange() } if(_prb->prbA.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe A eeprom is occured."; + throw SonoException("The crc error of the probe A eeprom is occured."); } } else @@ -783,7 +783,7 @@ void MainWindow::getPrbChange() } if(_prb->prbB.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe B eeprom is occured."; + throw SonoException("The crc error of the probe B eeprom is occured."); } } else @@ -821,7 +821,7 @@ void MainWindow::getPrbChange() } if(_prb->prbC.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe C eeprom is occured."; + throw SonoException("The crc error of the probe C eeprom is occured."); } } else @@ -859,7 +859,7 @@ void MainWindow::getPrbChange() } if(_prb->prbD.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe D eeprom is occured."; + throw SonoException("The crc error of the probe D eeprom is occured."); } } else @@ -1597,7 +1597,7 @@ bool MainWindow::scenarioStartPermission() else { permission = false; - throw "Probe A not connected, so can't be selected."; + throw SonoException("Probe A not connected, so can't be selected."); } } @@ -1610,7 +1610,7 @@ bool MainWindow::scenarioStartPermission() else { permission = false; - throw "Probe B not connected, so can't be selected."; + throw SonoException("Probe B not connected, so can't be selected."); } } @@ -1623,7 +1623,7 @@ bool MainWindow::scenarioStartPermission() else { permission = false; - throw "Probe C not connected, so can't be selected."; + throw SonoException("Probe C not connected, so can't be selected."); } } @@ -1636,7 +1636,7 @@ bool MainWindow::scenarioStartPermission() else { permission = false; - throw "Probe D not connected, so can't be selected."; + throw SonoException("Probe D not connected, so can't be selected."); } } } @@ -1663,6 +1663,8 @@ void MainWindow::on_btn_scenStart_clicked() auto str = ui->btn_scenStart->text(); if(str == "Scenario Start") { + _trx.powerAo(true); + delay(100); if(scenarioStartPermission()) { _trx.preSubBatch = -1; @@ -1694,6 +1696,10 @@ void MainWindow::on_btn_scenStart_clicked() ui->lcd_dmaCounter); } } + else + { + _trx.powerAo(false); + } } else { @@ -3034,7 +3040,7 @@ QByteArray MainWindow::str2ByteArray (QString& str) } else { - throw"Out of range"; + throw SonoException("Out of range"); } } for(quint8 k = 0; k < temp.size() / 2; k++) @@ -3857,7 +3863,7 @@ void MainWindow::on_btn_prbRomIdRead_clicked() ui->tb_prbRomIdRead->setText(uint2IdString(romStatus.id)); if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe A eeprom is occured."; + throw SonoException("The crc error of the probe A eeprom is occured."); } } else @@ -3884,7 +3890,7 @@ void MainWindow::on_btn_prbRomIdRead_clicked() ui->tb_prbRomIdRead->setText(uint2IdString(romStatus.id)); if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe B eeprom is occured."; + throw SonoException("The crc error of the probe B eeprom is occured."); } } else @@ -3911,7 +3917,7 @@ void MainWindow::on_btn_prbRomIdRead_clicked() ui->tb_prbRomIdRead->setText(uint2IdString(romStatus.id)); if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe C eeprom is occured."; + throw SonoException("The crc error of the probe C eeprom is occured."); } } else @@ -3938,7 +3944,7 @@ void MainWindow::on_btn_prbRomIdRead_clicked() ui->tb_prbRomIdRead->setText(uint2IdString(romStatus.id)); if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe D eeprom is occured."; + throw SonoException("The crc error of the probe D eeprom is occured."); } } else @@ -3983,7 +3989,7 @@ void MainWindow::on_btn_prbRomImpulseRead_clicked() ui->tb_prbRomImpulseRead->setText(byteArray2InfoString(receivingArray)); if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe A eeprom is occured."; + throw SonoException("The crc error of the probe A eeprom is occured."); } } else @@ -4012,7 +4018,7 @@ void MainWindow::on_btn_prbRomImpulseRead_clicked() ui->tb_prbRomImpulseRead->setText(byteArray2InfoString(receivingArray)); if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe B eeprom is occured."; + throw SonoException("The crc error of the probe B eeprom is occured."); } } else @@ -4041,7 +4047,7 @@ void MainWindow::on_btn_prbRomImpulseRead_clicked() ui->tb_prbRomImpulseRead->setText(byteArray2InfoString(receivingArray)); if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe C eeprom is occured."; + throw SonoException("The crc error of the probe C eeprom is occured."); } } else @@ -4070,7 +4076,7 @@ void MainWindow::on_btn_prbRomImpulseRead_clicked() ui->tb_prbRomImpulseRead->setText(byteArray2InfoString(receivingArray)); if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe D eeprom is occured."; + throw SonoException("The crc error of the probe D eeprom is occured."); } } else @@ -4259,7 +4265,7 @@ void MainWindow::on_btn_prbRomWriteAll_clicked() if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe A eeprom is occured."; + throw SonoException("The crc error of the probe A eeprom is occured."); } } else @@ -4287,7 +4293,7 @@ void MainWindow::on_btn_prbRomWriteAll_clicked() if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe B eeprom is occured."; + throw SonoException("The crc error of the probe B eeprom is occured."); } } else @@ -4315,7 +4321,7 @@ void MainWindow::on_btn_prbRomWriteAll_clicked() if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe C eeprom is occured."; + throw SonoException("The crc error of the probe C eeprom is occured."); } } else @@ -4343,7 +4349,7 @@ void MainWindow::on_btn_prbRomWriteAll_clicked() if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe D eeprom is occured."; + throw SonoException("The crc error of the probe D eeprom is occured."); } } else @@ -4388,7 +4394,7 @@ void MainWindow::on_btn_prbRomReadAll_clicked() if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe A eeprom is occured."; + throw SonoException("The crc error of the probe A eeprom is occured."); } } else @@ -4416,7 +4422,7 @@ void MainWindow::on_btn_prbRomReadAll_clicked() if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe B eeprom is occured."; + throw SonoException("The crc error of the probe B eeprom is occured."); } } else @@ -4444,7 +4450,7 @@ void MainWindow::on_btn_prbRomReadAll_clicked() if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe C eeprom is occured."; + throw SonoException("The crc error of the probe C eeprom is occured."); } } else @@ -4472,7 +4478,7 @@ void MainWindow::on_btn_prbRomReadAll_clicked() if(romStatus.errorCode == EEPROM_CRC_ERROR) { - throw"The crc error of the probe D eeprom is occured."; + throw SonoException("The crc error of the probe D eeprom is occured."); } } else @@ -5475,6 +5481,7 @@ void MainWindow::exitApp() on_chk_pulserTstModeEn_clicked(false); _trx.setTxDacEnable(BITE_INTERVAL, false); _trx.setAdgCfg(adgGnd); + _trx.mpsReset(); this->QWidget::close(); } diff --git a/mainwindow.ui b/mainwindow.ui index ae9fa43..1a65498 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -2063,7 +2063,7 @@ - 10 + 9 @@ -2081,7 +2081,7 @@ - 10 + 9 @@ -2887,7 +2887,7 @@ - 10 + 9 @@ -2905,7 +2905,7 @@ - 10 + 9 @@ -3276,7 +3276,7 @@ - 10 + 9 @@ -3294,7 +3294,7 @@ - 10 + 9 @@ -5393,7 +5393,7 @@ - 300 + 310 30 16 121 @@ -5406,9 +5406,9 @@ - 310 + 320 30 - 139 + 141 21 @@ -5432,7 +5432,7 @@ - 310 + 320 50 131 21 @@ -5458,7 +5458,7 @@ - 310 + 320 70 134 21 @@ -5484,7 +5484,7 @@ - 310 + 320 90 167 21 @@ -5510,7 +5510,7 @@ - 310 + 320 110 168 21 @@ -5562,7 +5562,7 @@ - 310 + 320 130 156 21 @@ -5588,70 +5588,100 @@ - 470 + 496 30 - 67 + 41 134 + + + 9 + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">PG_12v</span></p></body></html> - Unknown + ukn + + + 9 + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">PG_5v</span></p></body></html> - Unknown + ukn + + + 9 + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">PG_3.3v</span></p></body></html> - Unknown + ukn + + + 9 + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">PG_1.8v Afe A</span></p></body></html> - Unknown + ukn + + + 9 + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">PG_1.8v Afe D</span></p></body></html> - Unknown + ukn + + + 9 + + <html><head/><body><p><span style=" font-size:7pt; font-weight:600; font-style:italic;">PG_3.3v PrbCtrl</span></p></body></html> - Unknown + ukn @@ -5721,6 +5751,9 @@ + + QLayout::SetFixedSize + @@ -5730,8 +5763,14 @@ + + QLayout::SetFixedSize + + + QLayout::SetFixedSize + @@ -6445,7 +6484,7 @@ 190 140 - 149 + 111 21 @@ -6460,7 +6499,7 @@ - Unknown + ukn diff --git a/src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp b/src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp index cd88414..d82bb9f 100644 --- a/src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp +++ b/src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp @@ -680,7 +680,7 @@ void BoardsCtrlMngt::getSupervisorValue(SupervisorRbValue* sValue) const setReadbackCmd(false, false, false); getSupervisorI2cDone(); - timerShot(75); + timerShot(300); //uncrustify off while(!checkTimeout()); //uncrustify on