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].automatic_threshold = channel["automatic_threshold"].toBool();
speed_data->variables_[j].point_name = channel["point_name"].toString();
if(channel.contains("alarmn")){
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();
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) {

View File

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