Browse Source

change ui

master
Arash Aletayeb 4 years ago
parent
commit
c71d8d0165
  1. 2
      developHw.pro.user
  2. 3
      include/model/hardware/core/TrxBoard.h
  3. 19
      include/model/hardware/core/register/boardsCtrlMngt/BoardsCtrlMngt.h
  4. 81
      mainwindow.cpp
  5. 25
      mainwindow.h
  6. 740
      mainwindow.ui
  7. 7
      src/model/hardware/core/TrxBoard.cpp
  8. 30
      src/model/hardware/core/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, 2021-04-25T23:00:10. -->
<!-- Written by QtCreator 4.10.0, 2021-04-26T22:58:33. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

3
include/model/hardware/core/TrxBoard.h

@ -22,7 +22,7 @@
#define EEPROM_ID_BYTE_BEGIN 0U
#define EEPROM_ID_BYTE_NUMBER 4U
#define EEPROM_INFO_BYTE_BEGIN 100U
#define EEPROM_INFO_BYTE_BEGIN 10U
#define EEPROM_INFO_BYTE_NUMBER 5U
@ -53,6 +53,7 @@ class TrxBoard
{
private:
QVector<quint8> _swapVec;
QList<quint32>* _mcsList;
const quint32 _offsetSlave0;
const quint32 _offsetSlave1;
const quint32 _offsetSlave2;

19
include/model/hardware/core/register/boardsCtrlMngt/BoardsCtrlMngt.h

@ -3,6 +3,7 @@
#include <QObject>
#include <QTimer>
#include <QString>
#include "registerDefinition/BoardsSpecs.h"
#define TRX_ROM_MAX_LEN 131072U
@ -159,7 +160,7 @@ private:
VoltagesPg* _pg;
template<class T1, class T2>
void eepromWrite (QByteArray& arr, quint32 addr, quint8 prbSel, T1* request, T2* status);
void eepromWrite (QString& str, quint32 addr, quint8 prbSel, T1* request, T2* status);
template<class T3>
void setEepromWrite (EepromReq* _rom, T3* request);
@ -229,10 +230,10 @@ private:
void setSetupCmdDacsOnOff(bool cwd, bool hvb, bool hva) const;
void setMpsDacsValue (MpsDacs* _mpsDacs) const;
friend void trxEepromWrite(QByteArray& array, quint32 address, BoardsCtrlMngt* boards);
friend void mpsEepromWrite(QByteArray& array, quint32 address, BoardsCtrlMngt* boards);
friend void prbCtrlEepromWrite (QByteArray& array, quint32 address, BoardsCtrlMngt* boards);
friend void prbEepromWrite (QByteArray& array, quint32 address, quint8 prbSel, BoardsCtrlMngt* boards);
friend void trxEepromWrite(QString str, quint32 address, BoardsCtrlMngt* boards);
friend void mpsEepromWrite(QString str, quint32 address, BoardsCtrlMngt* boards);
friend void prbCtrlEepromWrite (QString str, quint32 address, BoardsCtrlMngt* boards);
friend void prbEepromWrite (QString str, quint32 address, quint8 prbSel, BoardsCtrlMngt* boards);
void timerShot (quint16 ms) const;
void timerStop (void) const;
@ -276,9 +277,9 @@ public:
};
void trxEepromWrite (QByteArray& array, quint32 address, BoardsCtrlMngt* boards);
void mpsEepromWrite (QByteArray& array, quint32 address, BoardsCtrlMngt* boards);
void prbCtrlEepromWrite (QByteArray& array, quint32 address, BoardsCtrlMngt* boards);
void prbEepromWrite (QByteArray& array, quint32 address, quint8 prbSel, BoardsCtrlMngt* boards);
void trxEepromWrite (QString str, quint32 address, BoardsCtrlMngt* boards);
void mpsEepromWrite (QString str, quint32 address, BoardsCtrlMngt* boards);
void prbCtrlEepromWrite (QString str, quint32 address, BoardsCtrlMngt* boards);
void prbEepromWrite (QString str, quint32 address, quint8 prbSel, BoardsCtrlMngt* boards);
#endif // BOARDSCTRLMNGT_H

81
mainwindow.cpp

@ -78,7 +78,7 @@ MainWindow::MainWindow(QWidget *parent)
ui->btn_pwr4OnOff->setText(PWR4_ON);
ui->btn_pllClkSt->setText(ON);
ui->btn_pllClkTps->setText(ON);
ui->btn_mulDacTrig->setText(TRIG_ON);
//ui->btn_mulDacTrig->setText(TRIG_ON);
ui->btn_thsdStateUpdate->setText(THSD_State_Update);
ui->btn_pwrDacsEnable->setText(VALID);
ui->btn_hvRegulatorConfig->setText(ENABLE);
@ -2819,3 +2819,82 @@ void MainWindow::on_btn_setAtgcMode_clicked()
else
trx.setAtgcMode(Manual, static_cast<quint16>(aTgcValue));
}
void MainWindow::on_btn_trxRomWrite_clicked()
{
QString txtStr = ui->tb_trxRomWrite->toPlainText();
trxEepromWrite(txtStr, 0, _bCtrl);
}
void MainWindow::on_btn_trxRomIdRead_clicked()
{
quint32 id = trx.trxId();
ui->tb_trxRomIdRead->setText(QString::number(id, 16));
}
void MainWindow::on_btn_trxRomInfoRead_clicked()
{
QString infoStr = trx.trxInfo();
ui->tb_trxRomInfoRead->setText(infoStr);
}
void MainWindow::on_btn_mpsRomWrite_clicked()
{
QString txtStr = ui->tb_mpsRomWrite->toPlainText();
mpsEepromWrite(txtStr, 0, _bCtrl);
}
void MainWindow::on_btn_mpsRomIdRead_clicked()
{
quint32 id = trx.mpsId();
ui->tb_mpsRomIdRead->setText(QString::number(id, 16));
}
void MainWindow::on_btn_mpsRomInfoRead_clicked()
{
QString infoStr = trx.mpsInfo();
ui->tb_mpsRomInfoRead->setText(infoStr);
}
void MainWindow::on_btn_prbCtrlRomWrite_clicked()
{
QString txtStr = ui->tb_prbCtrlRomWrite->toPlainText();
prbCtrlEepromWrite(txtStr, 0, _bCtrl);
}
void MainWindow::on_btn_prbCtrlRomIdRead_clicked()
{
quint32 id = trx.prbCtrlId();
ui->tb_prbCtrlRomIdRead->setText(QString::number(id, 16));
}
void MainWindow::on_btn_prbCtrlRomInfoRead_clicked()
{
QString infoStr = trx.prbCtrlInfo();
ui->tb_prbCtrlRomInfoRead->setText(infoStr);
}
void MainWindow::on_btn_prbRomWrite_clicked()
{
auto sel = ui->cb_prbSelRom->currentIndex();
QString txtStr = ui->tb_prbRomWrite->toPlainText();
prbEepromWrite(txtStr, 0, static_cast<quint8>(sel), _bCtrl);
}
void MainWindow::on_btn_prbRomIdRead_clicked()
{
auto sel = ui->cb_prbSelRom->currentIndex();
quint32 id = trx.prbId(static_cast<quint8>(sel));
ui->tb_prbRomIdRead->setText(QString::number(id, 16));
}
void MainWindow::on_btn_prbRomInfoRead_clicked()
{
auto sel = ui->cb_prbSelRom->currentIndex();
QString infoStr = trx.prbInfo(static_cast<quint8>(sel));
ui->tb_prbRomInfoRead->setText(infoStr);
}

25
mainwindow.h

@ -4,6 +4,7 @@
#include <QTimer>
#include <QLabel>
#include <QList>
#include <QString>
#include <QDebug>
#include <QSettings>
#include <QtConcurrent/QtConcurrent>
@ -313,6 +314,30 @@ private slots:
void on_btn_setAtgcMode_clicked();
void on_btn_trxRomWrite_clicked();
void on_btn_trxRomIdRead_clicked();
void on_btn_trxRomInfoRead_clicked();
void on_btn_mpsRomWrite_clicked();
void on_btn_mpsRomIdRead_clicked();
void on_btn_mpsRomInfoRead_clicked();
void on_btn_prbCtrlRomWrite_clicked();
void on_btn_prbCtrlRomIdRead_clicked();
void on_btn_prbCtrlRomInfoRead_clicked();
void on_btn_prbRomWrite_clicked();
void on_btn_prbRomIdRead_clicked();
void on_btn_prbRomInfoRead_clicked();
signals:
// void updateBlockProgressValue(int percentage, QProgressBar* prg);
// void updateFpgaProgressValue(int percentage);

740
mainwindow.ui

@ -17,14 +17,17 @@
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>10</x>
<x>0</x>
<y>9</y>
<width>751</width>
<height>271</height>
<width>811</width>
<height>311</height>
</rect>
</property>
<property name="toolTip">
<string/>
</property>
<property name="currentIndex">
<number>1</number>
<number>2</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@ -291,7 +294,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>140</y>
<y>150</y>
<width>741</width>
<height>105</height>
</rect>
@ -672,7 +675,7 @@
<property name="geometry">
<rect>
<x>20</x>
<y>160</y>
<y>180</y>
<width>551</width>
<height>80</height>
</rect>
@ -751,66 +754,547 @@
</widget>
</widget>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>E2PROMs</string>
</attribute>
<widget class="QGroupBox" name="groupBox_5">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>791</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>TRX</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget_61">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>291</width>
<height>72</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_42">
<item>
<widget class="QLabel" name="label_35">
<property name="text">
<string>Text: </string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="tb_trxRomWrite">
<property name="toolTip">
<string extracomment="Write TRX text"/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_trxRomWrite">
<property name="text">
<string>Write</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_62">
<property name="geometry">
<rect>
<x>310</x>
<y>20</y>
<width>181</width>
<height>51</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_43">
<item>
<widget class="QLabel" name="label_48">
<property name="text">
<string>ID: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_trxRomIdRead">
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_trxRomIdRead">
<property name="text">
<string>Read</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_63">
<property name="geometry">
<rect>
<x>510</x>
<y>20</y>
<width>281</width>
<height>72</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_55">
<item>
<widget class="QLabel" name="label_51">
<property name="text">
<string>Info:</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="tb_trxRomInfoRead">
<property name="toolTip">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_trxRomInfoRead">
<property name="text">
<string>Read</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_9">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>791</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>MPS</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget_67">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>291</width>
<height>72</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_92">
<item>
<widget class="QLabel" name="label_85">
<property name="text">
<string>Text: </string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="tb_mpsRomWrite">
<property name="toolTip">
<string extracomment="Write MPS text"/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_mpsRomWrite">
<property name="text">
<string>Write</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_68">
<property name="geometry">
<rect>
<x>310</x>
<y>20</y>
<width>181</width>
<height>51</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_93">
<item>
<widget class="QLabel" name="label_86">
<property name="text">
<string>ID: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_mpsRomIdRead">
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_mpsRomIdRead">
<property name="text">
<string>Read</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_69">
<property name="geometry">
<rect>
<x>510</x>
<y>20</y>
<width>281</width>
<height>72</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_94">
<item>
<widget class="QLabel" name="label_87">
<property name="text">
<string>Info:</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="tb_mpsRomInfoRead">
<property name="toolTip">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_mpsRomInfoRead">
<property name="text">
<string>Read</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_10">
<property name="geometry">
<rect>
<x>10</x>
<y>140</y>
<width>791</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>ProbeCtrl</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget_70">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>291</width>
<height>72</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_95">
<item>
<widget class="QLabel" name="label_88">
<property name="text">
<string>Text: </string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="tb_prbCtrlRomWrite">
<property name="toolTip">
<string extracomment="Write probe control text"/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_prbCtrlRomWrite">
<property name="text">
<string>Write</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_71">
<property name="geometry">
<rect>
<x>310</x>
<y>20</y>
<width>181</width>
<height>51</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_96">
<item>
<widget class="QLabel" name="label_89">
<property name="text">
<string>ID: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_prbCtrlRomIdRead">
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_prbCtrlRomIdRead">
<property name="text">
<string>Read</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_72">
<property name="geometry">
<rect>
<x>510</x>
<y>20</y>
<width>281</width>
<height>72</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_97">
<item>
<widget class="QLabel" name="label_90">
<property name="text">
<string>Info:</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="tb_prbCtrlRomInfoRead">
<property name="toolTip">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_prbCtrlRomInfoRead">
<property name="text">
<string>Read</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_11">
<property name="geometry">
<rect>
<x>10</x>
<y>210</y>
<width>791</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>Probe</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget_73">
<property name="geometry">
<rect>
<x>100</x>
<y>20</y>
<width>251</width>
<height>72</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_98">
<item>
<widget class="QLabel" name="label_91">
<property name="text">
<string>Text: </string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="tb_prbRomWrite">
<property name="toolTip">
<string extracomment="Write probe text"/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_prbRomWrite">
<property name="text">
<string>Write</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_74">
<property name="geometry">
<rect>
<x>360</x>
<y>20</y>
<width>181</width>
<height>51</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_99">
<item>
<widget class="QLabel" name="label_92">
<property name="text">
<string>ID: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_prbRomIdRead">
<property name="text">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_prbRomIdRead">
<property name="text">
<string>Read</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_75">
<property name="geometry">
<rect>
<x>550</x>
<y>20</y>
<width>241</width>
<height>72</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_100">
<item>
<widget class="QLabel" name="label_93">
<property name="text">
<string>Info:</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="tb_prbRomInfoRead">
<property name="toolTip">
<string/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_prbRomInfoRead">
<property name="text">
<string>Read</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QComboBox" name="cb_prbSelRom">
<property name="geometry">
<rect>
<x>10</x>
<y>40</y>
<width>79</width>
<height>23</height>
</rect>
</property>
<property name="toolTip">
<string comment="Probe Select"/>
</property>
<item>
<property name="text">
<string>A</string>
</property>
</item>
<item>
<property name="text">
<string>B</string>
</property>
</item>
<item>
<property name="text">
<string>C</string>
</property>
</item>
<item>
<property name="text">
<string>D</string>
</property>
</item>
</widget>
<widget class="QLabel" name="label_23">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>65</width>
<height>15</height>
</rect>
</property>
<property name="text">
<string>Prb Select:</string>
</property>
</widget>
</widget>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_6">
<property name="geometry">
<rect>
<x>0</x>
<y>280</y>
<width>821</width>
<height>231</height>
<y>330</y>
<width>811</width>
<height>181</height>
</rect>
</property>
<property name="title">
<string>TRX Board</string>
</property>
<widget class="QWidget" name="layoutWidget_3">
<property name="geometry">
<rect>
<x>0</x>
<y>30</y>
<width>299</width>
<height>27</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_28">
<item>
<widget class="QLabel" name="label_23">
<property name="text">
<string>Mul DAC:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_mlDac"/>
</item>
<item>
<widget class="QPushButton" name="btn_mulDacTrig">
<property name="text">
<string>PushButton</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="Line" name="line_3">
<property name="geometry">
<rect>
<x>0</x>
<y>60</y>
<width>751</width>
<height>16</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QWidget" name="layoutWidget_4">
<property name="geometry">
<rect>
<x>380</x>
<y>70</y>
<y>20</y>
<width>371</width>
<height>27</height>
</rect>
@ -839,7 +1323,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>70</y>
<y>20</y>
<width>371</width>
<height>27</height>
</rect>
@ -868,7 +1352,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>100</y>
<y>40</y>
<width>751</width>
<height>20</height>
</rect>
@ -881,7 +1365,7 @@
<property name="geometry">
<rect>
<x>300</x>
<y>120</y>
<y>50</y>
<width>16</width>
<height>111</height>
</rect>
@ -893,17 +1377,17 @@
<widget class="QWidget" name="layoutWidget_5">
<property name="geometry">
<rect>
<x>580</x>
<y>30</y>
<width>234</width>
<height>27</height>
<x>540</x>
<y>130</y>
<width>166</width>
<height>17</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="label12">
<property name="text">
<string>TRX Board Temperature:</string>
<string>On Board Temp:</string>
</property>
</widget>
</item>
@ -920,7 +1404,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>120</y>
<y>50</y>
<width>126</width>
<height>19</height>
</rect>
@ -946,7 +1430,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>150</y>
<y>70</y>
<width>139</width>
<height>19</height>
</rect>
@ -972,7 +1456,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>180</y>
<y>90</y>
<width>139</width>
<height>19</height>
</rect>
@ -998,7 +1482,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>210</y>
<y>110</y>
<width>139</width>
<height>19</height>
</rect>
@ -1024,7 +1508,7 @@
<property name="geometry">
<rect>
<x>160</x>
<y>180</y>
<y>90</y>
<width>141</width>
<height>25</height>
</rect>
@ -1043,7 +1527,7 @@
<property name="geometry">
<rect>
<x>320</x>
<y>120</y>
<y>50</y>
<width>191</width>
<height>19</height>
</rect>
@ -1069,7 +1553,7 @@
<property name="geometry">
<rect>
<x>320</x>
<y>140</y>
<y>70</y>
<width>191</width>
<height>19</height>
</rect>
@ -1095,7 +1579,7 @@
<property name="geometry">
<rect>
<x>320</x>
<y>160</y>
<y>90</y>
<width>191</width>
<height>19</height>
</rect>
@ -1121,7 +1605,7 @@
<property name="geometry">
<rect>
<x>320</x>
<y>180</y>
<y>110</y>
<width>191</width>
<height>19</height>
</rect>
@ -1147,7 +1631,7 @@
<property name="geometry">
<rect>
<x>320</x>
<y>200</y>
<y>130</y>
<width>191</width>
<height>21</height>
</rect>
@ -1173,7 +1657,7 @@
<property name="geometry">
<rect>
<x>540</x>
<y>120</y>
<y>50</y>
<width>171</width>
<height>19</height>
</rect>
@ -1199,7 +1683,7 @@
<property name="geometry">
<rect>
<x>540</x>
<y>140</y>
<y>70</y>
<width>171</width>
<height>19</height>
</rect>
@ -1225,7 +1709,7 @@
<property name="geometry">
<rect>
<x>540</x>
<y>160</y>
<y>90</y>
<width>172</width>
<height>19</height>
</rect>
@ -1251,7 +1735,7 @@
<property name="geometry">
<rect>
<x>160</x>
<y>120</y>
<y>50</y>
<width>134</width>
<height>19</height>
</rect>
@ -1273,50 +1757,11 @@
</item>
</layout>
</widget>
<widget class="QCheckBox" name="chk_usrMulDac">
<property name="geometry">
<rect>
<x>310</x>
<y>30</y>
<width>90</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>usrMode</string>
</property>
</widget>
<widget class="QPushButton" name="btn_afeProg">
<property name="geometry">
<rect>
<x>390</x>
<y>30</y>
<width>83</width>
<height>25</height>
</rect>
</property>
<property name="text">
<string>AFEs Prog</string>
</property>
</widget>
<widget class="QPushButton" name="btn_gtReg">
<property name="geometry">
<rect>
<x>480</x>
<y>30</y>
<width>83</width>
<height>25</height>
</rect>
</property>
<property name="text">
<string>GT Reg</string>
</property>
</widget>
<widget class="QPushButton" name="btn_getFpgaVersion">
<property name="geometry">
<rect>
<x>720</x>
<y>120</y>
<y>50</y>
<width>91</width>
<height>23</height>
</rect>
@ -1329,7 +1774,7 @@
<property name="geometry">
<rect>
<x>720</x>
<y>140</y>
<y>70</y>
<width>81</width>
<height>17</height>
</rect>
@ -1342,7 +1787,7 @@
<property name="geometry">
<rect>
<x>720</x>
<y>160</y>
<y>90</y>
<width>81</width>
<height>17</height>
</rect>
@ -1355,7 +1800,7 @@
<property name="geometry">
<rect>
<x>720</x>
<y>180</y>
<y>110</y>
<width>81</width>
<height>17</height>
</rect>
@ -1368,7 +1813,7 @@
<property name="geometry">
<rect>
<x>720</x>
<y>200</y>
<y>130</y>
<width>81</width>
<height>17</height>
</rect>
@ -1377,65 +1822,6 @@
<string>TextLabel</string>
</property>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_59">
<property name="geometry">
<rect>
<x>540</x>
<y>180</y>
<width>171</width>
<height>27</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_58">
<item>
<widget class="QLabel" name="label_36">
<property name="text">
<string>prbNo:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tb_eepromPrbSel">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_eepromTest">
<property name="text">
<string>eeprom</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="btn_txTrig">
<property name="geometry">
<rect>
<x>630</x>
<y>210</y>
<width>80</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>ManualSync</string>
</property>
</widget>
<widget class="QCheckBox" name="chb_txTrig">
<property name="geometry">
<rect>
<x>540</x>
<y>210</y>
<width>90</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>TXTrig</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_7">
<property name="geometry">

7
src/model/hardware/core/TrxBoard.cpp

@ -648,15 +648,14 @@ void TrxBoard::mcsVerify(QString path) const
return;
}
QList<quint32>* mcsList;
QTextStream save(&mcsFile);
(*mcsList).clear();
this->_bpiFlash->readMcs(mcsList);
(*_mcsList).clear();
this->_bpiFlash->readMcs(_mcsList);
for (auto i=0; i < MCS_FILE_SIZE; i++)
{
save << (*mcsList).at(i);
save << (*_mcsList).at(i);
}
mcsFile.flush();
mcsFile.close();

30
src/model/hardware/core/register/boardsCtrlMngt/BoardsCtrlMngt.cpp

@ -31,12 +31,12 @@ BoardsCtrlMngt::Gain::Gain()
/************************************* Write Functions Template ************************************/
/***************************************************************************************************/
template<class T1, class T2>
void BoardsCtrlMngt::eepromWrite(QByteArray &arr, quint32 addr, quint8 prbSel, T1* request, T2* status)
void BoardsCtrlMngt::eepromWrite(QString& str, quint32 addr, quint8 prbSel, T1* request, T2* status)
{
quint32 j(0);
bool busy=true, error=false, done=false;
foreach (auto i, arr)
foreach (auto i, str)
{
timerShot(500);
@ -54,7 +54,7 @@ void BoardsCtrlMngt::eepromWrite(QByteArray &arr, quint32 addr, quint8 prbSel, T
timerStop();
_rom->dataIn = i;
_rom->dataIn = i.toLatin1();
_rom->address = addr+j;
_rom->probeSelect = prbSel;
setEepromWrite<T1>(_rom, request);
@ -902,47 +902,47 @@ QByteArray BoardsCtrlMngt::prbEepromRead(quint32 address, quint32 length, quint8
}
void trxEepromWrite(QByteArray &array, quint32 address, BoardsCtrlMngt* boards)
void trxEepromWrite(QString str, quint32 address, BoardsCtrlMngt* boards)
{
if (array.size() >= static_cast<qint32>(TRX_ROM_MAX_LEN))
if (str.size() >= static_cast<qint32>(TRX_ROM_MAX_LEN))
{
// throw exception("Out of range writing into TRX eeprom ");
return;
}
quint8 prbSel = 0;
boards->eepromWrite<TrxEepromRwReq, TrxEepromRwStatus>(array, address, prbSel, boards->_tRomReq, boards->_tRomStatus);
boards->eepromWrite<TrxEepromRwReq, TrxEepromRwStatus>(str, address, prbSel, boards->_tRomReq, boards->_tRomStatus);
}
void mpsEepromWrite(QByteArray &array, quint32 address, BoardsCtrlMngt *boards)
void mpsEepromWrite(QString str, quint32 address, BoardsCtrlMngt *boards)
{
if (array.size() >= static_cast<qint32>(MPS_ROM_MAX_LEN))
if (str.size() >= static_cast<qint32>(MPS_ROM_MAX_LEN))
{
// throw exception("Out of range writing into MPS eeprom ");
return;
}
quint8 prbSel = 0;
boards->eepromWrite<MpsEepromRwReq, MpsEepromRwStatus>(array, address, prbSel, boards->_mRomReq, boards->_mRomStatus);
boards->eepromWrite<MpsEepromRwReq, MpsEepromRwStatus>(str, address, prbSel, boards->_mRomReq, boards->_mRomStatus);
}
void prbCtrlEepromWrite(QByteArray &array, quint32 address, BoardsCtrlMngt *boards)
void prbCtrlEepromWrite(QString str, quint32 address, BoardsCtrlMngt *boards)
{
if (array.size() >= static_cast<qint32>(PRB_CTRL_ROM_MAX_LEN))
if (str.size() >= static_cast<qint32>(PRB_CTRL_ROM_MAX_LEN))
{
// throw exception("Out of range writing into Probe Control eeprom ");
return;
}
quint8 prbSel = 0;
boards->eepromWrite<PrbCtrlEepromRwReq, PrbCtrlEepromRwStatus>(array, address, prbSel, boards->_pCtrlRomReq, boards->_pCtrlRomStatus);
boards->eepromWrite<PrbCtrlEepromRwReq, PrbCtrlEepromRwStatus>(str, address, prbSel, boards->_pCtrlRomReq, boards->_pCtrlRomStatus);
}
void prbEepromWrite(QByteArray &array, quint32 address, quint8 prbSel, BoardsCtrlMngt *boards)
void prbEepromWrite(QString str, quint32 address, quint8 prbSel, BoardsCtrlMngt *boards)
{
if (array.size() >= static_cast<qint32>(PRB_ROM_MAX_LEN))
if (str.size() >= static_cast<qint32>(PRB_ROM_MAX_LEN))
{
// throw exception("Out of range writing into Probe eeprom ");
return;
}
boards->eepromWrite<PrbEepromRwReq, PrbEepromRwStatus>(array, address, prbSel, boards->_pRomReq, boards->_pRomStatus);
boards->eepromWrite<PrbEepromRwReq, PrbEepromRwStatus>(str, address, prbSel, boards->_pRomReq, boards->_pRomStatus);
}

Loading…
Cancel
Save