график ацп выведен в отдельное меню и отвязан от конкретной борды
This commit is contained in:
parent
5b3faa798b
commit
1e3ecd0834
@ -79,16 +79,12 @@ AdcGraphDialog::AdcGraphDialog(QModbusClient *modbusDevice, QWidget *parent) :
|
|||||||
layout->addWidget(chartView);
|
layout->addWidget(chartView);
|
||||||
|
|
||||||
// Подключаем сигналы элементов управления диапазоном
|
// Подключаем сигналы элементов управления диапазоном
|
||||||
connect(ui->startAddressSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
|
||||||
this, &AdcGraphDialog::on_startAddressChanged);
|
|
||||||
connect(ui->registerCountSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(ui->registerCountSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||||
this, &AdcGraphDialog::on_registerCountChanged);
|
this, &AdcGraphDialog::on_registerCountChanged);
|
||||||
connect(ui->rangeApplyButton, &QPushButton::clicked,
|
connect(ui->rangeApplyButton, &QPushButton::clicked,
|
||||||
this, &AdcGraphDialog::on_rangeApplyClicked);
|
this, &AdcGraphDialog::on_rangeApplyClicked);
|
||||||
connect(ui->teNumberSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(ui->teNumberSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||||
this, &AdcGraphDialog::on_teNumberChanged);
|
this, &AdcGraphDialog::on_teNumberChanged);
|
||||||
connect(ui->teApplyButton, &QPushButton::clicked,
|
|
||||||
this, &AdcGraphDialog::on_teApplyClicked);
|
|
||||||
|
|
||||||
connect(m_updateTimer, &QTimer::timeout, this, &AdcGraphDialog::onUpdateTimer);
|
connect(m_updateTimer, &QTimer::timeout, this, &AdcGraphDialog::onUpdateTimer);
|
||||||
connect(ui->closeBtn, &QPushButton::clicked, this, &AdcGraphDialog::on_closeBtn_clicked);
|
connect(ui->closeBtn, &QPushButton::clicked, this, &AdcGraphDialog::on_closeBtn_clicked);
|
||||||
@ -111,20 +107,17 @@ void AdcGraphDialog::setModbusDevice(QModbusClient *device)
|
|||||||
|
|
||||||
void AdcGraphDialog::on_teNumberChanged(int value)
|
void AdcGraphDialog::on_teNumberChanged(int value)
|
||||||
{
|
{
|
||||||
// Можно сохранить значение, но не применять сразу
|
if(m_teNumber != value)
|
||||||
m_pendingTeNumber = value;
|
setTENumber(m_boardId, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdcGraphDialog::on_teApplyClicked()
|
void AdcGraphDialog::setTENumber(int boardID, int teNumber)
|
||||||
{
|
|
||||||
setTENumber(ui->teNumberSpinBox->value());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdcGraphDialog::setTENumber(int teNumber)
|
|
||||||
{
|
{
|
||||||
if (m_boardAddress == -1) return;
|
if (m_boardAddress == -1) return;
|
||||||
|
|
||||||
m_teNumber = teNumber;
|
m_teNumber = teNumber;
|
||||||
|
m_boardId = boardID;
|
||||||
|
m_boardAddress = m_boardId + 1;
|
||||||
|
|
||||||
// Обновляем заголовок окна
|
// Обновляем заголовок окна
|
||||||
setWindowTitle(QString("График АЦП - Плата %1, ТЭ %2 (адр %3-%4)")
|
setWindowTitle(QString("График АЦП - Плата %1, ТЭ %2 (адр %3-%4)")
|
||||||
@ -155,6 +148,7 @@ void AdcGraphDialog::setTENumber(int teNumber)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ui->teNumberSpinBox->setValue(teNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdcGraphDialog::readCalibrationValues()
|
void AdcGraphDialog::readCalibrationValues()
|
||||||
@ -246,28 +240,19 @@ void AdcGraphDialog::updateStatistics()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void AdcGraphDialog::updateStatisticsWithStableInfo()
|
void AdcGraphDialog::updateStatisticsWithStableInfo()
|
||||||
{
|
{
|
||||||
if (m_series->count() > 0) {
|
if (m_series->count() > 0) {
|
||||||
// Обновляем информацию о стабильном участке в статистике
|
// Используем абсолютные индексы в формате "начальный-конечный"
|
||||||
if (m_stableStartIndex >= m_startAddress &&
|
ui->samplesLabel->setText(
|
||||||
m_stableStartIndex < m_startAddress + m_registerCount) {
|
QString("%1 отсч. (адр %2-%3) [стаб: %4-%5]")
|
||||||
int relativeIndex = m_stableStartIndex - m_startAddress;
|
.arg(m_series->count())
|
||||||
ui->samplesLabel->setText(
|
.arg(m_startAddress)
|
||||||
QString("%1 отсч. (адр %2-%3) [стаб: %4]")
|
.arg(m_startAddress + m_registerCount - 1)
|
||||||
.arg(m_series->count())
|
.arg(m_stableStartIndex) // Абсолютный начальный индекс
|
||||||
.arg(m_startAddress)
|
.arg(m_stableEndIndex) // Абсолютный конечный индекс
|
||||||
.arg(m_startAddress + m_registerCount - 1)
|
);
|
||||||
.arg(relativeIndex)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
ui->samplesLabel->setText(
|
|
||||||
QString("%1 отсч. (адр %2-%3)")
|
|
||||||
.arg(m_series->count())
|
|
||||||
.arg(m_startAddress)
|
|
||||||
.arg(m_startAddress + m_registerCount - 1)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,6 +328,12 @@ void AdcGraphDialog::onCombinedDataReady()
|
|||||||
auto *reply = qobject_cast<QModbusReply*>(sender());
|
auto *reply = qobject_cast<QModbusReply*>(sender());
|
||||||
if (!reply) return;
|
if (!reply) return;
|
||||||
|
|
||||||
|
if((m_adcZero == 0) || (m_adcOneVolt == 0))
|
||||||
|
{
|
||||||
|
readCalibrationValues();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (reply->error() == QModbusDevice::NoError) {
|
if (reply->error() == QModbusDevice::NoError) {
|
||||||
const QModbusDataUnit result = reply->result();
|
const QModbusDataUnit result = reply->result();
|
||||||
|
|
||||||
@ -431,7 +422,7 @@ void AdcGraphDialog::startGraph(int boardId, int teNumber)
|
|||||||
readCalibrationValues();
|
readCalibrationValues();
|
||||||
|
|
||||||
// Записываем начальный номер ТЭ
|
// Записываем начальный номер ТЭ
|
||||||
setTENumber(teNumber);
|
setTENumber(m_boardAddress, teNumber);
|
||||||
|
|
||||||
m_updateTimer->start(m_timeout);
|
m_updateTimer->start(m_timeout);
|
||||||
}
|
}
|
||||||
@ -453,6 +444,7 @@ void AdcGraphDialog::stopGraph()
|
|||||||
if (m_modbusDevice) {
|
if (m_modbusDevice) {
|
||||||
m_modbusDevice->disconnect(this); // Отключаем все сигналы
|
m_modbusDevice->disconnect(this); // Отключаем все сигналы
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdcGraphDialog::onUpdateTimer()
|
void AdcGraphDialog::onUpdateTimer()
|
||||||
@ -526,21 +518,21 @@ void AdcGraphDialog::updateYAxisRange(double minVoltage, double maxVoltage)
|
|||||||
double yMax = maxVoltage + margin;
|
double yMax = maxVoltage + margin;
|
||||||
|
|
||||||
// Если диапазон слишком маленький или слишком большой, устанавливаем разумные пределы
|
// Если диапазон слишком маленький или слишком большой, устанавливаем разумные пределы
|
||||||
if ((range < 0.1) || ((maxVoltage > 0.5) && (minVoltage < -0.5)))
|
// if ((range < 0.1) || ((maxVoltage > 0.5) && (minVoltage < -0.5)))
|
||||||
{
|
// {
|
||||||
yMin = -1.5;
|
// yMin = -1.5;
|
||||||
yMax = 1.5;
|
// yMax = 1.5;
|
||||||
}
|
// }
|
||||||
else if(maxVoltage > 0.5) {
|
// else if(maxVoltage > 0.5) {
|
||||||
yMin = -0.1;
|
// yMin = -0.1;
|
||||||
yMax = 1.5;
|
// yMax = 1.5;
|
||||||
}
|
// }
|
||||||
else if(minVoltage < -0.5)
|
// else if(minVoltage < -0.5)
|
||||||
{
|
// {
|
||||||
yMin = -1.5;
|
// yMin = -1.5;
|
||||||
yMax =0.1;
|
// yMax =0.1;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
{
|
||||||
yMin = -1.5;
|
yMin = -1.5;
|
||||||
yMax = 1.5;
|
yMax = 1.5;
|
||||||
@ -564,11 +556,6 @@ double AdcGraphDialog::convertAdcToVoltage(quint16 adcValue)
|
|||||||
return (adcValue - m_adcZero) * 1.1 / (m_adcOneVolt - m_adcZero);
|
return (adcValue - m_adcZero) * 1.1 / (m_adcOneVolt - m_adcZero);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdcGraphDialog::on_startAddressChanged(int value)
|
|
||||||
{
|
|
||||||
m_startAddress = value;
|
|
||||||
// qDebug() << "Start address changed to:" << value;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdcGraphDialog::on_registerCountChanged(int value)
|
void AdcGraphDialog::on_registerCountChanged(int value)
|
||||||
{
|
{
|
||||||
@ -592,9 +579,3 @@ void AdcGraphDialog::on_closeBtn_clicked()
|
|||||||
stopGraph();
|
stopGraph();
|
||||||
reject(); // Или accept() в зависимости от логики
|
reject(); // Или accept() в зависимости от логики
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdcGraphDialog::closeEvent(QCloseEvent *event)
|
|
||||||
{
|
|
||||||
stopGraph();
|
|
||||||
event->accept();
|
|
||||||
}
|
|
||||||
|
@ -24,24 +24,30 @@ public:
|
|||||||
explicit AdcGraphDialog(QModbusClient *modbusDevice, QWidget *parent = nullptr);
|
explicit AdcGraphDialog(QModbusClient *modbusDevice, QWidget *parent = nullptr);
|
||||||
~AdcGraphDialog();
|
~AdcGraphDialog();
|
||||||
|
|
||||||
|
void setTENumber(int boardID, int teNumber);
|
||||||
void setModbusDevice(QModbusClient *device);
|
void setModbusDevice(QModbusClient *device);
|
||||||
void startGraph(int boardId, int teNumber);
|
void startGraph(int boardId, int teNumber);
|
||||||
void stopGraph();
|
void stopGraph();
|
||||||
void setTimeout(int timeout);
|
void setTimeout(int timeout);
|
||||||
void readyClose();
|
void readyClose();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void dialogClosed();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent *event) override;
|
void closeEvent(QCloseEvent *event) override {
|
||||||
|
stopGraph();
|
||||||
|
event->accept();
|
||||||
|
emit dialogClosed();
|
||||||
|
QDialog::closeEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_teNumberChanged(int value);
|
void on_teNumberChanged(int value);
|
||||||
void on_teApplyClicked();
|
|
||||||
void setTENumber(int teNumber);
|
|
||||||
void onUpdateTimer();
|
void onUpdateTimer();
|
||||||
void onReadReady();
|
void onReadReady();
|
||||||
void onStableIndicesReady();
|
void onStableIndicesReady();
|
||||||
void on_closeBtn_clicked();
|
void on_closeBtn_clicked();
|
||||||
void on_startAddressChanged(int value);
|
|
||||||
void on_registerCountChanged(int value);
|
void on_registerCountChanged(int value);
|
||||||
void on_rangeApplyClicked();
|
void on_rangeApplyClicked();
|
||||||
|
|
||||||
@ -71,7 +77,6 @@ private:
|
|||||||
QChart *m_chart; // Добавить указатель на chart
|
QChart *m_chart; // Добавить указатель на chart
|
||||||
|
|
||||||
// Управление диапазоном регистров
|
// Управление диапазоном регистров
|
||||||
int m_pendingTeNumber;
|
|
||||||
int m_startAddress;
|
int m_startAddress;
|
||||||
int m_registerCount;
|
int m_registerCount;
|
||||||
|
|
||||||
|
@ -16,26 +16,6 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="rangeLayout">
|
<layout class="QHBoxLayout" name="rangeLayout">
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="startAddressLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Начальный адрес:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="startAddressSpinBox">
|
|
||||||
<property name="minimum">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>500</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="registerCountLabel">
|
<widget class="QLabel" name="registerCountLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -90,13 +70,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="teApplyButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Применить</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -14,217 +14,14 @@
|
|||||||
<string>Dialog</string>
|
<string>Dialog</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<item row="0" column="3">
|
<item row="1" column="0" colspan="4">
|
||||||
<widget class="QGroupBox" name="DbgPlate_2">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="title">
|
<property name="orientation">
|
||||||
<string>Плата 4</string>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_23">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_16">
|
|
||||||
<property name="title">
|
|
||||||
<string>Вызов функций</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_15">
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="pollTECallChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Опрос ТЭ</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="continiusCallChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Непрерывный вызов калибр. и опроса</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="calibrateCallChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Калибровка</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QCheckBox" name="getHardfaultCallChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Генерация HardFault</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QCheckBox" name="resetDefaultCallChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Настройки по умолчанию</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QCheckBox" name="resetKeyCallChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Сбросить все ключи</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QGroupBox" name="leds_4">
|
|
||||||
<property name="title">
|
|
||||||
<string>Тест светодиодов</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_17">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="ledWorkTestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Работа</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="ledWarnTestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Предупреждение</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="ledErrTestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Авария</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QCheckBox" name="ledConnectTestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Связь</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QCheckBox" name="ledVH1TestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>LED VH1 (Зеленый)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QCheckBox" name="ledVH2TestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>LED VH2 (Зеленый)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QCheckBox" name="ledVH3TestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>LED VH3 (Красный)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_19">
|
|
||||||
<property name="title">
|
|
||||||
<string>ADC</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_18">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="debugTENumSpinBox_4">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>65</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>ТЭ</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QPushButton" name="openADCBtn_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Открыть график</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QGroupBox" name="discs_4">
|
|
||||||
<property name="title">
|
|
||||||
<string>Тест дискретных сигналов</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_16">
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="discWarnTestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Предупреждение</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="discErrTestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Авария</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QCheckBox" name="discErr5VsciTestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ошибка 5 Vsci</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="discWorkTestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Работа</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QCheckBox" name="discErr5TestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ошибка 5 В</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QCheckBox" name="discErr24TestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ошибка 24 В</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QCheckBox" name="discErr5VATestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ошибка 5 VA</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="enableLedTestChkBox_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>Тест ламп и дискретных сигналов</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
@ -233,87 +30,6 @@
|
|||||||
<string>Плата 3</string>
|
<string>Плата 3</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_25">
|
<layout class="QGridLayout" name="gridLayout_25">
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_11">
|
|
||||||
<property name="title">
|
|
||||||
<string>Вызов функций</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_11">
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="pollTECallChkBox_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Опрос ТЭ</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="continiusCallChkBox_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Непрерывный вызов калибр. и опроса</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="calibrateCallChkBox_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Калибровка</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QCheckBox" name="getHardfaultCallChkBox_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Генерация HardFault</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QCheckBox" name="resetDefaultCallChkBox_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Настройки по умолчанию</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QCheckBox" name="resetKeyCallChkBox_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Сбросить все ключи</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_14">
|
|
||||||
<property name="title">
|
|
||||||
<string>ADC</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_14">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="debugTENumSpinBox_3">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>85</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>ТЭ</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QPushButton" name="openADCBtn_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Открыть график</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QGroupBox" name="leds_3">
|
<widget class="QGroupBox" name="leds_3">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -372,6 +88,64 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="enableLedTestChkBox_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Тест ламп и дискретных сигналов</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox_11">
|
||||||
|
<property name="title">
|
||||||
|
<string>Вызов функций</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_11">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="pollTECallChkBox_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Опрос ТЭ</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="continiusCallChkBox_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Непрерывный вызов калибр. и опроса</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="calibrateCallChkBox_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Калибровка</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QCheckBox" name="getHardfaultCallChkBox_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Генерация HardFault</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="resetDefaultCallChkBox_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Настройки по умолчанию</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="resetKeyCallChkBox_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Сбросить все ключи</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QGroupBox" name="discs_3">
|
<widget class="QGroupBox" name="discs_3">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -430,13 +204,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="enableLedTestChkBox_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Тест ламп и дискретных сигналов</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -446,145 +213,6 @@
|
|||||||
<string>Плата 2</string>
|
<string>Плата 2</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_24">
|
<layout class="QGridLayout" name="gridLayout_24">
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_21">
|
|
||||||
<property name="title">
|
|
||||||
<string>Вызов функций</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_19">
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="calibrateCallChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Калибровка</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QCheckBox" name="resetDefaultCallChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Настройки по умолчанию</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QCheckBox" name="resetKeyCallChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Сбросить все ключи</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QCheckBox" name="pollTECallChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Опрос ТЭ</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QCheckBox" name="getHardfaultCallChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Генерация HardFault</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="continiusCallChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Непрерывный вызов калибр. и опроса</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_24">
|
|
||||||
<property name="title">
|
|
||||||
<string>ADC</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_22">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>ТЭ</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="debugTENumSpinBox_2">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>85</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QPushButton" name="openADCBtn_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Открыть график</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QGroupBox" name="discs_2">
|
|
||||||
<property name="title">
|
|
||||||
<string>Тест дискретных сигналов</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_20">
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QCheckBox" name="discErr5VsciTestChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ошибка 5 Vsci</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QCheckBox" name="discErr24TestChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ошибка 24 В</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="discWarnTestChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Предупреждение</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="discWorkTestChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Работа</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QCheckBox" name="discErr5TestChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ошибка 5 В</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="discErrTestChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Авария</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QCheckBox" name="discErr5VATestChkBox_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ошибка 5 VA</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QGroupBox" name="leds_2">
|
<widget class="QGroupBox" name="leds_2">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -650,19 +278,118 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox_21">
|
||||||
|
<property name="title">
|
||||||
|
<string>Вызов функций</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_19">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="calibrateCallChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Калибровка</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QCheckBox" name="resetDefaultCallChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Настройки по умолчанию</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="resetKeyCallChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Сбросить все ключи</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="pollTECallChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Опрос ТЭ</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QCheckBox" name="getHardfaultCallChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Генерация HardFault</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="continiusCallChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Непрерывный вызов калибр. и опроса</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QGroupBox" name="discs_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Тест дискретных сигналов</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_20">
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="discErr5VsciTestChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ошибка 5 Vsci</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="discErr24TestChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ошибка 24 В</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="discWarnTestChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Предупреждение</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="discWorkTestChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Работа</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="discErr5TestChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ошибка 5 В</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="discErrTestChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Авария</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QCheckBox" name="discErr5VATestChkBox_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ошибка 5 VA</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="4">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="DbgPlate_1">
|
<widget class="QGroupBox" name="DbgPlate_1">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -778,36 +505,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_5">
|
|
||||||
<property name="title">
|
|
||||||
<string>ADC</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>ТЭ</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QSpinBox" name="debugTENumSpinBox_1">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>85</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QPushButton" name="openADCBtn_1">
|
|
||||||
<property name="text">
|
|
||||||
<string>Открыть график</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QGroupBox" name="discs_1">
|
<widget class="QGroupBox" name="discs_1">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -876,6 +573,189 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QGroupBox" name="DbgPlate_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Плата 4</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_23">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QGroupBox" name="discs_4">
|
||||||
|
<property name="title">
|
||||||
|
<string>Тест дискретных сигналов</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_16">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="discWarnTestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Предупреждение</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="discErrTestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Авария</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="discErr5VsciTestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ошибка 5 Vsci</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="discWorkTestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Работа</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="discErr5TestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ошибка 5 В</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="discErr24TestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ошибка 24 В</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QCheckBox" name="discErr5VATestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Ошибка 5 VA</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QGroupBox" name="leds_4">
|
||||||
|
<property name="title">
|
||||||
|
<string>Тест светодиодов</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_17">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="ledWorkTestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Работа</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="ledWarnTestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Предупреждение</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="ledErrTestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Авария</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="ledConnectTestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Связь</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="ledVH1TestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>LED VH1 (Зеленый)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="ledVH2TestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>LED VH2 (Зеленый)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="ledVH3TestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>LED VH3 (Красный)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="enableLedTestChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Тест ламп и дискретных сигналов</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox_16">
|
||||||
|
<property name="title">
|
||||||
|
<string>Вызов функций</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_15">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="pollTECallChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Опрос ТЭ</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="continiusCallChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Непрерывный вызов калибр. и опроса</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="calibrateCallChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Калибровка</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QCheckBox" name="getHardfaultCallChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Генерация HardFault</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="resetDefaultCallChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Настройки по умолчанию</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="resetKeyCallChkBox_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Сбросить все ключи</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@ -32,6 +32,14 @@ void DebugTerminalDialog::setModbusDevice(QModbusClient *device)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebugTerminalDialog::setDebugTerminalCoil(int enable)
|
||||||
|
{
|
||||||
|
writeCoil(0, COIL_DEBUG_MODE, enable);
|
||||||
|
writeCoil(1, COIL_DEBUG_MODE, enable);
|
||||||
|
writeCoil(2, COIL_DEBUG_MODE, enable);
|
||||||
|
writeCoil(3, COIL_DEBUG_MODE, enable);
|
||||||
|
}
|
||||||
|
|
||||||
void DebugTerminalDialog::showEvent(QShowEvent *event)
|
void DebugTerminalDialog::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
QDialog::showEvent(event);
|
QDialog::showEvent(event);
|
||||||
@ -39,19 +47,13 @@ void DebugTerminalDialog::showEvent(QShowEvent *event)
|
|||||||
|
|
||||||
resetAll();
|
resetAll();
|
||||||
|
|
||||||
writeCoil(0, COIL_DEBUG_MODE, 1);
|
setDebugTerminalCoil(1);
|
||||||
writeCoil(1, COIL_DEBUG_MODE, 1);
|
|
||||||
writeCoil(2, COIL_DEBUG_MODE, 1);
|
|
||||||
writeCoil(3, COIL_DEBUG_MODE, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugTerminalDialog::closeEvent(QCloseEvent *event)
|
void DebugTerminalDialog::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
// При закрытии окна записываем в коил 555 значение "0"
|
// При закрытии окна записываем в коил 555 значение "0"
|
||||||
writeCoil(0, COIL_DEBUG_MODE, 0);
|
setDebugTerminalCoil(0);
|
||||||
writeCoil(1, COIL_DEBUG_MODE, 0);
|
|
||||||
writeCoil(2, COIL_DEBUG_MODE, 0);
|
|
||||||
writeCoil(3, COIL_DEBUG_MODE, 0);
|
|
||||||
QDialog::closeEvent(event);
|
QDialog::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,8 +95,6 @@ void DebugTerminalDialog::initializeConnections()
|
|||||||
connect(ui->ledVH2TestChkBox_1, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_ledVH2TestChkBox_1_stateChanged);
|
connect(ui->ledVH2TestChkBox_1, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_ledVH2TestChkBox_1_stateChanged);
|
||||||
connect(ui->ledVH3TestChkBox_1, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_ledVH3TestChkBox_1_stateChanged);
|
connect(ui->ledVH3TestChkBox_1, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_ledVH3TestChkBox_1_stateChanged);
|
||||||
|
|
||||||
connect(ui->openADCBtn_1, &QPushButton::clicked, this, &DebugTerminalDialog::on_openADCBtn_1_clicked);
|
|
||||||
|
|
||||||
// Подключаем все чекбоксы для платы 2
|
// Подключаем все чекбоксы для платы 2
|
||||||
connect(ui->continiusCallChkBox_2, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_continiusCallChkBox_2_stateChanged);
|
connect(ui->continiusCallChkBox_2, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_continiusCallChkBox_2_stateChanged);
|
||||||
connect(ui->calibrateCallChkBox_2, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_calibrateCallChkBox_2_stateChanged);
|
connect(ui->calibrateCallChkBox_2, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_calibrateCallChkBox_2_stateChanged);
|
||||||
@ -126,8 +126,6 @@ void DebugTerminalDialog::initializeConnections()
|
|||||||
connect(ui->ledVH2TestChkBox_2, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_ledVH2TestChkBox_2_stateChanged);
|
connect(ui->ledVH2TestChkBox_2, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_ledVH2TestChkBox_2_stateChanged);
|
||||||
connect(ui->ledVH3TestChkBox_2, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_ledVH3TestChkBox_2_stateChanged);
|
connect(ui->ledVH3TestChkBox_2, &QCheckBox::stateChanged, this, &DebugTerminalDialog::on_ledVH3TestChkBox_2_stateChanged);
|
||||||
|
|
||||||
connect(ui->openADCBtn_2, &QPushButton::clicked, this, &DebugTerminalDialog::on_openADCBtn_2_clicked);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -571,22 +569,25 @@ void DebugTerminalDialog::on_ledVH3TestChkBox_4_stateChanged(int state)
|
|||||||
|
|
||||||
void DebugTerminalDialog::openAdc(int boardID, int teNumber)
|
void DebugTerminalDialog::openAdc(int boardID, int teNumber)
|
||||||
{
|
{
|
||||||
writeTENumber(boardID, teNumber);
|
|
||||||
// Создаем/обновляем AdcGraphDialog
|
|
||||||
if (!m_adcGraphDialog) {
|
|
||||||
m_adcGraphDialog = new AdcGraphDialog(m_modbusDevice, this);
|
|
||||||
} else {
|
|
||||||
m_adcGraphDialog->setModbusDevice(m_modbusDevice);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Удаляем старый диалог и создаем новый
|
||||||
if (m_adcGraphDialog) {
|
if (m_adcGraphDialog) {
|
||||||
m_adcGraphDialog->startGraph(boardID, teNumber);
|
m_adcGraphDialog->deleteLater();
|
||||||
m_adcGraphDialog->show();
|
m_adcGraphDialog = nullptr;
|
||||||
m_adcGraphDialog->raise(); // Поднять окно на передний план
|
|
||||||
m_adcGraphDialog->activateWindow(); // Активировать окно
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_adcGraphDialog = new AdcGraphDialog(m_modbusDevice, this);
|
||||||
|
connect(m_adcGraphDialog, &AdcGraphDialog::dialogClosed, this, [this]() {
|
||||||
|
setDebugTerminalCoil(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
setGraphUpdateInterval(1000);
|
||||||
|
m_adcGraphDialog->startGraph(boardID, teNumber);
|
||||||
|
m_adcGraphDialog->show();
|
||||||
|
m_adcGraphDialog->raise();
|
||||||
|
m_adcGraphDialog->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugTerminalDialog::setGraphUpdateInterval(int milliseconds)
|
void DebugTerminalDialog::setGraphUpdateInterval(int milliseconds)
|
||||||
{
|
{
|
||||||
if (m_adcGraphDialog) {
|
if (m_adcGraphDialog) {
|
||||||
@ -595,32 +596,6 @@ void DebugTerminalDialog::setGraphUpdateInterval(int milliseconds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DebugTerminalDialog::on_openADCBtn_1_clicked()
|
|
||||||
{
|
|
||||||
openAdc(0, ui->debugTENumSpinBox_1->value());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DebugTerminalDialog::on_openADCBtn_2_clicked()
|
|
||||||
{
|
|
||||||
openAdc(1, ui->debugTENumSpinBox_2->value());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void DebugTerminalDialog::on_openADCBtn_3_clicked()
|
|
||||||
{
|
|
||||||
openAdc(2, ui->debugTENumSpinBox_3->value());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void DebugTerminalDialog::on_openADCBtn_4_clicked()
|
|
||||||
{
|
|
||||||
openAdc(3, ui->debugTENumSpinBox_4->value());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DebugTerminalDialog::writeCoil(int boardID, int coil, int value)
|
void DebugTerminalDialog::writeCoil(int boardID, int coil, int value)
|
||||||
{
|
{
|
||||||
QGroupBox* boardGroup = nullptr;
|
QGroupBox* boardGroup = nullptr;
|
||||||
@ -641,15 +616,7 @@ void DebugTerminalDialog::writeCoil(int boardID, int coil, int value)
|
|||||||
|
|
||||||
void DebugTerminalDialog::writeTENumber(int boardId, int teNumber)
|
void DebugTerminalDialog::writeTENumber(int boardId, int teNumber)
|
||||||
{
|
{
|
||||||
if (!m_modbusDevice) {
|
m_adcGraphDialog->setTENumber(boardId, teNumber);
|
||||||
qDebug() << "Modbus device not available for writing TE number";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
qDebug() << "Writing TE number" << teNumber << "to board" << boardId << "register" << REGISTER_TE_NUMB;
|
|
||||||
|
|
||||||
// Отправляем сигнал для записи регистра
|
|
||||||
emit writeRegister(boardId, REGISTER_TE_NUMB, teNumber);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -712,9 +679,6 @@ void DebugTerminalDialog::resetAll()
|
|||||||
ui->ledVH2TestChkBox_1->setChecked(false);
|
ui->ledVH2TestChkBox_1->setChecked(false);
|
||||||
ui->ledVH3TestChkBox_1->setChecked(false);
|
ui->ledVH3TestChkBox_1->setChecked(false);
|
||||||
|
|
||||||
// Сброс спинбоксов ТЭ
|
|
||||||
ui->debugTENumSpinBox_1->setValue(0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -748,12 +712,6 @@ void DebugTerminalDialog::resetAll()
|
|||||||
ui->ledVH2TestChkBox_2->setChecked(false);
|
ui->ledVH2TestChkBox_2->setChecked(false);
|
||||||
ui->ledVH3TestChkBox_2->setChecked(false);
|
ui->ledVH3TestChkBox_2->setChecked(false);
|
||||||
|
|
||||||
// Сброс спинбоксов ТЭ
|
|
||||||
ui->debugTENumSpinBox_2->setValue(0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Сброс всех чекбоксов вызова функций
|
// Сброс всех чекбоксов вызова функций
|
||||||
ui->continiusCallChkBox_3->setChecked(false);
|
ui->continiusCallChkBox_3->setChecked(false);
|
||||||
@ -782,13 +740,6 @@ void DebugTerminalDialog::resetAll()
|
|||||||
ui->ledVH2TestChkBox_3->setChecked(false);
|
ui->ledVH2TestChkBox_3->setChecked(false);
|
||||||
ui->ledVH3TestChkBox_3->setChecked(false);
|
ui->ledVH3TestChkBox_3->setChecked(false);
|
||||||
|
|
||||||
// Сброс спинбоксов ТЭ
|
|
||||||
ui->debugTENumSpinBox_3->setValue(0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -819,6 +770,4 @@ void DebugTerminalDialog::resetAll()
|
|||||||
ui->ledVH2TestChkBox_4->setChecked(false);
|
ui->ledVH2TestChkBox_4->setChecked(false);
|
||||||
ui->ledVH3TestChkBox_4->setChecked(false);
|
ui->ledVH3TestChkBox_4->setChecked(false);
|
||||||
|
|
||||||
// Сброс спинбоксов ТЭ
|
|
||||||
ui->debugTENumSpinBox_4->setValue(0);
|
|
||||||
}
|
}
|
||||||
|
@ -56,11 +56,15 @@ class DebugTerminalDialog : public QDialog
|
|||||||
public:
|
public:
|
||||||
explicit DebugTerminalDialog(QWidget *parent = nullptr);
|
explicit DebugTerminalDialog(QWidget *parent = nullptr);
|
||||||
~DebugTerminalDialog();
|
~DebugTerminalDialog();
|
||||||
|
AdcGraphDialog *m_adcGraphDialog;
|
||||||
|
void setDebugTerminalCoil(int enable);
|
||||||
void updateConnectionStatus(int boardId, bool connected);
|
void updateConnectionStatus(int boardId, bool connected);
|
||||||
void setBoardActive(int boardId, bool active);
|
void setBoardActive(int boardId, bool active);
|
||||||
void updateBoardStates(bool activeBoards[4]);
|
void updateBoardStates(bool activeBoards[4]);
|
||||||
void setModbusDevice(QModbusClient *device);
|
void setModbusDevice(QModbusClient *device);
|
||||||
void setGraphUpdateInterval(int milliseconds);
|
void setGraphUpdateInterval(int milliseconds);
|
||||||
|
void writeTENumber(int boardId, int teNumber);
|
||||||
|
void openAdc(int boardID, int teNumber);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent *event) override;
|
void showEvent(QShowEvent *event) override;
|
||||||
@ -69,18 +73,6 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
void on_buttonBox_clicked(QAbstractButton *button);
|
void on_buttonBox_clicked(QAbstractButton *button);
|
||||||
|
|
||||||
// // Слоты для вызова функций
|
|
||||||
// void onFunctionCallChanged(int boardId, int coil, bool state);
|
|
||||||
|
|
||||||
// // Слоты для теста дискретных сигналов
|
|
||||||
// void onDiscreteTestChanged(int boardId, int coil, bool state);
|
|
||||||
|
|
||||||
// // Слоты для теста светодиодов
|
|
||||||
// void onLedTestChanged(int boardId, int coil, bool state);
|
|
||||||
|
|
||||||
// // Слоты для ADC
|
|
||||||
// void onOpenADCGraphClicked(int boardId);
|
|
||||||
|
|
||||||
// Плата 1
|
// Плата 1
|
||||||
void on_continiusCallChkBox_1_stateChanged(int state);
|
void on_continiusCallChkBox_1_stateChanged(int state);
|
||||||
void on_calibrateCallChkBox_1_stateChanged(int state);
|
void on_calibrateCallChkBox_1_stateChanged(int state);
|
||||||
@ -107,8 +99,6 @@ private slots:
|
|||||||
void on_ledVH2TestChkBox_1_stateChanged(int state);
|
void on_ledVH2TestChkBox_1_stateChanged(int state);
|
||||||
void on_ledVH3TestChkBox_1_stateChanged(int state);
|
void on_ledVH3TestChkBox_1_stateChanged(int state);
|
||||||
|
|
||||||
void on_openADCBtn_1_clicked();
|
|
||||||
|
|
||||||
// Плата 2
|
// Плата 2
|
||||||
void on_continiusCallChkBox_2_stateChanged(int state);
|
void on_continiusCallChkBox_2_stateChanged(int state);
|
||||||
void on_calibrateCallChkBox_2_stateChanged(int state);
|
void on_calibrateCallChkBox_2_stateChanged(int state);
|
||||||
@ -135,8 +125,6 @@ private slots:
|
|||||||
void on_ledVH2TestChkBox_2_stateChanged(int state);
|
void on_ledVH2TestChkBox_2_stateChanged(int state);
|
||||||
void on_ledVH3TestChkBox_2_stateChanged(int state);
|
void on_ledVH3TestChkBox_2_stateChanged(int state);
|
||||||
|
|
||||||
void on_openADCBtn_2_clicked();
|
|
||||||
|
|
||||||
|
|
||||||
// Плата 3
|
// Плата 3
|
||||||
void on_continiusCallChkBox_3_stateChanged(int state);
|
void on_continiusCallChkBox_3_stateChanged(int state);
|
||||||
@ -164,8 +152,6 @@ private slots:
|
|||||||
void on_ledVH2TestChkBox_3_stateChanged(int state);
|
void on_ledVH2TestChkBox_3_stateChanged(int state);
|
||||||
void on_ledVH3TestChkBox_3_stateChanged(int state);
|
void on_ledVH3TestChkBox_3_stateChanged(int state);
|
||||||
|
|
||||||
void on_openADCBtn_3_clicked();
|
|
||||||
|
|
||||||
// Плата 4
|
// Плата 4
|
||||||
void on_continiusCallChkBox_4_stateChanged(int state);
|
void on_continiusCallChkBox_4_stateChanged(int state);
|
||||||
void on_calibrateCallChkBox_4_stateChanged(int state);
|
void on_calibrateCallChkBox_4_stateChanged(int state);
|
||||||
@ -192,8 +178,6 @@ private slots:
|
|||||||
void on_ledVH2TestChkBox_4_stateChanged(int state);
|
void on_ledVH2TestChkBox_4_stateChanged(int state);
|
||||||
void on_ledVH3TestChkBox_4_stateChanged(int state);
|
void on_ledVH3TestChkBox_4_stateChanged(int state);
|
||||||
|
|
||||||
void on_openADCBtn_4_clicked();
|
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void coilValueChanged(int boardID, int coil, int value);
|
void coilValueChanged(int boardID, int coil, int value);
|
||||||
@ -201,7 +185,6 @@ signals:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DebugTerminalDialog *ui;
|
Ui::DebugTerminalDialog *ui;
|
||||||
AdcGraphDialog *m_adcGraphDialog;
|
|
||||||
QModbusClient *m_modbusDevice; // Храним указатель здесь
|
QModbusClient *m_modbusDevice; // Храним указатель здесь
|
||||||
|
|
||||||
// Карты для хранения состояний
|
// Карты для хранения состояний
|
||||||
@ -214,8 +197,6 @@ private:
|
|||||||
|
|
||||||
void initializeConnections();
|
void initializeConnections();
|
||||||
|
|
||||||
void writeTENumber(int boardId, int teNumber);
|
|
||||||
void openAdc(int boardID, int teNumber);
|
|
||||||
void writeCoil(int boardID, int coil, int value);
|
void writeCoil(int boardID, int coil, int value);
|
||||||
void readCoil(int coil);
|
void readCoil(int coil);
|
||||||
void resetAll();
|
void resetAll();
|
||||||
|
@ -497,6 +497,7 @@ M3KTE::M3KTE(QWidget *parent)
|
|||||||
ThePhantomMenace[i]->setPalette(QPalette(tb, tb, tb, tb, tb, tb, tb, tb, tb));
|
ThePhantomMenace[i]->setPalette(QPalette(tb, tb, tb, tb, tb, tb, tb, tb, tb));
|
||||||
connect(ThePhantomMenace[i], &QPushButton::clicked, this, [this, i]() {
|
connect(ThePhantomMenace[i], &QPushButton::clicked, this, [this, i]() {
|
||||||
selectPositionOnTree(i);
|
selectPositionOnTree(i);
|
||||||
|
m_debugTerminalDialog->writeTENumber(i/85, i - (i/85)*85 + 1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
connect(m_deviceSettingsDialog, &DeviceSettingsDialog::parityChanged, this, &M3KTE::onParityUpdate);
|
connect(m_deviceSettingsDialog, &DeviceSettingsDialog::parityChanged, this, &M3KTE::onParityUpdate);
|
||||||
@ -539,6 +540,11 @@ void M3KTE::initActions()
|
|||||||
connect(ui->writeTable, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(ui->writeTable, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
this, &M3KTE::onWriteTableChanged);
|
this, &M3KTE::onWriteTableChanged);
|
||||||
connect(ui->DebugTerm, &QAction::triggered, m_debugTerminalDialog, &QWidget::show);
|
connect(ui->DebugTerm, &QAction::triggered, m_debugTerminalDialog, &QWidget::show);
|
||||||
|
connect(ui->OpenADCBuff, &QAction::triggered, this, [this]() {
|
||||||
|
m_debugTerminalDialog->setDebugTerminalCoil(1);
|
||||||
|
m_debugTerminalDialog->openAdc(0, 1);
|
||||||
|
});
|
||||||
|
|
||||||
connect(m_debugTerminalDialog, &DebugTerminalDialog::coilValueChanged,
|
connect(m_debugTerminalDialog, &DebugTerminalDialog::coilValueChanged,
|
||||||
this, &M3KTE::writeSingleCoil);
|
this, &M3KTE::writeSingleCoil);
|
||||||
connect(m_debugTerminalDialog, &DebugTerminalDialog::writeRegister,
|
connect(m_debugTerminalDialog, &DebugTerminalDialog::writeRegister,
|
||||||
@ -1831,8 +1837,6 @@ void M3KTE::writeSingleRegister(int boardID, int regAddress, quint16 value)
|
|||||||
if (!modbusDevice || !Boards[boardID].isActive)
|
if (!modbusDevice || !Boards[boardID].isActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_debugTerminalDialog->setGraphUpdateInterval(m_deviceSettingsDialog->currentBoardTimer(boardID));
|
|
||||||
|
|
||||||
QModbusDataUnit unit(QModbusDataUnit::HoldingRegisters, regAddress, 1);
|
QModbusDataUnit unit(QModbusDataUnit::HoldingRegisters, regAddress, 1);
|
||||||
unit.setValue(0, value);
|
unit.setValue(0, value);
|
||||||
|
|
||||||
|
@ -14649,6 +14649,7 @@
|
|||||||
<string>Отладка</string>
|
<string>Отладка</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="DebugTerm"/>
|
<addaction name="DebugTerm"/>
|
||||||
|
<addaction name="OpenADCBuff"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="ConnectionMenu"/>
|
<addaction name="ConnectionMenu"/>
|
||||||
<addaction name="M3kteMenu"/>
|
<addaction name="M3kteMenu"/>
|
||||||
@ -14691,6 +14692,11 @@
|
|||||||
<string>Открыть</string>
|
<string>Открыть</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="OpenADCBuff">
|
||||||
|
<property name="text">
|
||||||
|
<string>Буфер АЦП</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user