Browse Source

Round-Robin delay related to mps dac is modified.

Some sono exception handling is done.
Functionality of exit app completed.
Arash Aletayeb 12 months ago
parent
commit
5d629f7b8f
  1. 2
      developHw.pro.user
  2. 57
      mainwindow.cpp
  3. 87
      mainwindow.ui
  4. 2
      src/model/hardware/core/lowLevelApi/register/boardsCtrlMngt/BoardsCtrlMngt.cpp

2
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2023-12-04T19:32:47. -->
<!-- Written by QtCreator 4.10.0, 2023-12-06T10:44:17. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

57
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();
}

87
mainwindow.ui

@ -2063,7 +2063,7 @@
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
@ -2081,7 +2081,7 @@
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
@ -2887,7 +2887,7 @@
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
@ -2905,7 +2905,7 @@
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
@ -3276,7 +3276,7 @@
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
@ -3294,7 +3294,7 @@
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
@ -5393,7 +5393,7 @@
<widget class="Line" name="line_2">
<property name="geometry">
<rect>
<x>300</x>
<x>310</x>
<y>30</y>
<width>16</width>
<height>121</height>
@ -5406,9 +5406,9 @@
<widget class="QWidget" name="layoutWidget_10">
<property name="geometry">
<rect>
<x>310</x>
<x>320</x>
<y>30</y>
<width>139</width>
<width>141</width>
<height>21</height>
</rect>
</property>
@ -5432,7 +5432,7 @@
<widget class="QWidget" name="layoutWidget_11">
<property name="geometry">
<rect>
<x>310</x>
<x>320</x>
<y>50</y>
<width>131</width>
<height>21</height>
@ -5458,7 +5458,7 @@
<widget class="QWidget" name="layoutWidget_12">
<property name="geometry">
<rect>
<x>310</x>
<x>320</x>
<y>70</y>
<width>134</width>
<height>21</height>
@ -5484,7 +5484,7 @@
<widget class="QWidget" name="layoutWidget_15">
<property name="geometry">
<rect>
<x>310</x>
<x>320</x>
<y>90</y>
<width>167</width>
<height>21</height>
@ -5510,7 +5510,7 @@
<widget class="QWidget" name="layoutWidget_17">
<property name="geometry">
<rect>
<x>310</x>
<x>320</x>
<y>110</y>
<width>168</width>
<height>21</height>
@ -5562,7 +5562,7 @@
<widget class="QWidget" name="layoutWidget_19">
<property name="geometry">
<rect>
<x>310</x>
<x>320</x>
<y>130</y>
<width>156</width>
<height>21</height>
@ -5588,70 +5588,100 @@
<widget class="QWidget" name="verticalLayoutWidget_14">
<property name="geometry">
<rect>
<x>470</x>
<x>496</x>
<y>30</y>
<width>67</width>
<width>41</width>
<height>134</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_15">
<item>
<widget class="QLabel" name="l_pg12Vin">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;PG_12v&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Unknown</string>
<string>ukn</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_pg5Vin">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;PG_5v&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Unknown</string>
<string>ukn</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_pg3P3">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;PG_3.3v&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Unknown</string>
<string>ukn</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_pg1P8Avdd">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;PG_1.8v Afe A&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Unknown</string>
<string>ukn</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_pg1P8Dvdd">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;PG_1.8v Afe D&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Unknown</string>
<string>ukn</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="l_pgPrbCtrl3P3">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:7pt; font-weight:600; font-style:italic;&quot;&gt;PG_3.3v PrbCtrl&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Unknown</string>
<string>ukn</string>
</property>
</widget>
</item>
@ -5721,6 +5751,9 @@
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
<widget class="QLabel" name="l_statusVec">
<property name="text">
@ -5730,8 +5763,14 @@
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
<widget class="QLabel" name="l_prbDetChg">
<property name="toolTip">
@ -6445,7 +6484,7 @@
<rect>
<x>190</x>
<y>140</y>
<width>149</width>
<width>111</width>
<height>21</height>
</rect>
</property>
@ -6460,7 +6499,7 @@
<item>
<widget class="QLabel" name="l_mpsTemp">
<property name="text">
<string>Unknown</string>
<string>ukn</string>
</property>
</widget>
</item>

2
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

Loading…
Cancel
Save