Доработка проверки яу 07б
и корректировка температур ум в контроле
This commit is contained in:
@@ -69,7 +69,7 @@ static func temperature_fill(temperature_arr_node: Array, temperature_dic: Dicti
|
||||
for i_node_temperature in temperature_arr_node:
|
||||
var temperature_meta: String = i_node_temperature.get_meta('um')
|
||||
if not temperature_dic.has(temperature_meta): return
|
||||
i_node_temperature.value1 = temperature_dic[temperature_meta]
|
||||
i_node_temperature.value1 = temperature_dic[temperature_meta] if temperature_dic[temperature_meta] < 361 else -40
|
||||
|
||||
|
||||
static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifier_arr_node: Array, POWER_THRESHOLD: int) -> void:
|
||||
@@ -114,8 +114,6 @@ func on_press_device() -> void:
|
||||
'fs_nodes': fs_nodes,
|
||||
'power_amplifier': power_amplifier,
|
||||
'default_reset_array_node': default_reset_array_node,
|
||||
'POWER_THRESHOLD': unit_prd_k.constants.POWER_THRESHOLD,
|
||||
'name_prd': unit_prd_k.self_name,
|
||||
'module_fs_1': module_fs_1,
|
||||
'module_fs_6': module_fs_6,
|
||||
'dou_6': dou_6,
|
||||
@@ -136,14 +134,16 @@ static func on_control_result(for_result_dic: Dictionary) -> void:
|
||||
if block_kasseta_y5_prd_config_k.has(meta_y5):
|
||||
if not block_kasseta_y5_prd_config_k['yau07']:
|
||||
node_y5.state = STATE_VAL.ERROR if meta_y5 == 'yau07' else STATE_VAL.NONE
|
||||
break
|
||||
node_y5.state = STATE_VAL.GOOD if block_kasseta_y5_prd_config_k[meta_y5] else STATE_VAL.ERROR
|
||||
else:
|
||||
node_y5.state = STATE_VAL.GOOD if block_kasseta_y5_prd_config_k[meta_y5] else STATE_VAL.ERROR
|
||||
|
||||
var block_ip_config_k: Dictionary = for_result_dic.block_ip_config
|
||||
for power_supply in for_result_dic.node_ip_power_arr:
|
||||
var meta_ip = power_supply.get_meta('ip')
|
||||
if block_ip_config_k.has(meta_ip) and block_kasseta_y5_prd_config_k.ug:
|
||||
if block_ip_config_k.has(meta_ip) and block_kasseta_y5_prd_config_k.ug and block_kasseta_y5_prd_config_k.yau07:
|
||||
power_supply.state = STATE_VAL.GOOD if block_ip_config_k[meta_ip][1] else STATE_VAL.ERROR
|
||||
else:
|
||||
power_supply.state = STATE_VAL.NONE
|
||||
|
||||
if not for_result_dic.control_is_over:
|
||||
set_default_state(for_result_dic.default_reset_array_node, for_result_dic.power_amplifier)
|
||||
@@ -200,3 +200,5 @@ func _update_status_text(text: String) -> void:
|
||||
elif "исправен" in text or "завершён" in text:
|
||||
$control_result.add_theme_color_override('font_color', Color.GREEN)
|
||||
log.message(Logger.INFO, 'Прибор ПРД-%s исправен' % [unit_prd_k.self_name])
|
||||
else:
|
||||
$control_result.add_theme_color_override('font_color', Color.WHITE)
|
||||
|
||||
@@ -68,7 +68,7 @@ static func temperature_fill(temperature_arr_node: Array, temperature_dic: Dicti
|
||||
for i_node_temperature in temperature_arr_node:
|
||||
var temperature_meta: String = i_node_temperature.get_meta('um')
|
||||
if not temperature_dic.has(temperature_meta): return
|
||||
i_node_temperature.value1 = temperature_dic[temperature_meta]
|
||||
i_node_temperature.value1 = temperature_dic[temperature_meta] if temperature_dic[temperature_meta] < 361 else -40
|
||||
|
||||
|
||||
static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifier_arr_node: Array, POWER_THRESHOLD: int) -> void:
|
||||
@@ -105,8 +105,6 @@ func on_press_device() -> void:
|
||||
'fs_nodes': fs_nodes,
|
||||
'power_amplifier': power_amplifier_arr_node,
|
||||
'default_reset_array_node': default_reset_array_node,
|
||||
'POWER_THRESHOLD': unit_prd_n.constants.POWER_THRESHOLD,
|
||||
'name_prd': unit_prd_n.self_name,
|
||||
'module_fs_2': module_fs_2,
|
||||
'dou_2': dou_2,
|
||||
'module_fs_3': module_fs_3,
|
||||
@@ -124,16 +122,18 @@ static func on_control_result(for_result_dic: Dictionary) -> void:
|
||||
for node_y5 in nodes_y5:
|
||||
var meta_y5 = node_y5.get_meta('y5')
|
||||
if block_kasseta_y5_prd_config_n.has(meta_y5):
|
||||
if not block_kasseta_y5_prd_config_n['yau07']:
|
||||
if not block_kasseta_y5_prd_config_n.yau07:
|
||||
node_y5.state = STATE_VAL.ERROR if meta_y5 == 'yau07' else STATE_VAL.NONE
|
||||
break
|
||||
node_y5.state = STATE_VAL.GOOD if block_kasseta_y5_prd_config_n[meta_y5] else STATE_VAL.ERROR
|
||||
else:
|
||||
node_y5.state = STATE_VAL.GOOD if block_kasseta_y5_prd_config_n[meta_y5] else STATE_VAL.ERROR
|
||||
|
||||
var block_ip_config_n: Dictionary = for_result_dic.block_ip_config
|
||||
for power_supply in for_result_dic.node_ip_power_arr:
|
||||
var meta_ip = power_supply.get_meta('ip')
|
||||
if block_ip_config_n.has(meta_ip) and block_kasseta_y5_prd_config_n.ug:
|
||||
if block_ip_config_n.has(meta_ip) and block_kasseta_y5_prd_config_n.ug and block_kasseta_y5_prd_config_n.yau07:
|
||||
power_supply.state = STATE_VAL.GOOD if block_ip_config_n[meta_ip][1] else STATE_VAL.ERROR
|
||||
else:
|
||||
power_supply.state = STATE_VAL.NONE
|
||||
|
||||
if not for_result_dic.control_is_over:
|
||||
set_default_state(for_result_dic.default_reset_array_node, for_result_dic.power_amplifier)
|
||||
@@ -187,3 +187,5 @@ func _update_status_text(text: String) -> void:
|
||||
elif "исправен" in text or "завершён" in text:
|
||||
$control_result.add_theme_color_override('font_color', Color.GREEN)
|
||||
log.message(Logger.INFO, 'Прибор ПРД-%s исправен' % [unit_prd_n.self_name])
|
||||
else:
|
||||
$control_result.add_theme_color_override('font_color', Color.WHITE)
|
||||
|
||||
@@ -67,7 +67,7 @@ static func temperature_fill(temperature_arr_node: Array, temperature_dic: Dicti
|
||||
for i_node_temperature in temperature_arr_node:
|
||||
var temperature_meta: String = i_node_temperature.get_meta('um')
|
||||
if not temperature_dic.has(temperature_meta): return
|
||||
i_node_temperature.value1 = temperature_dic[temperature_meta]
|
||||
i_node_temperature.value1 = temperature_dic[temperature_meta] if temperature_dic[temperature_meta] < 361 else -40
|
||||
|
||||
|
||||
static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifier_arr_node: Array, POWER_THRESHOLD: int) -> void:
|
||||
@@ -121,16 +121,18 @@ static func on_control_result(for_result_dic: Dictionary) -> void:
|
||||
for node_y5 in nodes_y5:
|
||||
var meta_y5 = node_y5.get_meta('y5')
|
||||
if block_kasseta_y5_prd_config_v.has(meta_y5):
|
||||
if block_kasseta_y5_prd_config_v['yau07'] == false:
|
||||
if not block_kasseta_y5_prd_config_v.yau07:
|
||||
node_y5.state = STATE_VAL.ERROR if meta_y5 == 'yau07' else STATE_VAL.NONE
|
||||
break
|
||||
node_y5.state = STATE_VAL.GOOD if block_kasseta_y5_prd_config_v[meta_y5] else STATE_VAL.ERROR
|
||||
|
||||
else:
|
||||
node_y5.state = STATE_VAL.GOOD if block_kasseta_y5_prd_config_v[meta_y5] else STATE_VAL.ERROR
|
||||
|
||||
var block_ip_config_v: Dictionary = for_result_dic.block_ip_config
|
||||
for power_supply in for_result_dic.node_ip_power_arr:
|
||||
var meta_ip = power_supply.get_meta('ip')
|
||||
if block_ip_config_v.has(meta_ip) and block_kasseta_y5_prd_config_v.ug:
|
||||
if block_ip_config_v.has(meta_ip) and block_kasseta_y5_prd_config_v.ug and block_kasseta_y5_prd_config_v.yau07:
|
||||
power_supply.state = STATE_VAL.GOOD if block_ip_config_v[meta_ip][1] else STATE_VAL.ERROR
|
||||
else:
|
||||
power_supply.state = STATE_VAL.NONE
|
||||
|
||||
if not for_result_dic.control_is_over:
|
||||
set_default_state(for_result_dic.default_reset_array_node, for_result_dic.power_amplifier)
|
||||
@@ -184,3 +186,5 @@ func _update_status_text(text: String) -> void:
|
||||
elif "исправен" in text or "завершён" in text:
|
||||
$control_result.add_theme_color_override('font_color', Color.GREEN)
|
||||
log.message(Logger.INFO, 'Прибор ПРД-%s исправен' % [unit_prd_v.self_name])
|
||||
else:
|
||||
$control_result.add_theme_color_override('font_color', Color.WHITE)
|
||||
|
||||
@@ -68,6 +68,7 @@ func _stop_pulse():
|
||||
pulsing = false
|
||||
disabled = false
|
||||
text = original_text
|
||||
tooltip_text = ''
|
||||
|
||||
|
||||
func _on_status_change():
|
||||
|
||||
@@ -275,7 +275,7 @@ textures = [ExtResource("1_n1aqt"), ExtResource("2_rim3u"), ExtResource("3_3w8fg
|
||||
value0 = [20.0, 30.0, 40.0, 50.0, 60.0, 70.0]
|
||||
min_value1 = -40.0
|
||||
max_value0 = 1400.0
|
||||
max_value1 = 60.0
|
||||
max_value1 = 55.0
|
||||
step0 = 1.0
|
||||
step1 = 1.0
|
||||
value_name0 = "P,%"
|
||||
@@ -476,10 +476,10 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00
|
||||
Диапазон: -40.00…70.00"
|
||||
Диапазон: -40.00…60.00"
|
||||
mouse_filter = 0
|
||||
min_value = -40.0
|
||||
max_value = 60.0
|
||||
max_value = 55.0
|
||||
fill_mode = 3
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 8
|
||||
|
||||
@@ -35,7 +35,7 @@ signal pressed(control: PanelContainer)
|
||||
if not is_inside_tree():
|
||||
return
|
||||
$margin/vbox/grid1/level7.value = v
|
||||
$margin/vbox/grid1/level7.tint_progress = Color.RED if v >= 70 else Color.GOLD if v >= 60 else Color.WHITE
|
||||
$margin/vbox/grid1/level7.tint_progress = Color.RED if v >= 50 else Color.GOLD if v >= 40 else Color.WHITE
|
||||
|
||||
|
||||
@export var min_value0: float:
|
||||
@@ -262,7 +262,7 @@ value0 = [20.0, 30.0, 40.0, 50.0, 60.0, 70.0]
|
||||
value1 = -40.0
|
||||
min_value1 = -40.0
|
||||
max_value0 = 1400.0
|
||||
max_value1 = 60.0
|
||||
max_value1 = 55.0
|
||||
step0 = 1.0
|
||||
step1 = 1.0
|
||||
value_name0 = "P,%"
|
||||
@@ -366,10 +366,10 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: -40.00
|
||||
Диапазон: -40.00…70.00"
|
||||
Диапазон: -40.00…60.00"
|
||||
mouse_filter = 0
|
||||
min_value = -40.0
|
||||
max_value = 60.0
|
||||
max_value = 55.0
|
||||
value = -40.0
|
||||
fill_mode = 3
|
||||
nine_patch_stretch = true
|
||||
|
||||
@@ -50,6 +50,7 @@ const PRIBORS_RES = \\
|
||||
|
||||
func on_line_changed(u, conn_node, _pribor_meta): conn_node.set_val(u.online)
|
||||
func on_serv_changed(u, pribor_node, _pribor_meta): pribor_node.state = int(u.serviceability)
|
||||
var count_device_control_is_ready: int = 0
|
||||
|
||||
|
||||
func on_mode_changed():
|
||||
@@ -89,6 +90,7 @@ func _ready():
|
||||
prd_module.connect('update_serviceability', Callable(self, 'on_serviceability_changed').bind(prd_module, pribor_node))
|
||||
prd_module.unit_control.connect('update_progress', Callable(self, 'on_update_progress').bind(pribor_node))
|
||||
prd_module.unit_control.connect('update_max_value_progress', Callable(self, 'on_update_max_value_progress').bind(pribor_node))
|
||||
prd_module.unit_control.connect('control_is_over', Callable(self, 'on_control_is_over').bind(prd_module.unit_control))
|
||||
if item == 'уарэп-эмс':
|
||||
signaller.connect('update_uf_serviceability', Callable(self, 'on_update_uf_serviceability').bind(pribor_node))
|
||||
# Пиктограммы приборов, которые отображают состояние подключения только
|
||||
@@ -152,6 +154,7 @@ func on_update_uf_serviceability(uf_serviceaability: bool, uf_pribor: Node)-> vo
|
||||
|
||||
|
||||
func _on_control_prd_pressed() -> void:
|
||||
count_device_control_is_ready = 0
|
||||
signaller.emit_signal('start_contol_device')
|
||||
|
||||
|
||||
@@ -162,6 +165,20 @@ func on_update_progress(value_progress: float, pribor_node: Node) -> void:
|
||||
|
||||
func on_update_max_value_progress(max_value_progress: int, pribor_node: Node) -> void:
|
||||
pribor_node.progress_max_value = max_value_progress
|
||||
|
||||
|
||||
func on_control_is_over(pribor_node: Node) -> void:
|
||||
if pribor_node.self_name in ['1н', '2н', '3н', '4н', '1в', '2в', '3в', '4в', '1к', '2к', '3к', '4к',]:
|
||||
count_device_control_is_ready += 1
|
||||
if count_device_control_is_ready == 12:
|
||||
var time_dict = Time.get_datetime_dict_from_system()
|
||||
$control_prd.text = 'Контроль выполнен %02d:%02d/%02d.%02d' % [
|
||||
time_dict.hour,
|
||||
time_dict.minute,
|
||||
time_dict.day,
|
||||
time_dict.month]
|
||||
$control_prd.disabled = false
|
||||
$control_prd.tooltip_text = 'Нажать для повторного контроля '
|
||||
"
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_foasq"]
|
||||
@@ -1683,9 +1700,9 @@ default_color = Color(1, 1, 1, 0.352941)
|
||||
|
||||
[node name="control_prd" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1101.0
|
||||
offset_left = 1043.0
|
||||
offset_top = 64.0
|
||||
offset_right = 1326.0
|
||||
offset_right = 1390.0
|
||||
offset_bottom = 104.0
|
||||
focus_mode = 0
|
||||
text = "Запуск контроля"
|
||||
|
||||
Reference in New Issue
Block a user