diff --git a/acceleration.cpp b/acceleration.cpp
index 6f5dee4..289ee91 100644
--- a/acceleration.cpp
+++ b/acceleration.cpp
@@ -218,6 +218,7 @@ void Acceleration::on_pushButton_confirm_clicked()
filter_obj.insert("filter",filter_array);
filter_obj.insert("slot",slot_no);
filter_obj.insert("id",channel);
+ filter_obj.insert("version",1);
QJsonArray variables_array;
for(int i = 0; i < 4; i++){
QJsonObject temp_obj;
@@ -247,6 +248,7 @@ void Acceleration::on_pushButton_confirm_clicked()
variables_obj.insert("comparision_percentage",alert_variables.comparision_percentage);
variables_obj.insert("slot",slot_no);
variables_obj.insert("id",channel);
+ variables_obj.insert("version",1);
QJsonDocument jsonDoc_filter(filter_obj);
QString filePath = QCoreApplication::applicationDirPath() + QString("\\config\\%1\\filter_%2.json").arg(slot_no).arg(channel);
QFile file(filePath);
diff --git a/data_config.h b/data_config.h
index 0c9f2fd..1b5da65 100644
--- a/data_config.h
+++ b/data_config.h
@@ -87,6 +87,24 @@ typedef struct{
int comparision_percentage;
} Alert_Variables;
+typedef struct{
+ int id;
+ bool active;
+ float normal_voltage_low;
+ float normal_voltage_high;
+ bool automatic_threshold;
+ float threshold;
+ float hysteresis;
+ int events_per_revolution;
+ QString record_output;
+ bool two_ma_clamp;
+ bool alert_latching;
+ bool overspeed_latching;
+ bool normal_latching;
+ int alert_response_time;
+ int danger_response_time;
+}Tachometer_Variables;
+
#pragma pack(1)
typedef struct {
uint8_t head[3]; // 固定值:0xAA55AA
diff --git a/keyphase.ui b/keyphase.ui
index c980506..3717d29 100644
--- a/keyphase.ui
+++ b/keyphase.ui
@@ -135,148 +135,9 @@
- 使用
+ 启用
-
-
-
- 10
- 110
- 251
- 191
-
-
-
- 阈值与回差
-
-
-
-
- 10
- 30
- 91
- 91
-
-
-
- 类型
-
-
-
-
- 10
- 30
- 99
- 20
-
-
-
- 自动
-
-
- true
-
-
-
-
-
- 10
- 60
- 71
- 20
-
-
-
- 手动
-
-
-
-
-
-
- 130
- 50
- 41
- 20
-
-
-
- 阈值:
-
-
-
-
- false
-
-
-
- 170
- 50
- 62
- 22
-
-
-
- 1
-
-
-
-
-
- 140
- 80
- 111
- 16
-
-
-
- -20.0 to 0.0 Volts
-
-
-
-
-
- 140
- 150
- 101
- 16
-
-
-
- 0.2 to 2.5 Volts
-
-
-
-
-
- 10
- 150
- 58
- 16
-
-
-
- 回差:
-
-
-
-
-
- 60
- 150
- 62
- 22
-
-
-
- 1
-
-
- 2.000000000000000
-
-
-
@@ -384,76 +245,6 @@
1 - 255
-
-
-
- 10
- 30
- 251
- 71
-
-
-
- 正常电压
-
-
-
-
- 10
- 30
- 91
- 22
-
-
-
- 下限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- -21.000000000000000
-
-
-
-
-
- 110
- 30
- 81
- 22
-
-
-
- 上限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- 21.000000000000000
-
-
-
-
-
- 200
- 32
- 58
- 16
-
-
-
- Volts
-
-
-
@@ -480,6 +271,275 @@
===>
+
+
+
+ 10
+ 40
+ 251
+ 71
+
+
+
+ 正常电压
+
+
+
+
+ 74
+ 40
+ 120
+ 17
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 74
+ 20
+ 120
+ 18
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 200
+ 40
+ 54
+ 17
+
+
+
+ V
+
+
+
+
+
+ -12
+ 20
+ 80
+ 18
+
+
+
+
+ 80
+ 0
+
+
+
+ 上限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -12
+ 40
+ 80
+ 17
+
+
+
+
+ 80
+ 0
+
+
+
+ 下限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 200
+ 20
+ 54
+ 18
+
+
+
+ V
+
+
+
+
+
+
+ 10
+ 120
+ 251
+ 181
+
+
+
+ 阈值
+
+
+
+
+ 10
+ 30
+ 201
+ 51
+
+
+
+ 类型
+
+
+
+
+ 10
+ 20
+ 99
+ 20
+
+
+
+ 自动
+
+
+ true
+
+
+
+
+
+ 80
+ 20
+ 71
+ 20
+
+
+
+ 手动
+
+
+
+
+
+
+ 20
+ 90
+ 41
+ 16
+
+
+
+ 值:
+
+
+
+
+ false
+
+
+
+ 60
+ 90
+ 62
+ 22
+
+
+
+ 1
+
+
+
+
+
+ 140
+ 90
+ 111
+ 16
+
+
+
+ -20.0 to 0.0 Volts
+
+
+
+
+
+ 140
+ 130
+ 101
+ 16
+
+
+
+ 0.2 to 2.5 Volts
+
+
+
+
+
+ 10
+ 130
+ 58
+ 16
+
+
+
+ 回差:
+
+
+
+
+ false
+
+
+
+ 60
+ 130
+ 62
+ 22
+
+
+
+ 1
+
+
+ 2.000000000000000
+
+
+
@@ -501,76 +561,6 @@
255
-
-
-
- 10
- 30
- 251
- 71
-
-
-
- 正常电压
-
-
-
-
- 10
- 30
- 91
- 22
-
-
-
- 下限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- -21.000000000000000
-
-
-
-
-
- 110
- 30
- 81
- 22
-
-
-
- 上限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- 21.000000000000000
-
-
-
-
-
- 200
- 32
- 58
- 16
-
-
-
- Volts
-
-
-
@@ -659,7 +649,7 @@
- 使用
+ 启用
@@ -701,35 +691,35 @@
通道 1
-
+
10
- 110
+ 120
251
- 191
+ 181
- 阈值与回差
+ 阈值
-
+
10
30
- 91
- 91
+ 201
+ 51
类型
-
+
10
- 30
+ 20
99
20
@@ -741,11 +731,11 @@
true
-
+
- 10
- 60
+ 80
+ 20
71
20
@@ -755,27 +745,27 @@
-
+
- 130
- 50
+ 20
+ 90
41
- 20
+ 16
- 阈值:
+ 值:
-
+
false
- 170
- 50
+ 60
+ 90
62
22
@@ -784,11 +774,11 @@
1
-
+
140
- 80
+ 90
111
16
@@ -797,11 +787,11 @@
-20.0 to 0.0 Volts
-
+
140
- 150
+ 130
101
16
@@ -810,11 +800,11 @@
0.2 to 2.5 Volts
-
+
10
- 150
+ 130
58
16
@@ -823,11 +813,14 @@
回差:
-
+
+
+ false
+
60
- 150
+ 130
62
22
@@ -840,6 +833,133 @@
+
+
+
+ 10
+ 40
+ 251
+ 71
+
+
+
+ 正常电压
+
+
+
+
+ 74
+ 40
+ 120
+ 17
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 74
+ 20
+ 120
+ 18
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 200
+ 40
+ 54
+ 17
+
+
+
+ V
+
+
+
+
+
+ -12
+ 20
+ 80
+ 18
+
+
+
+
+ 80
+ 0
+
+
+
+ 上限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -12
+ 40
+ 80
+ 17
+
+
+
+
+ 80
+ 0
+
+
+
+ 下限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 200
+ 20
+ 54
+ 18
+
+
+
+ V
+
+
+
@@ -900,76 +1020,6 @@
255
-
-
-
- 10
- 30
- 251
- 71
-
-
-
- 正常电压
-
-
-
-
- 10
- 30
- 91
- 22
-
-
-
- 下限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- -21.000000000000000
-
-
-
-
-
- 110
- 30
- 81
- 22
-
-
-
- 上限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- 21.000000000000000
-
-
-
-
-
- 200
- 32
- 58
- 16
-
-
-
- Volts
-
-
-
@@ -1058,7 +1108,7 @@
- 使用
+ 启用
@@ -1100,35 +1150,35 @@
通道 4
-
+
10
- 110
+ 120
251
- 191
+ 181
- 阈值与回差
+ 阈值
-
+
10
30
- 91
- 91
+ 201
+ 51
类型
-
+
10
- 30
+ 20
99
20
@@ -1140,11 +1190,11 @@
true
-
+
- 10
- 60
+ 80
+ 20
71
20
@@ -1154,27 +1204,27 @@
-
+
- 130
- 50
+ 20
+ 90
41
- 20
+ 16
- 阈值:
+ 值:
-
+
false
- 170
- 50
+ 60
+ 90
62
22
@@ -1183,11 +1233,11 @@
1
-
+
140
- 80
+ 90
111
16
@@ -1196,11 +1246,11 @@
-20.0 to 0.0 Volts
-
+
140
- 150
+ 130
101
16
@@ -1209,11 +1259,11 @@
0.2 to 2.5 Volts
-
+
10
- 150
+ 130
58
16
@@ -1222,11 +1272,14 @@
回差:
-
+
+
+ false
+
60
- 150
+ 130
62
22
@@ -1239,6 +1292,133 @@
+
+
+
+ 10
+ 40
+ 251
+ 71
+
+
+
+ 正常电压
+
+
+
+
+ 74
+ 40
+ 120
+ 17
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 74
+ 20
+ 120
+ 18
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 200
+ 40
+ 54
+ 17
+
+
+
+ V
+
+
+
+
+
+ -12
+ 20
+ 80
+ 18
+
+
+
+
+ 80
+ 0
+
+
+
+ 上限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -12
+ 40
+ 80
+ 17
+
+
+
+
+ 80
+ 0
+
+
+
+ 下限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 200
+ 20
+ 54
+ 18
+
+
+
+ V
+
+
+
@@ -1260,76 +1440,6 @@
255
-
-
-
- 10
- 30
- 251
- 71
-
-
-
- 正常电压
-
-
-
-
- 10
- 30
- 91
- 22
-
-
-
- 下限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- -21.000000000000000
-
-
-
-
-
- 110
- 30
- 81
- 22
-
-
-
- 上限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- 21.000000000000000
-
-
-
-
-
- 200
- 32
- 58
- 16
-
-
-
- Volts
-
-
-
@@ -1418,7 +1528,7 @@
- 使用
+ 启用
@@ -1460,35 +1570,35 @@
通道 3
-
+
10
- 110
+ 120
251
- 191
+ 181
- 阈值与回差
+ 阈值
-
+
10
30
- 91
- 91
+ 201
+ 51
类型
-
+
10
- 30
+ 20
99
20
@@ -1500,11 +1610,11 @@
true
-
+
- 10
- 60
+ 80
+ 20
71
20
@@ -1514,27 +1624,27 @@
-
+
- 130
- 50
+ 20
+ 90
41
- 20
+ 16
- 阈值:
+ 值:
-
+
false
- 170
- 50
+ 60
+ 90
62
22
@@ -1543,11 +1653,11 @@
1
-
+
140
- 80
+ 90
111
16
@@ -1556,11 +1666,11 @@
-20.0 to 0.0 Volts
-
+
140
- 150
+ 130
101
16
@@ -1569,11 +1679,11 @@
0.2 to 2.5 Volts
-
+
10
- 150
+ 130
58
16
@@ -1582,11 +1692,14 @@
回差:
-
+
+
+ false
+
60
- 150
+ 130
62
22
@@ -1599,9 +1712,136 @@
+
+
+
+ 10
+ 40
+ 251
+ 71
+
+
+
+ 正常电压
+
+
+
+
+ 74
+ 40
+ 120
+ 17
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 74
+ 20
+ 120
+ 18
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 200
+ 40
+ 54
+ 17
+
+
+
+ V
+
+
+
+
+
+ -12
+ 20
+ 80
+ 18
+
+
+
+
+ 80
+ 0
+
+
+
+ 上限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -12
+ 40
+ 80
+ 17
+
+
+
+
+ 80
+ 0
+
+
+
+ 下限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 200
+ 20
+ 54
+ 18
+
+
+
+ V
+
+
+
-
+
41
diff --git a/mainwindow.cpp b/mainwindow.cpp
index fee0baf..b1134c1 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -457,7 +457,7 @@ void MainWindow::OnButtonGroup(QAbstractButton * slot_btn)
seismic_monitor->setWindowModality(Qt::ApplicationModal);
seismic_monitor->show();
}else if (slot_config.slot_type == RPM){
- Tachometer *tachometer = new Tachometer();
+ Tachometer *tachometer = new Tachometer(button_id);
tachometer->setWindowModality(Qt::ApplicationModal);
tachometer->show();
diff --git a/radial_vibration.cpp b/radial_vibration.cpp
index 33ff303..daed2db 100644
--- a/radial_vibration.cpp
+++ b/radial_vibration.cpp
@@ -229,6 +229,7 @@ void Radial_vibration::on_pushButton_confirm_clicked()
filter_obj.insert("filter",filter_array);
filter_obj.insert("slot",slot_no);
filter_obj.insert("id",channel);
+ filter_obj.insert("version",1);
QJsonArray variables_array;
for(int i = 0; i < 6; i++){
QJsonObject temp_obj;
@@ -255,6 +256,7 @@ void Radial_vibration::on_pushButton_confirm_clicked()
variables_obj.insert("comparision_percentage",alert_variables.comparision_percentage);
variables_obj.insert("slot",slot_no);
variables_obj.insert("id",channel);
+ variables_obj.insert("version",1);
QString filePath_filter = QCoreApplication::applicationDirPath() + QString("\\config\\%1\\filter_%2.json").arg(slot_no).arg(channel);
QString filePath_variables = QCoreApplication::applicationDirPath() + QString("\\config\\%1\\radial_vibration_variables_%2.json").arg(slot_no).arg(channel);
QFile file_filter(filePath_filter);
diff --git a/tachometer.cpp b/tachometer.cpp
index 718da97..00db006 100644
--- a/tachometer.cpp
+++ b/tachometer.cpp
@@ -1,15 +1,70 @@
#include "tachometer.h"
#include "ui_tachometer.h"
+#include
+#include
+#include
+#include
+#include
+#include
-Tachometer::Tachometer(QWidget *parent)
+Tachometer::Tachometer(int slot_no_,QWidget *parent)
: QDialog(parent)
, ui(new Ui::Tachometer)
{
ui->setupUi(this);
ui->widget_body->setProperty("flag", "body");
+ slot_no = slot_no_;
+ QString slot = QString("%1").arg(slot_no);
+
+ QString filePath_tachometer = QCoreApplication::applicationDirPath() + QString("\\config\\%1\\tachometer.json").arg(slot_no);
+ readJsonFile(filePath_tachometer);
+ Init();
}
Tachometer::~Tachometer()
{
+
delete ui;
}
+void Tachometer::readJsonFile(const QString &filePath)
+{
+ QFile file(filePath);
+ if(!file.open(QIODevice::ReadOnly))
+ {
+ qDebug() << "Could not open file for reading";
+ return;
+ }
+ QByteArray saveData = file.readAll();
+ QJsonParseError json_error;
+ QJsonDocument parse_doucment = QJsonDocument::fromJson(saveData, &json_error);
+ if(json_error.error != QJsonParseError::NoError)
+ {
+ qDebug() << "json error!";
+ return;
+ }
+ QJsonObject json_obj = parse_doucment.object();
+ QJsonArray chan_array = json_obj["chan"].toArray();
+ for(int i = 0; i < chan_array.size(); i++){
+ QJsonObject temp_obj = chan_array[i].toObject();
+ tachometer_variables[i].id = temp_obj["id"].toInt();
+ tachometer_variables[i].active = temp_obj["active"].toBool();
+ QJsonArray voltage_range_array = temp_obj["normal_voltage_range"].toArray();
+ tachometer_variables[i].normal_voltage_high = voltage_range_array[1].toDouble();
+ tachometer_variables[i].normal_voltage_low = voltage_range_array[0].toDouble();
+ tachometer_variables[i].threshold = temp_obj["threshold"].toDouble();
+ tachometer_variables[i].hysteresis = temp_obj["hysteresis"].toDouble();
+ tachometer_variables[i].events_per_revolution = temp_obj["events_per_revolution"].toInt();
+ tachometer_variables[i].record_output = temp_obj["record_output"].toString();
+ tachometer_variables[i].two_ma_clamp = temp_obj["two_ma_clamp"].toBool();
+ tachometer_variables[i].alert_latching = temp_obj["alert_latching"].toBool();
+ tachometer_variables[i].overspeed_latching = temp_obj["overspeed_latching"].toBool();
+ tachometer_variables[i].normal_latching = temp_obj["normal_latching"].toBool();
+ tachometer_variables[i].alert_response_time = temp_obj["alert_response_time"].toInt();
+ tachometer_variables[i].danger_response_time = temp_obj["danger_response_time"].toInt();
+ }
+
+}
+void Tachometer::Init()
+{
+
+}
diff --git a/tachometer.h b/tachometer.h
index 1efad0b..ca9acc2 100644
--- a/tachometer.h
+++ b/tachometer.h
@@ -2,7 +2,7 @@
#define TACHOMETER_H
#include
-
+#include "data_config.h"
namespace Ui {
class Tachometer;
}
@@ -12,11 +12,16 @@ class Tachometer : public QDialog
Q_OBJECT
public:
- explicit Tachometer(QWidget *parent = nullptr);
+ explicit Tachometer(int slot_no_,QWidget *parent = nullptr);
~Tachometer();
-
+ int slot_no;
private:
Ui::Tachometer *ui;
+
+ Tachometer_Variables tachometer_variables[4];
+
+ void readJsonFile(const QString &filePath);
+ void Init();
};
#endif // TACHOMETER_H
diff --git a/tachometer.ui b/tachometer.ui
index 6120eba..71cb0ee 100644
--- a/tachometer.ui
+++ b/tachometer.ui
@@ -6,8 +6,8 @@
0
0
- 774
- 637
+ 766
+ 633
@@ -51,54 +51,6 @@
true
-
-
-
- 40
- 50
- 478
- 23
-
-
-
- -
-
-
- 槽位号:
-
-
-
- -
-
-
- true
-
-
-
- 0
- 0
-
-
-
- 7
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
@@ -216,7 +168,7 @@
10
- 13
+ 20
251
71
@@ -224,61 +176,118 @@
正常电压
-
+
- 10
- 30
- 91
- 22
+ 74
+ 40
+ 120
+ 17
-
- 下限
+
+
+ 120
+ 0
+
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- -21.000000000000000
+
+
+ 120
+ 16777215
+
-
+
- 110
- 30
- 81
- 22
+ 74
+ 20
+ 120
+ 18
-
- 上限
+
+
+ 120
+ 0
+
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- 21.000000000000000
+
+
+ 120
+ 16777215
+
-
+
200
- 32
- 58
- 16
+ 40
+ 54
+ 17
- Volts
+ V
+
+
+
+
+
+ -12
+ 20
+ 80
+ 18
+
+
+
+
+ 80
+ 0
+
+
+
+ 上限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -12
+ 40
+ 80
+ 17
+
+
+
+
+ 80
+ 0
+
+
+
+ 下限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 200
+ 20
+ 54
+ 18
+
+
+
+ V
@@ -312,7 +321,7 @@
10
- 93
+ 100
251
181
@@ -325,8 +334,8 @@
10
30
- 91
- 91
+ 201
+ 51
@@ -336,7 +345,7 @@
10
- 30
+ 20
99
20
@@ -351,8 +360,8 @@
- 10
- 60
+ 80
+ 20
71
20
@@ -365,8 +374,8 @@
- 140
- 50
+ 20
+ 90
41
16
@@ -381,8 +390,8 @@
- 170
- 50
+ 60
+ 90
62
22
@@ -395,7 +404,7 @@
140
- 80
+ 90
111
16
@@ -408,7 +417,7 @@
140
- 145
+ 130
101
16
@@ -421,7 +430,7 @@
10
- 140
+ 130
58
16
@@ -431,10 +440,13 @@
+
+ false
+
60
- 140
+ 130
62
22
@@ -682,76 +694,6 @@
通道 2
-
-
-
- 10
- 13
- 251
- 71
-
-
-
- 正常电压
-
-
-
-
- 10
- 30
- 91
- 22
-
-
-
- 下限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- -21.000000000000000
-
-
-
-
-
- 110
- 30
- 81
- 22
-
-
-
- 上限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- 21.000000000000000
-
-
-
-
-
- 200
- 32
- 58
- 16
-
-
-
- Volts
-
-
-
@@ -778,145 +720,6 @@
1 - 255
-
-
-
- 10
- 93
- 251
- 181
-
-
-
- 阈值
-
-
-
-
- 10
- 30
- 91
- 91
-
-
-
- 类型
-
-
-
-
- 10
- 30
- 99
- 20
-
-
-
- 自动
-
-
- true
-
-
-
-
-
- 10
- 60
- 71
- 20
-
-
-
- 手动
-
-
-
-
-
-
- 140
- 50
- 41
- 16
-
-
-
- 值:
-
-
-
-
- false
-
-
-
- 170
- 50
- 62
- 22
-
-
-
- 1
-
-
-
-
-
- 140
- 80
- 111
- 16
-
-
-
- -20.0 to 0.0 Volts
-
-
-
-
-
- 140
- 145
- 101
- 16
-
-
-
- 0.2 to 2.5 Volts
-
-
-
-
-
- 10
- 140
- 58
- 16
-
-
-
- 回差:
-
-
-
-
-
- 60
- 140
- 62
- 22
-
-
-
- 1
-
-
- 2.000000000000000
-
-
-
@@ -1189,16 +992,11 @@
-
-
-
- 通道 3
-
-
+
10
- 13
+ 20
251
71
@@ -1206,64 +1004,268 @@
正常电压
-
+
+
+
+ 74
+ 40
+ 120
+ 17
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 74
+ 20
+ 120
+ 18
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 200
+ 40
+ 54
+ 17
+
+
+
+ V
+
+
+
+
+
+ -12
+ 20
+ 80
+ 18
+
+
+
+
+ 80
+ 0
+
+
+
+ 上限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -12
+ 40
+ 80
+ 17
+
+
+
+
+ 80
+ 0
+
+
+
+ 下限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 200
+ 20
+ 54
+ 18
+
+
+
+ V
+
+
+
+
+
+
+ 10
+ 100
+ 251
+ 181
+
+
+
+ 阈值
+
+
10
30
- 91
+ 201
+ 51
+
+
+
+ 类型
+
+
+
+
+ 10
+ 20
+ 99
+ 20
+
+
+
+ 自动
+
+
+ true
+
+
+
+
+
+ 80
+ 20
+ 71
+ 20
+
+
+
+ 手动
+
+
+
+
+
+
+ 20
+ 90
+ 41
+ 16
+
+
+
+ 值:
+
+
+
+
+ false
+
+
+
+ 60
+ 90
+ 62
22
-
- 下限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- -21.000000000000000
+
+ 1
-
+
- 110
- 30
- 81
- 22
+ 140
+ 90
+ 111
+ 16
-
- 上限
-
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- 21.000000000000000
+
+ -20.0 to 0.0 Volts
-
+
- 200
- 32
+ 140
+ 130
+ 101
+ 16
+
+
+
+ 0.2 to 2.5 Volts
+
+
+
+
+
+ 10
+ 130
58
16
- Volts
+ 回差:
+
+
+
+
+ false
+
+
+
+ 60
+ 130
+ 62
+ 22
+
+
+
+ 1
+
+
+ 2.000000000000000
+
+
+
+ 通道 3
+
@@ -1290,145 +1292,6 @@
1 - 255
-
-
-
- 10
- 93
- 251
- 181
-
-
-
- 阈值
-
-
-
-
- 10
- 30
- 91
- 91
-
-
-
- 类型
-
-
-
-
- 10
- 30
- 99
- 20
-
-
-
- 自动
-
-
- true
-
-
-
-
-
- 10
- 60
- 71
- 20
-
-
-
- 手动
-
-
-
-
-
-
- 140
- 50
- 41
- 16
-
-
-
- 值:
-
-
-
-
- false
-
-
-
- 170
- 50
- 62
- 22
-
-
-
- 1
-
-
-
-
-
- 140
- 80
- 111
- 16
-
-
-
- -20.0 to 0.0 Volts
-
-
-
-
-
- 140
- 145
- 101
- 16
-
-
-
- 0.2 to 2.5 Volts
-
-
-
-
-
- 10
- 140
- 58
- 16
-
-
-
- 回差:
-
-
-
-
-
- 60
- 140
- 62
- 22
-
-
-
- 1
-
-
- 2.000000000000000
-
-
-
@@ -1701,16 +1564,153 @@
-
-
-
- 通道 4
-
-
+
10
- 13
+ 100
+ 251
+ 181
+
+
+
+ 阈值
+
+
+
+
+ 10
+ 30
+ 201
+ 51
+
+
+
+ 类型
+
+
+
+
+ 10
+ 20
+ 99
+ 20
+
+
+
+ 自动
+
+
+ true
+
+
+
+
+
+ 80
+ 20
+ 71
+ 20
+
+
+
+ 手动
+
+
+
+
+
+
+ 20
+ 90
+ 41
+ 16
+
+
+
+ 值:
+
+
+
+
+ false
+
+
+
+ 60
+ 90
+ 62
+ 22
+
+
+
+ 1
+
+
+
+
+
+ 140
+ 90
+ 111
+ 16
+
+
+
+ -20.0 to 0.0 Volts
+
+
+
+
+
+ 140
+ 130
+ 101
+ 16
+
+
+
+ 0.2 to 2.5 Volts
+
+
+
+
+
+ 10
+ 130
+ 58
+ 16
+
+
+
+ 回差:
+
+
+
+
+ false
+
+
+
+ 60
+ 130
+ 62
+ 22
+
+
+
+ 1
+
+
+ 2.000000000000000
+
+
+
+
+
+
+ 10
+ 20
251
71
@@ -1718,64 +1718,126 @@
正常电压
-
+
- 10
- 30
- 91
- 22
+ 74
+ 40
+ 120
+ 17
-
- 下限
+
+
+ 120
+ 0
+
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- -21.000000000000000
+
+
+ 120
+ 16777215
+
-
+
- 110
- 30
- 81
- 22
+ 74
+ 20
+ 120
+ 18
-
- 上限
+
+
+ 120
+ 0
+
-
- -30.000000000000000
-
-
- 30.000000000000000
-
-
- 21.000000000000000
+
+
+ 120
+ 16777215
+
-
+
200
- 32
- 58
- 16
+ 40
+ 54
+ 17
- Volts
+ V
+
+
+
+
+
+ -12
+ 20
+ 80
+ 18
+
+
+
+
+ 80
+ 0
+
+
+
+ 上限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -12
+ 40
+ 80
+ 17
+
+
+
+
+ 80
+ 0
+
+
+
+ 下限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 200
+ 20
+ 54
+ 18
+
+
+
+ V
+
+
+
+ 通道 4
+
@@ -1802,145 +1864,6 @@
1 - 255
-
-
-
- 10
- 93
- 251
- 181
-
-
-
- 阈值
-
-
-
-
- 10
- 30
- 91
- 91
-
-
-
- 类型
-
-
-
-
- 10
- 30
- 99
- 20
-
-
-
- 自动
-
-
- true
-
-
-
-
-
- 10
- 60
- 71
- 20
-
-
-
- 手动
-
-
-
-
-
-
- 140
- 50
- 41
- 16
-
-
-
- 值:
-
-
-
-
- false
-
-
-
- 170
- 50
- 62
- 22
-
-
-
- 1
-
-
-
-
-
- 140
- 80
- 111
- 16
-
-
-
- -20.0 to 0.0 Volts
-
-
-
-
-
- 140
- 145
- 101
- 16
-
-
-
- 0.2 to 2.5 Volts
-
-
-
-
-
- 10
- 140
- 58
- 16
-
-
-
- 回差:
-
-
-
-
-
- 60
- 140
- 62
- 22
-
-
-
- 1
-
-
- 2.000000000000000
-
-
-
@@ -2213,6 +2136,275 @@
+
+
+
+ 10
+ 100
+ 251
+ 181
+
+
+
+ 阈值
+
+
+
+
+ 10
+ 30
+ 201
+ 51
+
+
+
+ 类型
+
+
+
+
+ 10
+ 20
+ 99
+ 20
+
+
+
+ 自动
+
+
+ true
+
+
+
+
+
+ 80
+ 20
+ 71
+ 20
+
+
+
+ 手动
+
+
+
+
+
+
+ 20
+ 90
+ 41
+ 16
+
+
+
+ 值:
+
+
+
+
+ false
+
+
+
+ 60
+ 90
+ 62
+ 22
+
+
+
+ 1
+
+
+
+
+
+ 140
+ 90
+ 111
+ 16
+
+
+
+ -20.0 to 0.0 Volts
+
+
+
+
+
+ 140
+ 130
+ 101
+ 16
+
+
+
+ 0.2 to 2.5 Volts
+
+
+
+
+
+ 10
+ 130
+ 58
+ 16
+
+
+
+ 回差:
+
+
+
+
+ false
+
+
+
+ 60
+ 130
+ 62
+ 22
+
+
+
+ 1
+
+
+ 2.000000000000000
+
+
+
+
+
+
+ 10
+ 20
+ 251
+ 71
+
+
+
+ 正常电压
+
+
+
+
+ 74
+ 40
+ 120
+ 17
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 74
+ 20
+ 120
+ 18
+
+
+
+
+ 120
+ 0
+
+
+
+
+ 120
+ 16777215
+
+
+
+
+
+
+ 200
+ 40
+ 54
+ 17
+
+
+
+ V
+
+
+
+
+
+ -12
+ 20
+ 80
+ 18
+
+
+
+
+ 80
+ 0
+
+
+
+ 上限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -12
+ 40
+ 80
+ 17
+
+
+
+
+ 80
+ 0
+
+
+
+ 下限:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 200
+ 20
+ 54
+ 18
+
+
+
+ V
+
+
+
@@ -2244,6 +2436,45 @@
测点名称
+
+
+
+ 41
+ 50
+ 311
+ 22
+
+
+
+ -
+
+
+ 槽位号:
+
+
+
+ -
+
+
+ 7
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
diff --git a/tmrrelayassociation.ui b/tmrrelayassociation.ui
index 3c5c9bf..5063c58 100644
--- a/tmrrelayassociation.ui
+++ b/tmrrelayassociation.ui
@@ -420,7 +420,7 @@
510
320
271
- 51
+ 61
diff --git a/velocity.cpp b/velocity.cpp
index 25a34ed..73e58b1 100644
--- a/velocity.cpp
+++ b/velocity.cpp
@@ -211,6 +211,9 @@ void Velocity::on_pushButton_confirm_clicked()
filter_array.append(temp_obj);
}
filter_obj.insert("filter",filter_array);
+ filter_obj.insert("slot",slot_no);
+ filter_obj.insert("id",channel);
+ filter_obj.insert("version",1);
QJsonDocument filter_doc;
filter_doc.setObject(filter_obj);
QByteArray filter_data = filter_doc.toJson();
@@ -263,6 +266,7 @@ void Velocity::on_pushButton_confirm_clicked()
variables_obj.insert("comparision_percentage",alert_variables.comparision_percentage);
variables_obj.insert("slot",slot_no);
variables_obj.insert("channel",channel);
+ variables_obj.insert("version",1);
QJsonDocument variables_doc;
variables_doc.setObject(variables_obj);
QByteArray variables_data = variables_doc.toJson();