This commit is contained in:
zhangsheng 2025-09-01 17:52:46 +08:00
parent 97dbfa589e
commit f59b9dff3d
2 changed files with 18 additions and 17 deletions

View File

@ -1041,18 +1041,19 @@ void ConfigMgr::Load(QString filename) {
speed_data->variables_[j].default_speed = channel["default_speed"].toInt(); speed_data->variables_[j].default_speed = channel["default_speed"].toInt();
speed_data->variables_[j].automatic_threshold = channel["automatic_threshold"].toBool(); speed_data->variables_[j].automatic_threshold = channel["automatic_threshold"].toBool();
speed_data->variables_[j].point_name = channel["point_name"].toString(); speed_data->variables_[j].point_name = channel["point_name"].toString();
if(channel.contains("alarmn")){
QJsonObject alarm = channel["alarm"].toObject(); QJsonObject alarm = channel["alarm"].toObject();
speed_data->danger_high[j].level = alarm["danger_high_level"].toDouble(); 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].hysteresis = alarm["danger_high_hysteresis"].toDouble();
speed_data->danger_high[j].delay = alarm["danger_high_delay"].toInt(); 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].enable = alarm["danger_high_enable"].toBool();
speed_data->danger_high[j].latch = alarm["danger_high_latch"].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].level = alarm["alert_high_level"].toDouble();
speed_data->alert_high[j].hysteresis = alarm["alert_high_hysteresis"].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].delay = alarm["alert_high_delay"].toInt();
speed_data->alert_high[j].enable = alarm["alert_high_enable"].toBool(); speed_data->alert_high[j].enable = alarm["alert_high_enable"].toBool();
speed_data->alert_high[j].latch = alarm["alert_high_latch"].toBool(); speed_data->alert_high[j].latch = alarm["alert_high_latch"].toBool();
}
} }
cards_.push_back(speed_data); cards_.push_back(speed_data);
} else if (card_type_[i] == kCardKeyphaseSingle) { } else if (card_type_[i] == kCardKeyphaseSingle) {

View File

@ -1004,7 +1004,7 @@
<rect> <rect>
<x>20</x> <x>20</x>
<y>50</y> <y>50</y>
<width>219</width> <width>232</width>
<height>27</height> <height>27</height>
</rect> </rect>
</property> </property>
@ -1013,13 +1013,13 @@
<widget class="QComboBox" name="comboBox"> <widget class="QComboBox" name="comboBox">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>180</width> <width>200</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>120</width> <width>200</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -2204,7 +2204,7 @@
<rect> <rect>
<x>20</x> <x>20</x>
<y>50</y> <y>50</y>
<width>219</width> <width>232</width>
<height>27</height> <height>27</height>
</rect> </rect>
</property> </property>
@ -2213,13 +2213,13 @@
<widget class="QComboBox" name="comboBox_2"> <widget class="QComboBox" name="comboBox_2">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>180</width> <width>200</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>120</width> <width>200</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>