Browse Source

Batch Log Enable is added

Arash Aletayeb 2 years ago
parent
commit
192f81cc6e
  1. 2
      developHw.pro.user
  2. 75
      mainwindow.cpp
  3. 2
      mainwindow.h
  4. 31
      mainwindow.ui

2
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2022-11-16T09:07:55. --> <!-- Written by QtCreator 4.10.0, 2022-11-23T14:11:26. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

75
mainwindow.cpp

@ -3489,9 +3489,28 @@ void MainWindow::on_chk_scenFrameAdcLog_clicked(bool checked)
chk->setEnabled(!checked); chk->setEnabled(!checked);
} }
ui->tb_adcLogCount->setEnabled(false);
ui->tb_syncCount->setEnabled(!checked); ui->tb_syncCount->setEnabled(!checked);
ui->cb_syncMode->setEnabled(!checked); ui->cb_syncMode->setEnabled(!checked);
if(checked)
{
if(ui->chk_batchLogEn->isChecked())
ui->tb_adcLogCount->setEnabled(checked);
}
else
ui->tb_adcLogCount->setEnabled(false);
}
/*************************************************************************************************/
void MainWindow::on_chk_batchLogEn_clicked(bool checked)
{
if(checked)
{
if(ui->chk_scenFrameAdcLog->isChecked())
ui->tb_adcLogCount->setEnabled(checked);
}
else
ui->tb_adcLogCount->setEnabled(false);
} }
/*************************************************************************************************/ /*************************************************************************************************/
@ -3538,6 +3557,7 @@ void MainWindow::catchAdcLog()
{ {
QString str; QString str;
QColor color; QColor color;
QDir dir;
QString adcLoggerPath = ui->tb_adcLogPath->text(); QString adcLoggerPath = ui->tb_adcLogPath->text();
@ -3686,19 +3706,53 @@ void MainWindow::catchAdcLog()
color = Qt::red; color = Qt::red;
emit labelState(ui->l_adcLogDone, str, color); emit labelState(ui->l_adcLogDone, str, color);
for(quint16 var = startIdx; var <= endIdx; var++) quint32 iter(1);
if(ui->chk_batchLogEn->isChecked())
{ {
capConfig.syncCount = var; iter = adcLogCnt;
_trx.adcCaptureConfig(capConfig); }
_trx.adcCaptureStart();
_trx.scenPlayerStart(true);
_trx.adcCaptureDone();
_trx.scenPlayerStop(true);
_trx.adcLoggerStart(adcLoggerPath, "scenIndx(" + QString::number(var) + ")");
ui->lcd_adcCounter->display((var - startIdx) + 1); for(quint32 i = 0; i < iter; i++)
{
qApp->processEvents(); qApp->processEvents();
QString logFolder = QString::number(i + 1);
QString updatePath = adcLoggerPath + "/" + logFolder;
ui->tb_adcLogPath->setText(updatePath);
qApp->processEvents();
if(!dir.exists(updatePath))
{
dir.mkpath(updatePath);
}
else
{
dir.cd(updatePath);
dir.removeRecursively();
dir.mkpath(updatePath);
}
for(quint16 var = startIdx; var <= endIdx; var++)
{
capConfig.syncCount = var;
capConfig.sampleCount = sampleCnt + i * 2048;
ui->tb_sampleCount->setText(QString::number(sampleCnt));
_trx.adcCaptureConfig(capConfig);
_trx.adcCaptureStart();
_trx.scenPlayerStart(true);
_trx.adcCaptureDone();
_trx.scenPlayerStop(true);
_trx.adcLoggerStart(updatePath, "scenIndx(" + QString::number(var) + ")");
ui->lcd_adcCounter->display((var - startIdx) + 1);
qApp->processEvents();
if(_discardAdcLog)
{
_discardAdcLog = false;
break;
}
}
if(_discardAdcLog) if(_discardAdcLog)
{ {
_discardAdcLog = false; _discardAdcLog = false;
@ -4789,4 +4843,3 @@ void MainWindow::on_btn_discard_clicked(void)
{ {
_discardTempTest = true; _discardTempTest = true;
} }

2
mainwindow.h

@ -417,6 +417,8 @@ private slots:
void on_btn_seRead_clicked(); void on_btn_seRead_clicked();
void on_chk_batchLogEn_clicked(bool checked);
signals: signals:
void showMessage(QString message); void showMessage(QString message);
void threeDReady(); void threeDReady();

31
mainwindow.ui

@ -42,7 +42,7 @@
<string/> <string/>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>5</number>
</property> </property>
<widget class="QWidget" name="tab_0"> <widget class="QWidget" name="tab_0">
<attribute name="title"> <attribute name="title">
@ -3007,7 +3007,7 @@
<widget class="QCheckBox" name="chk_syncAdcLog"> <widget class="QCheckBox" name="chk_syncAdcLog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>420</x> <x>390</x>
<y>30</y> <y>30</y>
<width>112</width> <width>112</width>
<height>21</height> <height>21</height>
@ -3028,7 +3028,7 @@
<rect> <rect>
<x>190</x> <x>190</x>
<y>30</y> <y>30</y>
<width>224</width> <width>191</width>
<height>60</height> <height>60</height>
</rect> </rect>
</property> </property>
@ -3098,7 +3098,7 @@
<widget class="QCheckBox" name="chk_scenFrameAdcLog"> <widget class="QCheckBox" name="chk_scenFrameAdcLog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>420</x> <x>390</x>
<y>60</y> <y>60</y>
<width>168</width> <width>168</width>
<height>21</height> <height>21</height>
@ -3117,7 +3117,7 @@
<widget class="QComboBox" name="cb_syncMode"> <widget class="QComboBox" name="cb_syncMode">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>540</x> <x>500</x>
<y>30</y> <y>30</y>
<width>81</width> <width>81</width>
<height>23</height> <height>23</height>
@ -3267,7 +3267,7 @@
<widget class="QCheckBox" name="chk_txdacEn"> <widget class="QCheckBox" name="chk_txdacEn">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>420</x> <x>390</x>
<y>90</y> <y>90</y>
<width>113</width> <width>113</width>
<height>21</height> <height>21</height>
@ -3305,6 +3305,25 @@
<set>QDialogButtonBox::Discard</set> <set>QDialogButtonBox::Discard</set>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" name="chk_batchLogEn">
<property name="geometry">
<rect>
<x>560</x>
<y>60</y>
<width>90</width>
<height>23</height>
</rect>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Batch En</string>
</property>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QWidget" name="tab_5"> <widget class="QWidget" name="tab_5">

Loading…
Cancel
Save