diff --git a/.gitignore b/.gitignore
index d4302b4..a027a73 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
TSI_Config.pro.user
+build/
diff --git a/TSI_Config.pro b/TSI_Config.pro
index ca9dfcb..a5f0235 100644
--- a/TSI_Config.pro
+++ b/TSI_Config.pro
@@ -12,6 +12,8 @@ SOURCES += \
MyTcpClient.cpp \
acceleration.cpp \
cardbase.cpp \
+ channel_1_2.cpp \
+ channel_3_4.cpp \
common.cpp \
config_mgr.cpp \
connect.cpp \
@@ -46,6 +48,8 @@ HEADERS += \
acceleration.h \
acceleration_ds.h \
cardbase.h \
+ channel_1_2.h \
+ channel_3_4.h \
common.h \
config_mgr.h \
connect.h \
@@ -80,6 +84,8 @@ HEADERS += \
FORMS += \
acceleration.ui \
+ channel_1_2.ui \
+ channel_3_4.ui \
connect.ui \
dc_output_channel.ui \
dc_outputs.ui \
diff --git a/acceleration.ui b/acceleration.ui
index 8550698..ef9127d 100644
--- a/acceleration.ui
+++ b/acceleration.ui
@@ -7,7 +7,7 @@
0
0
703
- 622
+ 656
@@ -384,7 +384,7 @@
-
- 1
+ 0
diff --git a/cardbase.h b/cardbase.h
index fdf2398..02dd128 100644
--- a/cardbase.h
+++ b/cardbase.h
@@ -78,5 +78,8 @@ class PressurePulsationVariable : public VariableBase {
int scale_min;
int scale_max;
bool inherited;
+};
+class DefaultVariable : public VariableBase {
+
};
#endif // CARDBASE_H
diff --git a/config_mgr.cpp b/config_mgr.cpp
index 744e0ab..f7c38e8 100644
--- a/config_mgr.cpp
+++ b/config_mgr.cpp
@@ -57,6 +57,9 @@ void ConfigMgr::Save(QString & file_path) {
continue;
}
std::shared_ptr ptr = std::dynamic_pointer_cast(base_ptr);
+ if( ptr->base_config_[cid].channel_type == -1){
+ continue;
+ }
channel_item["standby"] = ptr->base_config_[cid].standby;
channel_item["active"] = ptr->base_config_[cid].active;
// channel_item["rack_type"] = 0; // TODO:
@@ -410,11 +413,97 @@ void ConfigMgr::Save(QString & file_path) {
processed_output["general"] = general;
processed_output["alarm"] = alarm;
variables["processed_output"] = processed_output;
+ }else if(ptr->base_config_[cid].channel_type == kVib12){
+ std::shared_ptr av_ptr = std::dynamic_pointer_cast(base_channel_ptr);
+ if(av_ptr == nullptr){
+ continue;
+ }
+ // filter
+ QJsonArray filter;
+ QJsonObject low_pass;
+ low_pass["low"] = av_ptr->filter_[0].low;
+ low_pass["high"] = av_ptr->filter_[0].high;
+ low_pass["checked"] = av_ptr->filter_[0].checked;
+ filter.append(low_pass);
+ QJsonObject high_pass;
+ high_pass["low"] = av_ptr->filter_[1].low;
+ high_pass["high"] = av_ptr->filter_[1].high;
+ high_pass["checked"] = av_ptr->filter_[1].checked;
+ filter.append(high_pass);
+ QJsonObject band_pass;
+ band_pass["low"] = av_ptr->filter_[2].low;
+ band_pass["high"] = av_ptr->filter_[2].high;
+ band_pass["checked"] = av_ptr->filter_[2].checked;
+ filter.append(band_pass);
+ variables["filter"] = filter;
+ // processed output
+ QJsonObject processed_output,general,alarm;
+ general["output_used"] = av_ptr->general.output_used;
+ general["engieneering_unit"] = av_ptr->general.engineering_unit;
+ general["rectifier_function"] = av_ptr->general.rectifier_function;
+
+ alarm["danger_high_level"] = av_ptr->danger_high.level;
+ alarm["danger_high_hysteresis"] = av_ptr->danger_high.hysteresis;
+ alarm["danger_high_delay"] = av_ptr->danger_high.delay;
+ alarm["danger_high_enable"] = av_ptr->danger_high.enable;
+ alarm["danger_high_latch"] = av_ptr->danger_high.latch;
+ alarm["alert_high_level"] = av_ptr->alert_high.level;
+ alarm["alert_high_hysteresis"] = av_ptr->alert_high.hysteresis;
+ alarm["alert_high_delay"] = av_ptr->alert_high.delay;
+ alarm["alert_high_enable"] = av_ptr->alert_high.enable;
+ alarm["alert_high_latch"] = av_ptr->alert_high.latch;
+ processed_output["general"] = general;
+ processed_output["alarm"] = alarm;
+ variables["processed_output"] = processed_output;
+
+ }else if(ptr->base_config_[cid].channel_type == kVib34){
+ std::shared_ptr av_ptr = std::dynamic_pointer_cast(base_channel_ptr);
+ if(av_ptr == nullptr){
+ continue;
+ }
+ // filter
+ QJsonArray filter;
+ QJsonObject low_pass;
+ low_pass["low"] = av_ptr->filter_[0].low;
+ low_pass["high"] = av_ptr->filter_[0].high;
+ low_pass["checked"] = av_ptr->filter_[0].checked;
+ filter.append(low_pass);
+ QJsonObject high_pass;
+ high_pass["low"] = av_ptr->filter_[1].low;
+ high_pass["high"] = av_ptr->filter_[1].high;
+ high_pass["checked"] = av_ptr->filter_[1].checked;
+ filter.append(high_pass);
+ QJsonObject band_pass;
+ band_pass["low"] = av_ptr->filter_[2].low;
+ band_pass["high"] = av_ptr->filter_[2].high;
+ band_pass["checked"] = av_ptr->filter_[2].checked;
+ filter.append(band_pass);
+ variables["filter"] = filter;
+ // processed output
+ QJsonObject processed_output,general,alarm;
+ general["output_used"] = av_ptr->general.output_used;
+ general["engieneering_unit"] = av_ptr->general.engineering_unit;
+ general["rectifier_function"] = av_ptr->general.rectifier_function;
+
+ alarm["danger_high_level"] = av_ptr->danger_high.level;
+ alarm["danger_high_hysteresis"] = av_ptr->danger_high.hysteresis;
+ alarm["danger_high_delay"] = av_ptr->danger_high.delay;
+ alarm["danger_high_enable"] = av_ptr->danger_high.enable;
+ alarm["danger_high_latch"] = av_ptr->danger_high.latch;
+ alarm["alert_high_level"] = av_ptr->alert_high.level;
+ alarm["alert_high_hysteresis"] = av_ptr->alert_high.hysteresis;
+ alarm["alert_high_delay"] = av_ptr->alert_high.delay;
+ alarm["alert_high_enable"] = av_ptr->alert_high.enable;
+ alarm["alert_high_latch"] = av_ptr->alert_high.latch;
+ processed_output["general"] = general;
+ processed_output["alarm"] = alarm;
+ variables["processed_output"] = processed_output;
+
}
channel_item["variable"] = variables;
} else if (card_type_[i] == kCardSpeedSingle || card_type_[i] == kCardSpeedTMRPrimary) {
std::shared_ptr base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot);
- if (base_ptr == nullptr) {
+ if (base_ptr == nullptr || cid > 3) {
continue;
}
std::shared_ptr ptr = std::dynamic_pointer_cast(base_ptr);
@@ -442,6 +531,18 @@ void ConfigMgr::Save(QString & file_path) {
channel_item.insert("default_speed", ptr->variables_[cid].default_speed);
channel_item.insert("automatic_threshold",ptr->variables_[cid].automatic_threshold);
channel_item.insert("point_name",ptr->variables_[cid].point_name);
+ QJsonObject alarm;
+ alarm["danger_high_level"] = ptr->danger_high[cid].level;
+ alarm["danger_high_hysteresis"] = ptr->danger_high[cid].hysteresis;
+ alarm["danger_high_delay"] = ptr->danger_high[cid].delay;
+ alarm["danger_high_enable"] = ptr->danger_high[cid].enable;
+ alarm["danger_high_latch"] = ptr->danger_high[cid].latch;
+ alarm["alert_high_level"] = ptr->alert_high[cid].level;
+ alarm["alert_high_hysteresis"] = ptr->alert_high[cid].hysteresis;
+ alarm["alert_high_delay"] = ptr->alert_high[cid].delay;
+ alarm["alert_high_enable"] = ptr->alert_high[cid].enable;
+ alarm["alert_high_latch"] = ptr->alert_high[cid].latch;
+ channel_item.insert("alarm" , alarm);
} else if (card_type_[i] == kCardKeyphaseSingle) {
std::shared_ptr base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot);
@@ -867,6 +968,52 @@ void ConfigMgr::Load(QString filename) {
vib_data->variables_.push_back(variable);
break;
}
+ case kVib12: {
+ std::shared_ptr variable = std::make_shared();
+ variable->id_ = j + 1;
+ QJsonObject processed_output, general, alarm;
+ processed_output = tmp_variable["processed_output"].toObject();
+ general = processed_output["general"].toObject();
+ alarm = processed_output["alarm"].toObject();
+ variable->general.output_used = general["output_used"].toBool();
+ variable->general.engineering_unit = general["engieneering_unit"].toInt();
+ variable->general.rectifier_function = general["rectifier_function"].toInt();
+ variable->danger_high.level = alarm["danger_high_level"].toDouble();
+ variable->danger_high.hysteresis = alarm["danger_high_hysteresis"].toDouble();
+ variable->danger_high.delay = alarm["danger_high_delay"].toInt();
+ variable->danger_high.enable = alarm["danger_high_enable"].toBool();
+ variable->danger_high.latch = alarm["danger_high_latch"].toBool();
+ variable->alert_high.level = alarm["alert_high_level"].toDouble();
+ variable->alert_high.hysteresis = alarm["alert_high_hysteresis"].toDouble();
+ variable->alert_high.delay = alarm["alert_high_delay"].toInt();
+ variable->alert_high.enable = alarm["alert_high_enable"].toBool();
+ variable->alert_high.latch = alarm["alert_high_latch"].toBool();
+ vib_data->variables_.push_back(variable);
+ break;
+ }
+ case kVib34: {
+ std::shared_ptr variable = std::make_shared();
+ variable->id_ = j + 1;
+ QJsonObject processed_output, general, alarm;
+ processed_output = tmp_variable["processed_output"].toObject();
+ general = processed_output["general"].toObject();
+ alarm = processed_output["alarm"].toObject();
+ variable->general.output_used = general["output_used"].toBool();
+ variable->general.engineering_unit = general["engieneering_unit"].toInt();
+ variable->general.rectifier_function = general["rectifier_function"].toInt();
+ variable->danger_high.level = alarm["danger_high_level"].toDouble();
+ variable->danger_high.hysteresis = alarm["danger_high_hysteresis"].toDouble();
+ variable->danger_high.delay = alarm["danger_high_delay"].toInt();
+ variable->danger_high.enable = alarm["danger_high_enable"].toBool();
+ variable->danger_high.latch = alarm["danger_high_latch"].toBool();
+ variable->alert_high.level = alarm["alert_high_level"].toDouble();
+ variable->alert_high.hysteresis = alarm["alert_high_hysteresis"].toDouble();
+ variable->alert_high.delay = alarm["alert_high_delay"].toInt();
+ variable->alert_high.enable = alarm["alert_high_enable"].toBool();
+ variable->alert_high.latch = alarm["alert_high_latch"].toBool();
+ vib_data->variables_.push_back(variable);
+ break;
+ }
}
}
cards_.push_back(vib_data);
@@ -876,7 +1023,7 @@ void ConfigMgr::Load(QString filename) {
speed_data->slot_ = slot;
speed_data->card_type_ = static_cast(card_type_[i]);
speed_data->version_ = temp_obj["version"].toInt();
- for (int j = 0; j < CHANNEL_COUNT; ++j) {
+ for (int j = 0; j < CHANNEL_COUNT_SPEED; ++j) {
channel = temp_obj[QString::number(j + 1)].toObject();
speed_data->variables_[j].active = channel["active"].toBool();
QJsonArray voltage_range_array = channel["normal_voltage_range"].toArray();
@@ -895,13 +1042,17 @@ void ConfigMgr::Load(QString filename) {
speed_data->variables_[j].automatic_threshold = channel["automatic_threshold"].toBool();
speed_data->variables_[j].point_name = channel["point_name"].toString();
-
- QJsonObject setpoint_data = channel["setpoint"].toObject();
- speed_data->alert_danger[j].speed_upper = setpoint_data["speed_upper"].toDouble();
- speed_data->alert_danger[j].speed_lower = setpoint_data["speed_lower"].toDouble();
- speed_data->alert_danger[j].speed_upper_enable = setpoint_data["speed_upper_enable"].toBool();
- speed_data->alert_danger[j].speed_lower_enable = setpoint_data["speed_lower_enable"].toBool();
- speed_data->alert_danger[j].danger_speed_upper = setpoint_data["danger_speed_upper"].toDouble();
+ QJsonObject alarm = channel["alarm"].toObject();
+ speed_data->danger_high[j].level = alarm["danger_high_level"].toDouble();
+ speed_data->danger_high[j].hysteresis = alarm["danger_high_hysteresis"].toDouble();
+ speed_data->danger_high[j].delay = alarm["danger_high_delay"].toInt();
+ speed_data->danger_high[j].enable = alarm["danger_high_enable"].toBool();
+ speed_data->danger_high[j].latch = alarm["danger_high_latch"].toBool();
+ speed_data->alert_high[j].level = alarm["alert_high_level"].toDouble();
+ speed_data->alert_high[j].hysteresis = alarm["alert_high_hysteresis"].toDouble();
+ speed_data->alert_high[j].delay = alarm["alert_high_delay"].toInt();
+ speed_data->alert_high[j].enable = alarm["alert_high_enable"].toBool();
+ speed_data->alert_high[j].latch = alarm["alert_high_latch"].toBool();
}
cards_.push_back(speed_data);
} else if (card_type_[i] == kCardKeyphaseSingle) {
@@ -909,7 +1060,7 @@ void ConfigMgr::Load(QString filename) {
keyphase_data->slot_ = slot;
keyphase_data->card_type_ = static_cast(card_type_[i]);
keyphase_data->version_ = temp_obj["version"].toInt();
- for (int j = 0; j < CHANNEL_COUNT; ++j) {
+ for (int j = 0; j < CHANNEL_COUNT_SPEED; ++j) {
channel = temp_obj[QString::number(j + 1)].toObject();
keyphase_data->variables_[j].active = channel["active"].toBool();
QJsonArray voltage_range_array = channel["normal_voltage_range"].toArray();
diff --git a/data_config.h b/data_config.h
index 35aa465..9fb400b 100644
--- a/data_config.h
+++ b/data_config.h
@@ -9,11 +9,12 @@ typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
#define SLOT_NUM 15
-#define CHANNEL_COUNT 4
+#define CHANNEL_COUNT 6
+#define CHANNEL_COUNT_SPEED 4
#define RELAY_COUNT 16
typedef struct {
- bool used[4]; // 是否已配置
+ bool used[6]; // 是否已配置
int channel;
}ChannelUsed;
@@ -59,7 +60,9 @@ typedef enum {
kVibAcc = 1, // 加速度
kVibVelocity = 2, // 速度
kVibThrust = 3, //轴向位移
- kVibPressurePulsation = 4 //动态压力脉动
+ kVibPressurePulsation = 4, //动态压力脉动
+ kVib12 = 5, // 通道1&2
+ kVib34 = 6, // 通道3&4
} VibChannelType;
enum TotalCalcValueType {
// 转速
@@ -267,6 +270,7 @@ typedef struct SeismicMonitor_{
normal_voltage_high = 20;
normal_voltage_low = -20;
signal_sensitivity = 8;
+ channel_type = -1;
}
} SeismicMonitor;
diff --git a/radial_vibration.ui b/radial_vibration.ui
index 5638b9f..8832fd2 100644
--- a/radial_vibration.ui
+++ b/radial_vibration.ui
@@ -98,7 +98,7 @@
-
- 2
+ 1
@@ -1125,13 +1125,6 @@
- -
-
-
- %
-
-
-
diff --git a/seismic_monitor.cpp b/seismic_monitor.cpp
index 92e657a..c22462a 100644
--- a/seismic_monitor.cpp
+++ b/seismic_monitor.cpp
@@ -15,6 +15,8 @@
#include "trust.h"
#include
#include "pressure_pulsation.h"
+#include "channel_1_2.h"
+#include "channel_3_4.h"
Seismic_monitor::Seismic_monitor(int slot,int cardtype, QWidget *parent) :
QWidget(parent),
@@ -502,3 +504,19 @@ void Seismic_monitor::on_comboBox_sensitivity_unit_4_currentTextChanged(const QS
ui->label_signal_sensitivity_4->setText(str);
}
+
+void Seismic_monitor::on_pushButton_config_1_2_clicked()
+{
+ Channel_1_2 *ch1_2 = new Channel_1_2(slot_no, 5);
+ ch1_2->setWindowModality(Qt::ApplicationModal);
+ ch1_2->show();
+}
+
+
+void Seismic_monitor::on_pushButton_config_3_4_clicked()
+{
+ Channel_3_4 *ch3_4 = new Channel_3_4(slot_no, 6);
+ ch3_4->setWindowModality(Qt::ApplicationModal);
+ ch3_4->show();
+}
+
diff --git a/seismic_monitor.h b/seismic_monitor.h
index 2953526..5a6565b 100644
--- a/seismic_monitor.h
+++ b/seismic_monitor.h
@@ -57,6 +57,10 @@ class Seismic_monitor : public QWidget {
void on_comboBox_sensitivity_unit_4_currentTextChanged(const QString &arg1);
+ void on_pushButton_config_1_2_clicked();
+
+ void on_pushButton_config_3_4_clicked();
+
private:
Ui::Seismic_monitor *ui;
void UpdateData(std::shared_ptr vib_data);
diff --git a/seismic_monitor.ui b/seismic_monitor.ui
index 24b4011..693ddd2 100644
--- a/seismic_monitor.ui
+++ b/seismic_monitor.ui
@@ -7,7 +7,7 @@
0
0
975
- 662
+ 697
@@ -52,7 +52,7 @@
10
20
113
- 17
+ 21
@@ -111,7 +111,7 @@
- 2
+ 0
@@ -993,13 +993,13 @@
通道1-通道2
-
+
20
50
- 218
- 23
+ 219
+ 27
@@ -1058,6 +1058,19 @@
+
+
+
+ 30
+ 120
+ 93
+ 28
+
+
+
+ 配置
+
+
@@ -1214,7 +1227,7 @@
10
210
52
- 75
+ 91
@@ -1292,7 +1305,7 @@
- 2
+ 0
@@ -2174,13 +2187,13 @@
通道3-通道4
-
+
20
50
- 218
- 23
+ 219
+ 27
@@ -2239,6 +2252,19 @@
+
+
+
+ 50
+ 130
+ 93
+ 28
+
+
+
+ 配置
+
+
diff --git a/tachometer.cpp b/tachometer.cpp
index bc9d129..d4e54b6 100644
--- a/tachometer.cpp
+++ b/tachometer.cpp
@@ -76,7 +76,7 @@ void Tachometer::UpdateData(std::shared_ptr &speed_data) {
speed_data->card_type_ = kCardSpeedSingle;
speed_data->slot_ = slot_no;
speed_data->version_ = 1;
- for (int i = 0; i < CHANNEL_COUNT; i++) {
+ for (int i = 0; i < CHANNEL_COUNT_SPEED; i++) {
if (i + 1 == 1) {
speed_data->variables_[i].active = ui->checkBox_chan_1->isChecked();
speed_data->variables_[i].normal_voltage_high = ui->doubleSpinBox_high_1->value();
@@ -95,6 +95,27 @@ void Tachometer::UpdateData(std::shared_ptr &speed_data) {
speed_data->variables_[i].two_ma_clamp = ui->checkBox_two_ma_clamp_1->isChecked();
speed_data->variables_[i].alert_latching = ui->radioButton_alert_latching_1->isChecked();
speed_data->variables_[i].overspeed_latching = ui->radioButton_overspeed_latching_1->isChecked();
+ // -alarm
+ speed_data->danger_high[i].level = ui->lineEdit_danger_high_level->text().toDouble();
+ speed_data->danger_high[i].hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
+ speed_data->danger_high[i].delay = ui->lineEdit_danger_high_delay->text().toDouble();
+ speed_data->danger_high[i].enable = ui->checkBox_danger_high_enable->isChecked();
+ speed_data->danger_high[i].latch = ui->checkBox_danger_high_latch->isChecked();
+ speed_data->alert_high[i].level = ui->lineEdit_alert_high_level->text().toDouble();
+ speed_data->alert_high[i].hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
+ speed_data->alert_high[i].delay = ui->lineEdit_alert_high_delay->text().toDouble();
+ speed_data->alert_high[i].enable = ui->checkBox_alert_high_enable->isChecked();
+ speed_data->alert_high[i].latch = ui->checkBox_alert_high_latch->isChecked();
+ speed_data->danger_low[i].level = ui->lineEdit_danger_low_level->text().toDouble();
+ speed_data->danger_low[i].hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
+ speed_data->danger_low[i].delay = ui->lineEdit_danger_low_delay->text().toDouble();
+ speed_data->danger_low[i].enable = ui->checkBox_danger_low_enable->isChecked();
+ speed_data->danger_low[i].latch = ui->checkBox_danger_low_latch->isChecked();
+ speed_data->alert_low[i].level = ui->lineEdit_alert_low_level->text().toDouble();
+ speed_data->alert_low[i].hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble();
+ speed_data->alert_low[i].delay = ui->lineEdit_alert_low_delay->text().toDouble();
+ speed_data->alert_low[i].enable = ui->checkBox_alert_low_enable->isChecked();
+ speed_data->alert_low[i].latch = ui->checkBox_alert_low_latch->isChecked();
} else if (i + 1 == 2) {
speed_data->variables_[i].active = ui->checkBox_chan_2->isChecked();
speed_data->variables_[i].normal_voltage_high = ui->doubleSpinBox_high_2->value();
@@ -113,6 +134,27 @@ void Tachometer::UpdateData(std::shared_ptr &speed_data) {
speed_data->variables_[i].two_ma_clamp = ui->checkBox_two_ma_clamp_2->isChecked();
speed_data->variables_[i].alert_latching = ui->radioButton_alert_latching_2->isChecked();
speed_data->variables_[i].overspeed_latching = ui->radioButton_overspeed_latching_2->isChecked();
+ // -alarm
+ speed_data->danger_high[i].level = ui->lineEdit_danger_high_level_2->text().toDouble();
+ speed_data->danger_high[i].hysteresis = ui->lineEdit_danger_high_hysteresis_2->text().toDouble();
+ speed_data->danger_high[i].delay = ui->lineEdit_danger_high_delay_2->text().toDouble();
+ speed_data->danger_high[i].enable = ui->checkBox_danger_high_enable_2->isChecked();
+ speed_data->danger_high[i].latch = ui->checkBox_danger_high_latch_2->isChecked();
+ speed_data->alert_high[i].level = ui->lineEdit_alert_high_level_2->text().toDouble();
+ speed_data->alert_high[i].hysteresis = ui->lineEdit_alert_high_hysteresis_2->text().toDouble();
+ speed_data->alert_high[i].delay = ui->lineEdit_alert_high_delay_2->text().toDouble();
+ speed_data->alert_high[i].enable = ui->checkBox_alert_high_enable_2->isChecked();
+ speed_data->alert_high[i].latch = ui->checkBox_alert_high_latch_2->isChecked();
+ speed_data->danger_low[i].level = ui->lineEdit_danger_low_level_2->text().toDouble();
+ speed_data->danger_low[i].hysteresis = ui->lineEdit_danger_low_hysteresis_2->text().toDouble();
+ speed_data->danger_low[i].delay = ui->lineEdit_danger_low_delay_2->text().toDouble();
+ speed_data->danger_low[i].enable = ui->checkBox_danger_low_enable_2->isChecked();
+ speed_data->danger_low[i].latch = ui->checkBox_danger_low_latch_2->isChecked();
+ speed_data->alert_low[i].level = ui->lineEdit_alert_low_level_2->text().toDouble();
+ speed_data->alert_low[i].hysteresis = ui->lineEdit_alert_low_hysteresis_2->text().toDouble();
+ speed_data->alert_low[i].delay = ui->lineEdit_alert_low_delay_2->text().toDouble();
+ speed_data->alert_low[i].enable = ui->checkBox_alert_low_enable_2->isChecked();
+ speed_data->alert_low[i].latch = ui->checkBox_alert_low_latch_2->isChecked();
} else if (i + 1 == 3) {
speed_data->variables_[i].active = ui->checkBox_chan_3->isChecked();
speed_data->variables_[i].normal_voltage_high = ui->doubleSpinBox_high_3->value();
@@ -131,6 +173,27 @@ void Tachometer::UpdateData(std::shared_ptr &speed_data) {
speed_data->variables_[i].two_ma_clamp = ui->checkBox_two_ma_clamp_3->isChecked();
speed_data->variables_[i].alert_latching = ui->radioButton_alert_latching_3->isChecked();
speed_data->variables_[i].overspeed_latching = ui->radioButton_overspeed_latching_3->isChecked();
+ // -alarm
+ speed_data->danger_high[i].level = ui->lineEdit_danger_high_level_3->text().toDouble();
+ speed_data->danger_high[i].hysteresis = ui->lineEdit_danger_high_hysteresis_3->text().toDouble();
+ speed_data->danger_high[i].delay = ui->lineEdit_danger_high_delay_3->text().toDouble();
+ speed_data->danger_high[i].enable = ui->checkBox_danger_high_enable_3->isChecked();
+ speed_data->danger_high[i].latch = ui->checkBox_danger_high_latch_3->isChecked();
+ speed_data->alert_high[i].level = ui->lineEdit_alert_high_level_3->text().toDouble();
+ speed_data->alert_high[i].hysteresis = ui->lineEdit_alert_high_hysteresis_3->text().toDouble();
+ speed_data->alert_high[i].delay = ui->lineEdit_alert_high_delay_3->text().toDouble();
+ speed_data->alert_high[i].enable = ui->checkBox_alert_high_enable_3->isChecked();
+ speed_data->alert_high[i].latch = ui->checkBox_alert_high_latch_3->isChecked();
+ speed_data->danger_low[i].level = ui->lineEdit_danger_low_level_3->text().toDouble();
+ speed_data->danger_low[i].hysteresis = ui->lineEdit_danger_low_hysteresis_3->text().toDouble();
+ speed_data->danger_low[i].delay = ui->lineEdit_danger_low_delay_3->text().toDouble();
+ speed_data->danger_low[i].enable = ui->checkBox_danger_low_enable_3->isChecked();
+ speed_data->danger_low[i].latch = ui->checkBox_danger_low_latch_3->isChecked();
+ speed_data->alert_low[i].level = ui->lineEdit_alert_low_level_3->text().toDouble();
+ speed_data->alert_low[i].hysteresis = ui->lineEdit_alert_low_hysteresis_3->text().toDouble();
+ speed_data->alert_low[i].delay = ui->lineEdit_alert_low_delay_3->text().toDouble();
+ speed_data->alert_low[i].enable = ui->checkBox_alert_low_enable_3->isChecked();
+ speed_data->alert_low[i].latch = ui->checkBox_alert_low_latch_3->isChecked();
} else if (i + 1 == 4) {
speed_data->variables_[i].active = ui->checkBox_chan_4->isChecked();
speed_data->variables_[i].normal_voltage_high = ui->doubleSpinBox_high_4->value();
@@ -149,6 +212,27 @@ void Tachometer::UpdateData(std::shared_ptr &speed_data) {
speed_data->variables_[i].two_ma_clamp = ui->checkBox_two_ma_clamp_4->isChecked();
speed_data->variables_[i].alert_latching = ui->radioButton_alert_latching_4->isChecked();
speed_data->variables_[i].overspeed_latching = ui->radioButton_overspeed_latching_4->isChecked();
+ // -alarm
+ speed_data->danger_high[i].level = ui->lineEdit_danger_high_level_4->text().toDouble();
+ speed_data->danger_high[i].hysteresis = ui->lineEdit_danger_high_hysteresis_4->text().toDouble();
+ speed_data->danger_high[i].delay = ui->lineEdit_danger_high_delay_4->text().toDouble();
+ speed_data->danger_high[i].enable = ui->checkBox_danger_high_enable_4->isChecked();
+ speed_data->danger_high[i].latch = ui->checkBox_danger_high_latch_4->isChecked();
+ speed_data->alert_high[i].level = ui->lineEdit_alert_high_level_4->text().toDouble();
+ speed_data->alert_high[i].hysteresis = ui->lineEdit_alert_high_hysteresis_4->text().toDouble();
+ speed_data->alert_high[i].delay = ui->lineEdit_alert_high_delay_4->text().toDouble();
+ speed_data->alert_high[i].enable = ui->checkBox_alert_high_enable_4->isChecked();
+ speed_data->alert_high[i].latch = ui->checkBox_alert_high_latch_4->isChecked();
+ speed_data->danger_low[i].level = ui->lineEdit_danger_low_level_4->text().toDouble();
+ speed_data->danger_low[i].hysteresis = ui->lineEdit_danger_low_hysteresis_4->text().toDouble();
+ speed_data->danger_low[i].delay = ui->lineEdit_danger_low_delay_4->text().toDouble();
+ speed_data->danger_low[i].enable = ui->checkBox_danger_low_enable_4->isChecked();
+ speed_data->danger_low[i].latch = ui->checkBox_danger_low_latch_4->isChecked();
+ speed_data->alert_low[i].level = ui->lineEdit_alert_low_level_4->text().toDouble();
+ speed_data->alert_low[i].hysteresis = ui->lineEdit_alert_low_hysteresis_4->text().toDouble();
+ speed_data->alert_low[i].delay = ui->lineEdit_alert_low_delay_4->text().toDouble();
+ speed_data->alert_low[i].enable = ui->checkBox_alert_low_enable_4->isChecked();
+ speed_data->alert_low[i].latch = ui->checkBox_alert_low_latch_4->isChecked();
}
}
}
@@ -165,7 +249,7 @@ void Tachometer::Init() {
return;
}
std::shared_ptr speed_data = std::dynamic_pointer_cast(base_ptr);
- for (int i = 0; i < CHANNEL_COUNT; i++) {
+ for (int i = 0; i < CHANNEL_COUNT_SPEED; i++) {
if (i + 1 == 1) {
ui->checkBox_chan_1->setChecked(speed_data->variables_[i].active);
ui->doubleSpinBox_high_1->setValue(speed_data->variables_[i].normal_voltage_high);
@@ -196,6 +280,30 @@ void Tachometer::Init() {
} else {
ui->radioButton_overspeed_latching_1->setCheckable(false);
}
+ // -alarm
+ ui->lineEdit_danger_high_level->setText(QString::number(speed_data->danger_high[i].level));
+ ui->lineEdit_danger_high_hysteresis->setText(QString::number(speed_data->danger_high[i].hysteresis));
+ ui->lineEdit_danger_high_delay->setText(QString::number(speed_data->danger_high[i].delay));
+ ui->checkBox_danger_high_enable->setChecked(speed_data->danger_high[i].enable);
+ ui->checkBox_danger_high_latch->setChecked(speed_data->danger_high[i].latch);
+
+ ui->lineEdit_alert_high_level->setText(QString::number(speed_data->alert_high[i].level));
+ ui->lineEdit_alert_high_hysteresis->setText(QString::number(speed_data->alert_high[i].hysteresis));
+ ui->lineEdit_alert_high_delay->setText(QString::number(speed_data->alert_high[i].delay));
+ ui->checkBox_alert_high_enable->setChecked(speed_data->alert_high[i].enable);
+ ui->checkBox_alert_high_latch->setChecked(speed_data->alert_high[i].latch);
+
+ // ui->lineEdit_danger_low_level->setText(QString::number(speed_data->danger_low[i].level));
+ // ui->lineEdit_danger_low_hysteresis->setText(QString::number(speed_data->danger_low[i].hysteresis));
+ // ui->lineEdit_danger_low_delay->setText(QString::number(speed_data->danger_low[i].delay));
+ // ui->checkBox_danger_low_enable->setChecked(speed_data->danger_low[i].enable);
+ // ui->checkBox_danger_low_latch->setChecked(speed_data->danger_low[i].latch);
+
+ // ui->lineEdit_alert_low_level->setText(QString::number(speed_data->alert_low[i].level));
+ // ui->lineEdit_alert_low_hysteresis->setText(QString::number(speed_data->alert_low[i].hysteresis));
+ // ui->lineEdit_alert_low_delay->setText(QString::number(speed_data->alert_low[i].delay));
+ // ui->checkBox_alert_low_enable->setChecked(speed_data->alert_low[i].enable);
+ // ui->checkBox_alert_low_latch->setChecked(speed_data->alert_low[i].latch);
} else if (i + 1 == 2) {
ui->checkBox_chan_2->setChecked(speed_data->variables_[i].active);
ui->doubleSpinBox_high_2->setValue(speed_data->variables_[i].normal_voltage_high);
@@ -226,6 +334,30 @@ void Tachometer::Init() {
} else {
ui->radioButton_overspeed_latching_2->setCheckable(false);
}
+ // -alarm
+ ui->lineEdit_danger_high_level_2->setText(QString::number(speed_data->danger_high[i].level));
+ ui->lineEdit_danger_high_hysteresis_2->setText(QString::number(speed_data->danger_high[i].hysteresis));
+ ui->lineEdit_danger_high_delay_2->setText(QString::number(speed_data->danger_high[i].delay));
+ ui->checkBox_danger_high_enable_2->setChecked(speed_data->danger_high[i].enable);
+ ui->checkBox_danger_high_latch_2->setChecked(speed_data->danger_high[i].latch);
+
+ ui->lineEdit_alert_high_level_2->setText(QString::number(speed_data->alert_high[i].level));
+ ui->lineEdit_alert_high_hysteresis_2->setText(QString::number(speed_data->alert_high[i].hysteresis));
+ ui->lineEdit_alert_high_delay_2->setText(QString::number(speed_data->alert_high[i].delay));
+ ui->checkBox_alert_high_enable_2->setChecked(speed_data->alert_high[i].enable);
+ ui->checkBox_alert_high_latch_2->setChecked(speed_data->alert_high[i].latch);
+
+ // ui->lineEdit_danger_low_level_2->setText(QString::number(speed_data->danger_low[i].level));
+ // ui->lineEdit_danger_low_hysteresis_2->setText(QString::number(speed_data->danger_low[i].hysteresis));
+ // ui->lineEdit_danger_low_delay_2->setText(QString::number(speed_data->danger_low[i].delay));
+ // ui->checkBox_danger_low_enable_2->setChecked(speed_data->danger_low[i].enable);
+ // ui->checkBox_danger_low_latch_2->setChecked(speed_data->danger_low[i].latch);
+
+ // ui->lineEdit_alert_low_level_2->setText(QString::number(speed_data->alert_low[i].level));
+ // ui->lineEdit_alert_low_hysteresis_2->setText(QString::number(speed_data->alert_low[i].hysteresis));
+ // ui->lineEdit_alert_low_delay_2->setText(QString::number(speed_data->alert_low[i].delay));
+ // ui->checkBox_alert_low_enable_2->setChecked(speed_data->alert_low[i].enable);
+ // ui->checkBox_alert_low_latch_2->setChecked(speed_data->alert_low[i].latch);
} else if (i + 1 == 3) {
ui->checkBox_chan_3->setChecked(speed_data->variables_[i].active);
ui->doubleSpinBox_high_3->setValue(speed_data->variables_[i].normal_voltage_high);
@@ -256,6 +388,30 @@ void Tachometer::Init() {
} else {
ui->radioButton_overspeed_latching_3->setCheckable(false);
}
+ // -alarm
+ ui->lineEdit_danger_high_level_3->setText(QString::number(speed_data->danger_high[i].level));
+ ui->lineEdit_danger_high_hysteresis_3->setText(QString::number(speed_data->danger_high[i].hysteresis));
+ ui->lineEdit_danger_high_delay_3->setText(QString::number(speed_data->danger_high[i].delay));
+ ui->checkBox_danger_high_enable_3->setChecked(speed_data->danger_high[i].enable);
+ ui->checkBox_danger_high_latch_3->setChecked(speed_data->danger_high[i].latch);
+
+ ui->lineEdit_alert_high_level_3->setText(QString::number(speed_data->alert_high[i].level));
+ ui->lineEdit_alert_high_hysteresis_3->setText(QString::number(speed_data->alert_high[i].hysteresis));
+ ui->lineEdit_alert_high_delay_3->setText(QString::number(speed_data->alert_high[i].delay));
+ ui->checkBox_alert_high_enable_3->setChecked(speed_data->alert_high[i].enable);
+ ui->checkBox_alert_high_latch_3->setChecked(speed_data->alert_high[i].latch);
+
+ // ui->lineEdit_danger_low_level_3->setText(QString::number(speed_data->danger_low[i].level));
+ // ui->lineEdit_danger_low_hysteresis_3->setText(QString::number(speed_data->danger_low[i].hysteresis));
+ // ui->lineEdit_danger_low_delay_3->setText(QString::number(speed_data->danger_low[i].delay));
+ // ui->checkBox_danger_low_enable_3->setChecked(speed_data->danger_low[i].enable);
+ // ui->checkBox_danger_low_latch_3->setChecked(speed_data->danger_low[i].latch);
+
+ // ui->lineEdit_alert_low_level_3->setText(QString::number(speed_data->alert_low[i].level));
+ // ui->lineEdit_alert_low_hysteresis_3->setText(QString::number(speed_data->alert_low[i].hysteresis));
+ // ui->lineEdit_alert_low_delay_3->setText(QString::number(speed_data->alert_low[i].delay));
+ // ui->checkBox_alert_low_enable_3->setChecked(speed_data->alert_low[i].enable);
+ // ui->checkBox_alert_low_latch_3->setChecked(speed_data->alert_low[i].latch);
} else if (i + 1 == 4) {
ui->checkBox_chan_4->setChecked(speed_data->variables_[i].active);
ui->doubleSpinBox_high_4->setValue(speed_data->variables_[i].normal_voltage_high);
@@ -286,6 +442,30 @@ void Tachometer::Init() {
} else {
ui->radioButton_overspeed_latching_4->setCheckable(false);
}
+ // -alarm
+ ui->lineEdit_danger_high_level_4->setText(QString::number(speed_data->danger_high[i].level));
+ ui->lineEdit_danger_high_hysteresis_4->setText(QString::number(speed_data->danger_high[i].hysteresis));
+ ui->lineEdit_danger_high_delay_4->setText(QString::number(speed_data->danger_high[i].delay));
+ ui->checkBox_danger_high_enable_4->setChecked(speed_data->danger_high[i].enable);
+ ui->checkBox_danger_high_latch_4->setChecked(speed_data->danger_high[i].latch);
+
+ ui->lineEdit_alert_high_level_4->setText(QString::number(speed_data->alert_high[i].level));
+ ui->lineEdit_alert_high_hysteresis_4->setText(QString::number(speed_data->alert_high[i].hysteresis));
+ ui->lineEdit_alert_high_delay_4->setText(QString::number(speed_data->alert_high[i].delay));
+ ui->checkBox_alert_high_enable_4->setChecked(speed_data->alert_high[i].enable);
+ ui->checkBox_alert_high_latch_4->setChecked(speed_data->alert_high[i].latch);
+
+ // ui->lineEdit_danger_low_level_4->setText(QString::number(speed_data->danger_low[i].level));
+ // ui->lineEdit_danger_low_hysteresis_4->setText(QString::number(speed_data->danger_low[i].hysteresis));
+ // ui->lineEdit_danger_low_delay_4->setText(QString::number(speed_data->danger_low[i].delay));
+ // ui->checkBox_danger_low_enable_4->setChecked(speed_data->danger_low[i].enable);
+ // ui->checkBox_danger_low_latch_4->setChecked(speed_data->danger_low[i].latch);
+
+ // ui->lineEdit_alert_low_level_4->setText(QString::number(speed_data->alert_low[i].level));
+ // ui->lineEdit_alert_low_hysteresis_4->setText(QString::number(speed_data->alert_low[i].hysteresis));
+ // ui->lineEdit_alert_low_delay_4->setText(QString::number(speed_data->alert_low[i].delay));
+ // ui->checkBox_alert_low_enable_4->setChecked(speed_data->alert_low[i].enable);
+ // ui->checkBox_alert_low_latch_4->setChecked(speed_data->alert_low[i].latch);
}
}
}
diff --git a/tachometer.ui b/tachometer.ui
index 4e8801f..79b6dd3 100644
--- a/tachometer.ui
+++ b/tachometer.ui
@@ -6,8 +6,8 @@
0
0
- 905
- 667
+ 947
+ 716
@@ -101,13 +101,13 @@
-
- 2
+ 0
通道 1
-
+
-
-
@@ -751,17 +751,569 @@
-
-
-
- Qt::Horizontal
+
+
+ 警报
-
-
- 40
- 20
-
-
-
+
+
-
+
+
-
+
+
+ 20
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 危险 + 高
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 警报 + 高
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 警报 + 低
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 危险 + 低
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 等级
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 回差
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 延时
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ Qt::LeftToRight
+
+
+ 使能
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+ Qt::LeftToRight
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 锁存
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
@@ -771,7 +1323,7 @@
通道 2
-
+
-
-
@@ -1397,17 +1949,569 @@
-
-
-
- Qt::Horizontal
+
+
+ 警报
-
-
- 40
- 20
-
-
-
+
+
-
+
+
-
+
+
+ 20
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 危险 + 高
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 警报 + 高
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 警报 + 低
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 危险 + 低
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 等级
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 回差
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 延时
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ Qt::LeftToRight
+
+
+ 使能
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+ Qt::LeftToRight
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 锁存
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
@@ -1417,7 +2521,7 @@
通道 3
-
+
-
-
@@ -1938,7 +3042,7 @@
-
-
+
-
-
@@ -2043,17 +3147,569 @@
-
-
-
- Qt::Horizontal
+
+
+ 警报
-
-
- 40
- 20
-
-
-
+
+
-
+
+
-
+
+
+ 20
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 危险 + 高
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 警报 + 高
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 警报 + 低
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 危险 + 低
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 等级
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 回差
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 延时
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ Qt::LeftToRight
+
+
+ 使能
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+ Qt::LeftToRight
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 锁存
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
@@ -2689,17 +4345,569 @@
-
-
-
- Qt::Horizontal
+
+
+ 警报
-
-
- 40
- 20
-
-
-
+
+
-
+
+
-
+
+
+ 20
+
+
-
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 危险 + 高
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 警报 + 高
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 警报 + 低
+
+
+
+ -
+
+
+
+ 0
+ 20
+
+
+
+
+ 16777215
+ 20
+
+
+
+ 危险 + 低
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 等级
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 回差
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 延时
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 50
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ Qt::LeftToRight
+
+
+ 使能
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+ Qt::LeftToRight
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+ 16777215
+ 25
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 16777215
+ 20
+
+
+
+ 锁存
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 25
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
@@ -2804,7 +5012,7 @@
-
+
diff --git a/tachometer_data.h b/tachometer_data.h
index f9ae659..902461f 100644
--- a/tachometer_data.h
+++ b/tachometer_data.h
@@ -11,6 +11,10 @@ class TachometerData : public CardBase {
TachometerVariables variables_[4];
SpeedAlert alert_danger[CHANNEL_COUNT];
+ AlarmDangerHigh danger_high[CHANNEL_COUNT_SPEED];
+ AlarmAlertHigh alert_high[CHANNEL_COUNT_SPEED];
+ AlarmDangerLow danger_low[CHANNEL_COUNT_SPEED];
+ AlarmAlertLow alert_low[CHANNEL_COUNT_SPEED];
};
#endif // TACHOMETERDATA_H
diff --git a/trust.ui b/trust.ui
index fc8793e..58a8fb8 100644
--- a/trust.ui
+++ b/trust.ui
@@ -559,7 +559,7 @@
10
25
164
- 50
+ 59