Compare commits
61 Commits
master-tni
...
2d23772546
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d23772546 | ||
|
|
f0685d70e0 | ||
|
|
e509f85f5c | ||
|
|
dc362ad26f | ||
|
|
208406971f | ||
|
|
9eb31c0d4a | ||
|
|
033e9869f1 | ||
|
|
5e78e06626 | ||
|
|
56a0fd8af8 | ||
|
|
0670bf4b09 | ||
|
|
06197096bd | ||
|
|
28fea4035c | ||
|
|
5293313f0e | ||
|
|
04da0d0cfd | ||
|
|
89bc19ec98 | ||
|
|
9f32e293a0 | ||
|
|
217281ce51 | ||
|
|
de86d281ca | ||
|
|
9727eb04a9 | ||
|
|
e1cd37bcfd | ||
|
|
dcd806309c | ||
|
|
3915bd59d1 | ||
|
|
69b455f811 | ||
|
|
9856e300e9 | ||
|
|
87e360e1a9 | ||
|
|
5a7c719c56 | ||
|
|
8754dcc7f0 | ||
|
|
6fce003c59 | ||
|
|
2980aa9f15 | ||
|
|
5b5b5d31c6 | ||
|
|
1785d23e43 | ||
|
|
85c02f3f6c | ||
|
|
3f469935bc | ||
|
|
15be378743 | ||
|
|
6ea649cf31 | ||
|
|
78b6f5a14e | ||
|
|
1e500dec2c | ||
|
|
6a5eae450c | ||
|
|
f6ee2d95a4 | ||
|
|
94f0eccaa1 | ||
|
|
3ac243f420 | ||
|
|
e7440a7eae | ||
|
|
a886024662 | ||
|
|
c6219254ed | ||
|
|
2d4fd57789 | ||
|
|
fe7ef9a699 | ||
|
|
71176c4869 | ||
|
|
36e47bbd13 | ||
|
|
f3ee8965c0 | ||
|
|
9daae7b6b9 | ||
|
|
f002e9125e | ||
|
|
cebf645e4d | ||
|
|
77e15627d0 | ||
|
|
effbbb9272 | ||
|
|
56343338c2 | ||
|
|
3bff1cd90f | ||
|
|
5657892887 | ||
|
|
606f5ea689 | ||
|
|
6c62419bdb | ||
|
|
5991a079c7 | ||
|
|
2a29e4bd54 |
219
config/setting_prd_control.json
Normal file
219
config/setting_prd_control.json
Normal file
@@ -0,0 +1,219 @@
|
||||
{
|
||||
"device_constants": {
|
||||
"PRD_N": {
|
||||
"constants": {
|
||||
"POWER_UKP_1": 31,
|
||||
"POWER_UKP_2": 63,
|
||||
"DKM_BIT_2": 1,
|
||||
"DKM_BIT_3": 2,
|
||||
"BASE_ADDR_EMS_G": 288,
|
||||
"ADDR_UG_LITERA_1": 262,
|
||||
"ADDR_UG_LITERA_2": 264,
|
||||
"ADDR_UG_LITERA_3": 266,
|
||||
"TEMP_THRESHOLD": 70,
|
||||
"POWER_THRESHOLD": 40,
|
||||
"RAY_DOU_NUM": 3,
|
||||
"ATT_UM_2": 2,
|
||||
"ATT_UM_3": 3,
|
||||
"POWER_UM": 100,
|
||||
"TIMER_DELAY": 10.0,
|
||||
"STATE_MASHINE_TIMER": 0.3
|
||||
},
|
||||
"pribor_config": {
|
||||
"1н": {"angle": 0.0, "sectors": [4, 8]},
|
||||
"2н": {"angle": 90.0, "sectors": [7, 11]},
|
||||
"3н": {"angle": 180.0, "sectors": [6, 10]},
|
||||
"4н": {"angle": 270.0, "sectors": [5, 9]}
|
||||
},
|
||||
"fs_params": {
|
||||
"2": {"freq": 932.0, "width": 100.0},
|
||||
"3": {"freq": 1157.0, "width": 100.0}
|
||||
},
|
||||
"start_litera": 2,
|
||||
"progress_max": 20
|
||||
},
|
||||
"PRD_V": {
|
||||
"constants": {
|
||||
"POWER_UKP_1": 31,
|
||||
"POWER_UKP_2": 63,
|
||||
"DKM_BIT_4": 3,
|
||||
"DKM_BIT_5": 4,
|
||||
"BASE_ADDR_EMS_G": 288,
|
||||
"ADDR_UG_LITERA_1": 262,
|
||||
"ADDR_UG_LITERA_2": 264,
|
||||
"ADDR_UG_LITERA_3": 266,
|
||||
"TEMP_THRESHOLD": 70,
|
||||
"POWER_THRESHOLD": 40,
|
||||
"RAY_DOU_NUM": 3,
|
||||
"ATT_UM_4": 2,
|
||||
"ATT_UM_5": 3,
|
||||
"POWER_UM": 100,
|
||||
"TIMER_DELAY": 10.0,
|
||||
"STATE_MASHINE_TIMER": 0.3
|
||||
},
|
||||
"pribor_config": {
|
||||
"1в": {"angle": 0.0, "sectors": [12, 16]},
|
||||
"2в": {"angle": 90.0, "sectors": [15, 19]},
|
||||
"3в": {"angle": 180.0, "sectors": [14, 18]},
|
||||
"4в": {"angle": 270.0, "sectors": [13, 17]}
|
||||
},
|
||||
"fs_params": {
|
||||
"4": {"freq": 1227.0, "width": 100.0},
|
||||
"5": {"freq": 1575.0, "width": 110.0}
|
||||
},
|
||||
"start_litera": 4,
|
||||
"progress_max": 20
|
||||
},
|
||||
"PRD_K": {
|
||||
"constants": {
|
||||
"POWER_UKP_1": 31,
|
||||
"POWER_UKP_2": 63,
|
||||
"DKM_BIT_1": 0,
|
||||
"DKM_BIT_6": 5,
|
||||
"DKM_BIT_7": 6,
|
||||
"BASE_ADDR_EMS_G": 288,
|
||||
"ADDR_UG_LITERA_1": 262,
|
||||
"ADDR_UG_LITERA_2": 264,
|
||||
"ADDR_UG_LITERA_3": 266,
|
||||
"TEMP_THRESHOLD": 40,
|
||||
"POWER_THRESHOLD": 40,
|
||||
"RAY_DOU_NUM": 3,
|
||||
"ATT_UM_1": 0,
|
||||
"ATT_UM_6": 3,
|
||||
"ATT_UM_7": 2,
|
||||
"POWER_UM": 100,
|
||||
"TIMER_DELAY": 10.0,
|
||||
"STATE_MASHINE_TIMER": 0.3
|
||||
},
|
||||
"pribor_config": {
|
||||
"1к": {"angle": 0.0, "sectors": [0, 20, 24]},
|
||||
"2к": {"angle": 90.0, "sectors": [3, 23, 27]},
|
||||
"3к": {"angle": 180.0, "sectors": [2, 22, 26]},
|
||||
"4к": {"angle": 270.0, "sectors": [1, 21, 25]}
|
||||
},
|
||||
"fs_params": {
|
||||
"1": {"freq": 450.0, "width": 80.0},
|
||||
"6": {"freq": 2450.0, "width": 110.0},
|
||||
"7": {"freq": 4750.0, "width": 110.0}
|
||||
},
|
||||
"start_litera": 1,
|
||||
"progress_max": 30
|
||||
}
|
||||
},
|
||||
"base_configs": {
|
||||
"block_ip": {
|
||||
"maa2000_1": [0, false],
|
||||
"maa2000_2": [1, false],
|
||||
"ip9_50_1": [2, false],
|
||||
"ip9_50_2": [3, false],
|
||||
"ip12_50_1": [4, false],
|
||||
"ip5_25": [7, false]
|
||||
},
|
||||
"block_kasseta": {
|
||||
"yau07": false,
|
||||
"ems": false,
|
||||
"ug": false,
|
||||
"ukp1": false,
|
||||
"ukp2": false
|
||||
}
|
||||
},
|
||||
"device_configs": {
|
||||
"PRD_N": {
|
||||
"block_ip": "base",
|
||||
"block_kasseta": "base",
|
||||
"control_results": {
|
||||
"block_ip": false,
|
||||
"temperature": true,
|
||||
"dkm_2": false,
|
||||
"dkm_3": false,
|
||||
"dou_2": false,
|
||||
"dou_3": false,
|
||||
"fs_2": 0,
|
||||
"fs_3": 0
|
||||
}
|
||||
},
|
||||
"PRD_V": {
|
||||
"block_ip": "base",
|
||||
"block_kasseta": "base",
|
||||
"control_results": {
|
||||
"block_ip": false,
|
||||
"temperature": true,
|
||||
"dkm_4": false,
|
||||
"dkm_5": false,
|
||||
"dou_4": false,
|
||||
"dou_5": false,
|
||||
"fs_4": 0,
|
||||
"fs_5": 0
|
||||
}
|
||||
},
|
||||
"PRD_K": {
|
||||
"block_ip": {
|
||||
"maa2000_1": [0, false],
|
||||
"maa2000_2": [1, false],
|
||||
"ip9_50_1": [2, false],
|
||||
"ip9_50_2": [3, false],
|
||||
"ip12_50_1": [4, false],
|
||||
"ip9_50_3": [5, false],
|
||||
"ip12_50_2": [6, false],
|
||||
"ip5_25": [7, false]
|
||||
},
|
||||
"block_kasseta": "base",
|
||||
"control_results": {
|
||||
"block_ip": false,
|
||||
"temperature": true,
|
||||
"dkm_1": false,
|
||||
"dkm_6": false,
|
||||
"dkm_7": false,
|
||||
"dou_6": false,
|
||||
"dou_7": false,
|
||||
"fs_1": 0,
|
||||
"fs_6": 0,
|
||||
"fs_7": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"ray_types": ["RAY_m5", "RAY_5", "RAY_15", "RAY_25", "RAY_35", "RAY_45"],
|
||||
"data_indices": {
|
||||
"STATUS_BOARD": 0,
|
||||
"IN_BLANK_PRD": 1,
|
||||
"IN_IMPULS_PRD": 7,
|
||||
"OUT_BLANK_PRD": 13,
|
||||
"OUT_IMPULS_PRD": 19,
|
||||
"DRY_CONTACT": 27,
|
||||
"DKM": 28,
|
||||
"POWER_UKP_1": 31,
|
||||
"TEMPERATURE_UKP_1": 47,
|
||||
"POWER_UKP_2": 63,
|
||||
"TEMPERATURE_UKP_2": 79
|
||||
},
|
||||
"fs_keys": {
|
||||
"1": "fs_1",
|
||||
"2": "fs_2",
|
||||
"3": "fs_3",
|
||||
"4": "fs_4",
|
||||
"5": "fs_5",
|
||||
"6": "fs_6",
|
||||
"7": "fs_7"
|
||||
},
|
||||
"temperature_constants": {
|
||||
"CONST_MIN_TEMP": -25,
|
||||
"MAXIMUM_CODE_ADC": 3796,
|
||||
"MINIMUM_CODE_AD": 2660,
|
||||
"TEMPERATURE_UKP_1": 47,
|
||||
"TEMPERATURE_UKP_2": 79
|
||||
},
|
||||
"ems_input_bits_config": {
|
||||
"PRD_N": {"bit1": 9, "bit2": 10},
|
||||
"PRD_V": {"bit1": 11, "bit2": 12},
|
||||
"PRD_K": {"bit1": 13, "bit2": 14, "bit_lit": 8}
|
||||
},
|
||||
"fs_rules":[
|
||||
{"key": "fs_1", "min": 0, "max": 4},
|
||||
{"key": "fs_2", "min": 4, "max": 8},
|
||||
{"key": "fs_3", "min": 8, "max": 12},
|
||||
{"key": "fs_4", "min": 12, "max": 16},
|
||||
{"key": "fs_5", "min": 16, "max": 20},
|
||||
{"key": "fs_6", "min": 20, "max": 24},
|
||||
{"key": "fs_7", "min": 24, "max": 27}
|
||||
]
|
||||
}
|
||||
@@ -28,7 +28,7 @@ interfer/center_offset=Vector2(200, 225)
|
||||
interfer/default_color0=Color(0.38, 0.47, 0.51, 1)
|
||||
interfer/default_color1=Color(0.39, 0.44, 0.5, 1)
|
||||
interfer/select_color=Color(1, 1, 1, 1)
|
||||
interfer/interfer_color=Color(0.90, 0.1, 0.25, 0.9)
|
||||
interfer/interfer_color=Color(0.9, 0.1, 0.25, 0.9)
|
||||
interfer/resend_timeout=1000.0
|
||||
config/external_cu=false
|
||||
config/unit_rr_request_period=20.0
|
||||
|
||||
@@ -65,7 +65,7 @@ layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
strips_rotation = 15.0
|
||||
text = "СПРС"
|
||||
text = "JTIDS"
|
||||
metadata/rfi_name = "sprs"
|
||||
|
||||
[node name="btn_kupd" parent="grd_forced" groups=["группа-принудительно"] instance=ExtResource("4_7ys3c")]
|
||||
|
||||
@@ -8,7 +8,7 @@ const TableHeader = preload('res://table/header.tscn') ## Ячейка за
|
||||
const TABLE_HEADER = [ TableHeader, TableHeader, TableHeader , TableHeader ] ## Описание ряда заголовка.
|
||||
const TABLE_ROW = [ CellLineEdit, CellLineEdit, CellLineEdit , CellLineEdit ] ## Описание ряда.
|
||||
const TABLE_HEADERS_TEXT = ['№', 'Название', 'Пеленг', 'Состояние' ] ## Заголовки таблицы.
|
||||
const TABLE_COLUMN_SIZE = [ 65, 100, 90, 170 ] ## Ширины колонок.
|
||||
const TABLE_COLUMN_SIZE = [ 65, 100, 90, 195 ] ## Ширины колонок.
|
||||
|
||||
## Состояние выполнения сеанса помехи
|
||||
const INTERFER_STATE = {
|
||||
|
||||
@@ -147,6 +147,6 @@ layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
strips_rotation = 30.0
|
||||
text = "ЕПРЛС"
|
||||
text = "ЕРЛС"
|
||||
disabled = true
|
||||
metadata/rfi_name = "eprls"
|
||||
|
||||
@@ -99,4 +99,4 @@ func _on_request_completed(result, _response_code, headers, body: PackedByteArra
|
||||
func _on_item_pressed(block_a: Control):
|
||||
var metas = block_a.get_meta_list()
|
||||
for n in metas:
|
||||
var v = block_a.get_meta(n)
|
||||
var _v = block_a.get_meta(n)
|
||||
|
||||
@@ -49,7 +49,7 @@ offset_top = 33.0
|
||||
offset_right = 155.0
|
||||
offset_bottom = 183.0
|
||||
fname = "Блок ФС-2"
|
||||
rname = "A2"
|
||||
rname = "A6"
|
||||
|
||||
[node name="ref_A6" parent="." groups=["default_reset", "fs_group"] instance=ExtResource("3_kqnvt")]
|
||||
offset_left = 155.0
|
||||
@@ -57,7 +57,7 @@ offset_top = 33.0
|
||||
offset_right = 205.0
|
||||
offset_bottom = 183.0
|
||||
fname = "Модуль ФС"
|
||||
rname = "A5"
|
||||
rname = "A3"
|
||||
metadata/fs = "fs_6"
|
||||
|
||||
[node name="ref_A5" parent="." groups=["default_reset", "fs_group"] instance=ExtResource("3_kqnvt")]
|
||||
@@ -66,7 +66,7 @@ offset_top = 33.0
|
||||
offset_right = 255.0
|
||||
offset_bottom = 183.0
|
||||
fname = "Модуль ФС"
|
||||
rname = "A3"
|
||||
rname = "A2"
|
||||
metadata/fs = "fs_7"
|
||||
|
||||
[node name="ref_A7" parent="." groups=["default_reset"] instance=ExtResource("3_kqnvt")]
|
||||
@@ -75,4 +75,4 @@ offset_top = 33.0
|
||||
offset_right = 305.0
|
||||
offset_bottom = 183.0
|
||||
fname = "Блок ФС-6"
|
||||
rname = "A6"
|
||||
rname = "A5"
|
||||
|
||||
@@ -1,252 +1,182 @@
|
||||
@tool
|
||||
extends 'res://scenes/контроль/прибор.gd'
|
||||
|
||||
const constants_k: Dictionary = {
|
||||
'POWER_UKP_1': 31,
|
||||
'POWER_UKP_2': 63,
|
||||
'DKM_BIT_1': 0,
|
||||
'DKM_BIT_6': 5,
|
||||
'DKM_BIT_7': 6,
|
||||
'BASE_ADDR_EMS_G': 0x120,
|
||||
'ADDR_UG_LITERA_1': 0x106,
|
||||
'ADDR_UG_LITERA_2': 0x108,
|
||||
'ADDR_UG_LITERA_3': 0x10A,
|
||||
'TEMP_THRESHOLD': 40,
|
||||
'POWER_THRESHOLD': 40,
|
||||
'RAY_DOU_NUM': 0x3,
|
||||
'ATT_UM_1': 0x0,
|
||||
'ATT_UM_6': 0x3,
|
||||
'ATT_UM_7': 0x2,
|
||||
'POWER_UM': 100,
|
||||
'TIMER_DELAY': 10.0,
|
||||
'STATE_MASHINE_TIMER': 0.3,
|
||||
}
|
||||
# Конфигурация параметров для каждого прибора
|
||||
const PRIBOR_CONFIG := {
|
||||
'1к': {'angle': 0.0, 'sectors': [0, 20, 24]},
|
||||
'2к': {'angle': 90.0, 'sectors': [3, 23, 27]},
|
||||
'3к': {'angle': 180.0, 'sectors': [2, 22, 26]},
|
||||
'4к': {'angle': 270.0, 'sectors': [1, 21, 25]},
|
||||
}
|
||||
# Конфигурация частот и ширин для каждого ФС
|
||||
const FS_PARAMS := {
|
||||
1: {'freq': 450.0, 'width': 80.0},
|
||||
6: {'freq': 2450.0, 'width': 110.0},
|
||||
7: {'freq': 4750.0, 'width': 110.0}
|
||||
}
|
||||
enum STATE_VAL { NONE = 0, GOOD = 1, ERROR = 2 }
|
||||
|
||||
var block_ip_config_k := {
|
||||
'maa2000_1': [0, false],
|
||||
'maa2000_2': [1, false],
|
||||
'ip9_50_1': [2, false],
|
||||
'ip9_50_2': [3, false],
|
||||
'ip12_50_1': [4, false],
|
||||
'ip9_50_3': [5, false],
|
||||
'ip12_50_2': [6, false],
|
||||
'ip5_25': [7, false],
|
||||
}
|
||||
var block_kasseta_y5_prd_config_k: = {
|
||||
'yau07': false,
|
||||
'ems': false,
|
||||
'ug': false,
|
||||
'ukp1': false,
|
||||
'ukp2': false,
|
||||
}
|
||||
# Основные переменные
|
||||
var start_litera: int = 1
|
||||
var ug_work_1: int = 3 ## Аттенюация усилителей мощности
|
||||
var ug_work_2: int = 2 ## Аттенюация усилителей мощности
|
||||
var ug_work_3: int = 0 ## Аттенюация усилителей мощности
|
||||
var mashine_timer: Timer = Timer.new()
|
||||
var prd_k_module: Object
|
||||
var unit_prd_k: Object
|
||||
var control_prd_k: Object
|
||||
# Результаты контроля
|
||||
var control_results_k: Dictionary = {
|
||||
'block_ip': false, # Проверка касет П1 и ИП МА2000
|
||||
'temperature': true,
|
||||
'dkm_1': false,
|
||||
'dkm_6': false,
|
||||
'dkm_7': false,
|
||||
'dou_6': false,
|
||||
'dou_7': false,
|
||||
'fs_1': 2,
|
||||
'fs_6': 2,
|
||||
'fs_7': 2,
|
||||
}
|
||||
|
||||
var test_control_k = preload('res://scripts/pribor-prd.gd')
|
||||
var ctrl_pos = 30
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
var unit_name = get_meta('unit_name')[0]
|
||||
var prd_k_module = prd.prd_dict[unit_name]
|
||||
unit_prd_k = prd_k_module.unit_control
|
||||
var power_amplifier: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
for temp in power_amplifier:
|
||||
temp.value1 = -70
|
||||
unit_prd_k.connect('control_is_over', Callable(self, 'on_press_device'))
|
||||
#unit_prd_k.power_amplify = power_amplifier
|
||||
on_press_device()
|
||||
|
||||
initialize_connections()
|
||||
setup_timer()
|
||||
set_default_state()
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
set_frame($input_0, unit_prd_k.ems_input_1)
|
||||
set_frame($input_1, unit_prd_k.ems_input_2)
|
||||
set_frame($input_2, unit_prd_k.ems_input_lit_1)
|
||||
set_frame($output_0, unit_prd_k.ems_output_1)
|
||||
set_frame($output_1, unit_prd_k.ems_output_2)
|
||||
set_frame($output_2, unit_prd_k.ems_output_lit_1)
|
||||
|
||||
|
||||
func set_frame(node_frame: Node, val: int): node_frame.set_frame(val)
|
||||
|
||||
|
||||
func start_control() -> void:
|
||||
set_default_state(get_tree().get_nodes_in_group('default_reset'), get_tree().get_nodes_in_group('power_amplifier'))
|
||||
find_labels(self)
|
||||
|
||||
|
||||
func on_state_mashine() -> void:
|
||||
control_prd_k.state_control_machine()
|
||||
|
||||
|
||||
func initialize_connections() -> void:
|
||||
var unit_name = get_meta('unit_name')[0]
|
||||
prd_k_module = prd.prd_dict[unit_name]
|
||||
unit_prd_k = prd_k_module.unit_yau07
|
||||
|
||||
unit_prd_k.connect('line_changed', Callable(self, 'on_line_changed'))
|
||||
var power_amplifiers: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
var init_data: Dictionary = {
|
||||
'control_label': $control_result,
|
||||
'power_amplifiers': power_amplifiers,
|
||||
'unit_prd': unit_prd_k,
|
||||
'module_prd' : prd_k_module,
|
||||
'constants': constants_k,
|
||||
'prd_config': PRIBOR_CONFIG,
|
||||
'fs_params': FS_PARAMS,
|
||||
'block_ip_prd_config': block_ip_config_k,
|
||||
'block_kasseta_y5_prd_config': block_kasseta_y5_prd_config_k,
|
||||
'control_results': control_results_k,
|
||||
'current_litera': start_litera,
|
||||
}
|
||||
control_prd_k = test_control_k.TestPRD.new(init_data)
|
||||
add_child(control_prd_k)
|
||||
control_prd_k.connect('control_is_over', Callable(self, 'on_control_result'))
|
||||
|
||||
|
||||
func setup_timer() -> void:
|
||||
add_child(mashine_timer)
|
||||
mashine_timer.connect('timeout', Callable(self, 'on_state_mashine'))
|
||||
mashine_timer.wait_time = constants_k.STATE_MASHINE_TIMER
|
||||
mashine_timer.start()
|
||||
|
||||
|
||||
func set_default_state() -> void:
|
||||
for group in get_tree().get_nodes_in_group('default_reset'):
|
||||
static func set_default_state(default_reset_array_node: Array, power_amplifier_arr_node: Array) -> void:
|
||||
for group in default_reset_array_node:
|
||||
group.state = STATE_VAL.NONE
|
||||
|
||||
for group in get_tree().get_nodes_in_group('power_amplifier'):
|
||||
for group in power_amplifier_arr_node:
|
||||
group.state = STATE_VAL.NONE
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
$control_result.text = 'Выполняется ...'
|
||||
$control_result.text = 'Ожидается запуск контроля ...' # TODO: Необходимо сделать пулл сообщений
|
||||
$control_result.add_theme_color_override('font_color', Color.ALICE_BLUE)
|
||||
signaller.connect('режим_работа', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_журнал', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_эмс', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_настройки', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_контроль', Callable(self, 'on_mode_changed').bind(true))
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
prd_k_module.cmd_array.append([unit_prd_k.CmdCode.WRITE_ISA, [constants_k.ADDR_UG_LITERA_1, ug_work_1, constants_k.ADDR_UG_LITERA_2, ug_work_2, constants_k.ADDR_UG_LITERA_3, ug_work_3]])
|
||||
#prd_k_module.cmd_array.append([unit_prd_k.CmdCode.WRITE_ISA, [constants_k.ADDR_UG_LITERA_1, ug_work_1, constants_k.ADDR_UG_LITERA_2, ug_work_2, constants_k.ADDR_UG_LITERA_3, ug_work_3]])
|
||||
|
||||
|
||||
func on_line_changed(unit_pribor: Object) -> void:
|
||||
if not unit_pribor.online:
|
||||
set_default_state()
|
||||
static func temperature_fill(temperature_arr_node: Array, temperature_dic: Dictionary)->void:
|
||||
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]
|
||||
|
||||
|
||||
func on_mode_changed(in_tree: bool) -> void:
|
||||
if not in_tree:
|
||||
mashine_timer.stop()
|
||||
prd_k_module.cmd_array.append([unit_prd_k.CmdCode.WRITE_ISA, [constants_k.ADDR_UG_LITERA_1, ug_work_1, constants_k.ADDR_UG_LITERA_2, ug_work_2, constants_k.ADDR_UG_LITERA_3, ug_work_3]])
|
||||
signaller.emit_signal('interfer_off_all')
|
||||
else:
|
||||
set_default_state()
|
||||
control_prd_k.state = control_prd_k.STATE_MASHINE.INIT
|
||||
mashine_timer.start()
|
||||
|
||||
|
||||
func power_fill(pow_dic: Dictionary, fs_result: Dictionary) -> void:
|
||||
#if not control_prd_k.block_kasseta_y5_config.yau07 or not control_prd_k.block_kasseta_y5_config.ukp1 or not control_prd_k.block_kasseta_y5_config.ukp2:
|
||||
#return
|
||||
var power_amplifier: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifier: Array, POWER_THRESHOLD: int) -> void:
|
||||
for i_powapm in power_amplifier:
|
||||
var powamp_meta: String = i_powapm.get_meta('um')
|
||||
var status = STATE_VAL.GOOD if pow_dic else STATE_VAL.NONE
|
||||
if not pow_dic.has(powamp_meta): return
|
||||
if pow_dic:
|
||||
if not pow_dic.has(powamp_meta):
|
||||
break
|
||||
if pow_dic[powamp_meta].size() < 6:
|
||||
status = STATE_VAL.ERROR
|
||||
else:
|
||||
if powamp_meta == 'um_7' and not fs_result.fs_1: return
|
||||
if powamp_meta == 'um_8' and not fs_result.fs_1: return
|
||||
if powamp_meta in ['um_1', 'um_2', 'um_3', 'um_4', 'um_5', 'um_6'] and not fs_result.fs_6: return
|
||||
if powamp_meta in ['um_8', 'um_9', 'um_10', 'um_11', 'um_12', 'um_13'] and not fs_result.fs_7: return
|
||||
i_powapm.value0 = pow_dic[powamp_meta]
|
||||
for i_p in pow_dic[powamp_meta]:
|
||||
if i_p < constants_k.POWER_THRESHOLD:
|
||||
if powamp_meta in ['um_9', 'um_10', 'um_11', 'um_12', 'um_13', 'um_14'] and not fs_result.fs_7: return
|
||||
|
||||
if powamp_meta == 'um_8':
|
||||
i_powapm.value0 = [pow_dic[powamp_meta][5]]
|
||||
if pow_dic[powamp_meta][5] < POWER_THRESHOLD:
|
||||
status = STATE_VAL.ERROR
|
||||
else:
|
||||
i_powapm.value0 = pow_dic[powamp_meta]
|
||||
for i_p in pow_dic[powamp_meta]:
|
||||
if i_p < POWER_THRESHOLD:
|
||||
status = STATE_VAL.ERROR
|
||||
i_powapm.state = status
|
||||
|
||||
|
||||
func on_control_result(result_dic: Dictionary, power_dic: Dictionary) -> void:
|
||||
mashine_timer.stop()
|
||||
block_kasseta_y5_prd_config_k = control_prd_k.block_kasseta_y5_config
|
||||
func on_press_device() -> void:
|
||||
var nodes_y5: Array = get_tree().get_nodes_in_group('y-5')
|
||||
var node_ip_power_arr: Array = get_tree().get_nodes_in_group('power_supply')
|
||||
var fs_nodes: Array = get_tree().get_nodes_in_group('fs_group')
|
||||
var power_amplifier: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
var default_reset_array_node: Array = get_tree().get_nodes_in_group('default_reset')
|
||||
var module_fs_1: Node = $kasseta_fs_kd/ref_A2
|
||||
var module_fs_6: Node = $kasseta_fs_kd/ref_A4
|
||||
var dou_6: Node = $dou6_A7
|
||||
var module_fs_7: Node = $kasseta_fs_kd/ref_A7
|
||||
var dou_7: Node = $dou7_A8
|
||||
var for_control_result: Dictionary = {
|
||||
'control_is_over': unit_prd_k.flag_control_is_over,
|
||||
'result_dic': unit_prd_k.control_results,
|
||||
'power_dic': unit_prd_k.power_result,
|
||||
'block_kasseta_y5_config': unit_prd_k.block_kasseta_y5_config,
|
||||
'block_ip_config': unit_prd_k.block_ip_config,
|
||||
'temperature_um' : unit_prd_k.temperature_um,
|
||||
'nodes_y5': nodes_y5,
|
||||
'node_ip_power_arr': node_ip_power_arr,
|
||||
'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,
|
||||
'module_fs_7': module_fs_7,
|
||||
'dou_7': dou_7,
|
||||
}
|
||||
on_control_result(for_control_result)
|
||||
|
||||
|
||||
static func on_control_result(for_result_dic: Dictionary) -> void:
|
||||
temperature_fill(for_result_dic.power_amplifier, for_result_dic.temperature_um)
|
||||
|
||||
var block_kasseta_y5_prd_config_k: Dictionary = for_result_dic.block_kasseta_y5_config
|
||||
var nodes_y5: Array = for_result_dic.nodes_y5
|
||||
for node_y5 in nodes_y5:
|
||||
var meta_y5 = node_y5.get_meta('y5')
|
||||
if block_kasseta_y5_prd_config_k.has(meta_y5):
|
||||
if block_kasseta_y5_prd_config_k['yau07'] == false:
|
||||
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
|
||||
|
||||
block_ip_config_k = control_prd_k.block_ip_config
|
||||
var node_ip_power_arr: Array = get_tree().get_nodes_in_group('power_supply')
|
||||
for power_supply in node_ip_power_arr:
|
||||
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:
|
||||
power_supply.state = STATE_VAL.GOOD if block_ip_config_k[meta_ip][1] else STATE_VAL.ERROR
|
||||
|
||||
var fs_nodes: Array = get_tree().get_nodes_in_group('fs_group')
|
||||
for f in fs_nodes:
|
||||
if not for_result_dic.control_is_over:
|
||||
set_default_state(for_result_dic.default_reset_array_node, for_result_dic.power_amplifier)
|
||||
return
|
||||
var result_dic: Dictionary = for_result_dic.result_dic
|
||||
for f in for_result_dic.fs_nodes:
|
||||
var fs_meta: String = f.get_meta('fs')
|
||||
if result_dic.has(fs_meta):
|
||||
var new_state = result_dic[fs_meta]
|
||||
f.state = new_state
|
||||
result_dic[fs_meta] = new_state
|
||||
f.state = result_dic[fs_meta]
|
||||
|
||||
if result_dic.fs_1 == 1:
|
||||
$kasseta_fs_kd/ref_A2.state = STATE_VAL.GOOD if result_dic.dkm_1 else STATE_VAL.ERROR
|
||||
else:
|
||||
result_dic.fs_1 = false
|
||||
if result_dic.fs_6 == 1:
|
||||
$kasseta_fs_kd/ref_A4.state = STATE_VAL.GOOD if result_dic.dkm_6 else STATE_VAL.ERROR
|
||||
$dou6_A7.state = STATE_VAL.GOOD if result_dic.dou_6 else STATE_VAL.ERROR
|
||||
else:
|
||||
result_dic.fs_6 = false
|
||||
if result_dic.fs_7 == 1:
|
||||
$kasseta_fs_kd/ref_A7.state = STATE_VAL.GOOD if result_dic.dkm_7 else STATE_VAL.ERROR
|
||||
$dou7_A8.state = STATE_VAL.GOOD if result_dic.dou_7 else STATE_VAL.ERROR
|
||||
else:
|
||||
result_dic.fs_7 = false
|
||||
if result_dic.fs_1 == 1 and block_kasseta_y5_prd_config_k['yau07']:
|
||||
for_result_dic.module_fs_1.state = STATE_VAL.GOOD if result_dic.dkm_1 else STATE_VAL.ERROR
|
||||
|
||||
power_fill(power_dic, result_dic)
|
||||
if result_dic.fs_6 == 1 and block_kasseta_y5_prd_config_k['yau07']:
|
||||
for_result_dic.module_fs_6.state = STATE_VAL.GOOD if result_dic.dkm_6 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_6.state = STATE_VAL.GOOD if result_dic.dou_6 else STATE_VAL.ERROR
|
||||
|
||||
var result = true
|
||||
if result_dic.fs_7 == 1 and block_kasseta_y5_prd_config_k['yau07']:
|
||||
for_result_dic.module_fs_7.state = STATE_VAL.GOOD if result_dic.dkm_7 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_7.state = STATE_VAL.GOOD if result_dic.dou_7 else STATE_VAL.ERROR
|
||||
|
||||
if block_kasseta_y5_prd_config_k['yau07']:
|
||||
power_fill(for_result_dic.power_dic, for_result_dic.result_dic, for_result_dic.power_amplifier, for_result_dic.POWER_THRESHOLD)
|
||||
|
||||
var result: bool = true
|
||||
for device in result_dic.values():
|
||||
if not device:
|
||||
result = false
|
||||
|
||||
var name_prd = control_prd_k.self_name
|
||||
if result:
|
||||
$control_result.text = 'Прибор ПРД-%s исправен' % name_prd
|
||||
$control_result.add_theme_color_override('font_color', Color.GREEN)
|
||||
else:
|
||||
$control_result.text = 'Прибор ПРД-%s неисправен' % name_prd
|
||||
$control_result.add_theme_color_override('font_color', Color.RED)
|
||||
log.message(Logger.INFO, 'Прибор ПРД-%s %s' % [for_result_dic.name_prd, ['неисправен', 'исправен'][int(result)]])
|
||||
|
||||
|
||||
func find_labels(node1: Node):
|
||||
|
||||
@@ -1,14 +1,39 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://m5s87q7m66lj"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://m5s87q7m66lj"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="1_8dmgr"]
|
||||
[ext_resource type="Script" uid="uid://cwvikiygf8b1m" path="res://scenes/pribor-prd-k/pribor-prd-k.gd" id="1_tpdyp"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="2_14h25"]
|
||||
[ext_resource type="PackedScene" uid="uid://cm5jd4gjrrpba" path="res://scenes/контроль/кассета-у-5-к.tscn" id="2_tb85r"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcyxqni7gxvtq" path="res://scenes/контроль/блок-в.tscn" id="5_c7lv8"]
|
||||
[ext_resource type="PackedScene" uid="uid://ffi1njkjceb5" path="res://scenes/контроль/блок-к.tscn" id="6_wd1vi"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmagw8nd0ulhj" path="res://scenes/pribor-prd-k/kasseta-fs-kd.tscn" id="7_ia27q"]
|
||||
[ext_resource type="Script" uid="uid://crpedygm3gohi" path="res://scenes/контроль/кассета.gd" id="7_xpa2n"]
|
||||
[ext_resource type="PackedScene" uid="uid://dq31j24gv5vi4" path="res://scenes/контроль/кассета-п-2.tscn" id="8_6fdp7"]
|
||||
[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/элемент-в.tscn" id="8_la5yt"]
|
||||
[ext_resource type="Texture2D" uid="uid://belwchvdktrw0" path="res://data/эмс-бланк.png" id="10_c7lv8"]
|
||||
[ext_resource type="Texture2D" uid="uid://bwddxs24es81u" path="res://data/эмс-бланк-пост.png" id="11_wd1vi"]
|
||||
[ext_resource type="Texture2D" uid="uid://pfoscstbm025" path="res://data/эмс-бланк-перем.png" id="12_bjebg"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvl3sq036gn75" path="res://data/эмс-бланк-замыкание.png" id="13_kc77u"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_di0aa"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("10_c7lv8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("11_wd1vi")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("12_bjebg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("13_kc77u")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="pribor_prd_k" type="Control"]
|
||||
layout_mode = 3
|
||||
@@ -26,7 +51,7 @@ offset_top = 242.0
|
||||
offset_right = 485.0
|
||||
offset_bottom = 432.0
|
||||
|
||||
[node name="maa2000_A22" parent="." groups=["default_reset", "power_supply"] instance=ExtResource("1_8dmgr")]
|
||||
[node name="maa2000_A22" parent="." groups=["power_supply"] instance=ExtResource("1_8dmgr")]
|
||||
layout_mode = 0
|
||||
offset_left = 485.0
|
||||
offset_top = 907.0
|
||||
@@ -45,7 +70,7 @@ offset_bottom = 907.0
|
||||
fname = "ДОУ-6"
|
||||
rname = "A7"
|
||||
|
||||
[node name="maa2000_A23" parent="." groups=["default_reset", "power_supply"] instance=ExtResource("1_8dmgr")]
|
||||
[node name="maa2000_A23" parent="." groups=["power_supply"] instance=ExtResource("1_8dmgr")]
|
||||
layout_mode = 0
|
||||
offset_left = 8.0
|
||||
offset_top = 907.0
|
||||
@@ -97,7 +122,7 @@ offset_bottom = 337.0
|
||||
value0 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
fname = "УМ1535Б"
|
||||
rname = "A10"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_1"
|
||||
|
||||
@@ -109,7 +134,7 @@ offset_right = 652.0
|
||||
offset_bottom = 432.0
|
||||
fname = "УМ1535Б"
|
||||
rname = "A11"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_2"
|
||||
|
||||
@@ -121,7 +146,7 @@ offset_right = 652.0
|
||||
offset_bottom = 527.0
|
||||
fname = "УМ1535Б"
|
||||
rname = "A12"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_3"
|
||||
|
||||
@@ -133,7 +158,7 @@ offset_right = 652.0
|
||||
offset_bottom = 622.0
|
||||
fname = "УМ1535Б"
|
||||
rname = "A13"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_4"
|
||||
|
||||
@@ -145,7 +170,7 @@ offset_right = 652.0
|
||||
offset_bottom = 717.0
|
||||
fname = "УМ1535Б"
|
||||
rname = "A14"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_5"
|
||||
|
||||
@@ -157,11 +182,11 @@ offset_right = 652.0
|
||||
offset_bottom = 812.0
|
||||
fname = "УМ1535Б"
|
||||
rname = "A15"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_6"
|
||||
|
||||
[node name="utm80_A9" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
|
||||
[node name="блок-к" parent="." groups=["power_amplifier"] instance=ExtResource("6_wd1vi")]
|
||||
layout_mode = 0
|
||||
offset_left = 485.0
|
||||
offset_top = 812.0
|
||||
@@ -169,9 +194,9 @@ offset_right = 652.0
|
||||
offset_bottom = 907.0
|
||||
fname = "УТМ80"
|
||||
rname = "A9"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_7"
|
||||
metadata/um = "um_8"
|
||||
|
||||
[node name="rm1620m_A16" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
|
||||
layout_mode = 0
|
||||
@@ -179,11 +204,11 @@ offset_left = 8.0
|
||||
offset_top = 242.0
|
||||
offset_right = 175.0
|
||||
offset_bottom = 337.0
|
||||
fname = "УМ1535Б"
|
||||
fname = "РМ16-20М"
|
||||
rname = "A16"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_8"
|
||||
metadata/um = "um_9"
|
||||
|
||||
[node name="rm1620m_A17" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
|
||||
layout_mode = 0
|
||||
@@ -191,11 +216,11 @@ offset_left = 8.0
|
||||
offset_top = 337.0
|
||||
offset_right = 173.0
|
||||
offset_bottom = 432.0
|
||||
fname = "УМ1535Б"
|
||||
fname = "РМ16-20М"
|
||||
rname = "A17"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_9"
|
||||
metadata/um = "um_10"
|
||||
|
||||
[node name="rm1620m_A18" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
|
||||
layout_mode = 0
|
||||
@@ -203,11 +228,11 @@ offset_left = 8.0
|
||||
offset_top = 432.0
|
||||
offset_right = 175.0
|
||||
offset_bottom = 527.0
|
||||
fname = "УМ1535Б"
|
||||
fname = "РМ16-20М"
|
||||
rname = "A18"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_10"
|
||||
metadata/um = "um_11"
|
||||
|
||||
[node name="rm1620m_A19" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
|
||||
layout_mode = 0
|
||||
@@ -215,11 +240,11 @@ offset_left = 8.0
|
||||
offset_top = 527.0
|
||||
offset_right = 175.0
|
||||
offset_bottom = 622.0
|
||||
fname = "УМ1535Б"
|
||||
fname = "РМ16-20М"
|
||||
rname = "A19"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_11"
|
||||
metadata/um = "um_12"
|
||||
|
||||
[node name="rm1620m_A20" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
|
||||
layout_mode = 0
|
||||
@@ -227,11 +252,11 @@ offset_left = 8.0
|
||||
offset_top = 622.0
|
||||
offset_right = 175.0
|
||||
offset_bottom = 717.0
|
||||
fname = "УМ1535Б"
|
||||
fname = "РМ16-20М"
|
||||
rname = "A20"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_12"
|
||||
metadata/um = "um_13"
|
||||
|
||||
[node name="rm1620m_A21" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
|
||||
layout_mode = 0
|
||||
@@ -239,11 +264,11 @@ offset_left = 8.0
|
||||
offset_top = 717.0
|
||||
offset_right = 175.0
|
||||
offset_bottom = 812.0
|
||||
fname = "УМ1535Б"
|
||||
fname = "РМ16-20М"
|
||||
rname = "A21"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_13"
|
||||
metadata/um = "um_14"
|
||||
|
||||
[node name="kasseta_fs_kd" parent="." instance=ExtResource("7_ia27q")]
|
||||
layout_mode = 0
|
||||
@@ -267,7 +292,7 @@ patch_margin_bottom = 16
|
||||
script = ExtResource("7_xpa2n")
|
||||
fname = "Кассета П-1"
|
||||
|
||||
[node name="ref_A26" parent="kasseta_p_1" groups=["default_reset", "power_supply"] instance=ExtResource("8_la5yt")]
|
||||
[node name="ref_A26" parent="kasseta_p_1" groups=["power_supply"] instance=ExtResource("8_la5yt")]
|
||||
offset_left = 9.0
|
||||
offset_top = 33.0
|
||||
offset_right = 59.0
|
||||
@@ -276,7 +301,7 @@ fname = "ИП9-50"
|
||||
rname = "A23"
|
||||
metadata/ip = "ip9_50_1"
|
||||
|
||||
[node name="ref_A23" parent="kasseta_p_1" groups=["default_reset", "power_supply"] instance=ExtResource("8_la5yt")]
|
||||
[node name="ref_A23" parent="kasseta_p_1" groups=["power_supply"] instance=ExtResource("8_la5yt")]
|
||||
offset_left = 59.0
|
||||
offset_top = 33.0
|
||||
offset_right = 109.0
|
||||
@@ -285,7 +310,7 @@ fname = "ИП9-50"
|
||||
rname = "A24"
|
||||
metadata/ip = "ip9_50_2"
|
||||
|
||||
[node name="ref_A24" parent="kasseta_p_1" groups=["default_reset", "power_supply"] instance=ExtResource("8_la5yt")]
|
||||
[node name="ref_A24" parent="kasseta_p_1" groups=["power_supply"] instance=ExtResource("8_la5yt")]
|
||||
offset_left = 109.0
|
||||
offset_top = 33.0
|
||||
offset_right = 159.0
|
||||
@@ -297,9 +322,9 @@ metadata/ip = "ip12_50_1"
|
||||
[node name="lbl_fname" type="Label" parent="kasseta_p_1"]
|
||||
self_modulate = Color(1, 1, 1, 0.62)
|
||||
layout_mode = 0
|
||||
offset_left = 7.0
|
||||
offset_left = 2.0
|
||||
offset_top = 8.0
|
||||
offset_right = 159.0
|
||||
offset_right = 162.0
|
||||
offset_bottom = 33.0
|
||||
text = "Кассета П-1"
|
||||
horizontal_alignment = 1
|
||||
@@ -322,3 +347,27 @@ offset_bottom = 1003.0
|
||||
text = "Прибор ПРД- неисправен"
|
||||
horizontal_alignment = 1
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="input_0" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(353, 618)
|
||||
sprite_frames = SubResource("SpriteFrames_di0aa")
|
||||
|
||||
[node name="input_1" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(405, 618)
|
||||
sprite_frames = SubResource("SpriteFrames_di0aa")
|
||||
|
||||
[node name="input_2" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(255, 619)
|
||||
sprite_frames = SubResource("SpriteFrames_di0aa")
|
||||
|
||||
[node name="output_0" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(355, 464)
|
||||
sprite_frames = SubResource("SpriteFrames_di0aa")
|
||||
|
||||
[node name="output_1" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(405, 464)
|
||||
sprite_frames = SubResource("SpriteFrames_di0aa")
|
||||
|
||||
[node name="output_2" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(255, 464)
|
||||
sprite_frames = SubResource("SpriteFrames_di0aa")
|
||||
|
||||
@@ -1,235 +1,162 @@
|
||||
@tool
|
||||
extends 'res://scenes/контроль/прибор.gd'
|
||||
|
||||
const constants_n = {
|
||||
'POWER_UKP_1': 31,
|
||||
'POWER_UKP_2': 63,
|
||||
'DKM_BIT_2': 1,
|
||||
'DKM_BIT_3': 2,
|
||||
'BASE_ADDR_EMS_G': 0x120,
|
||||
'ADDR_UG_LITERA_1': 0x106,
|
||||
'ADDR_UG_LITERA_2': 0x108,
|
||||
'ADDR_UG_LITERA_3': 0x10A,
|
||||
'TEMP_THRESHOLD': 70,
|
||||
'POWER_THRESHOLD': 40,
|
||||
'RAY_DOU_NUM': 0x3,
|
||||
'ATT_UM_2': 0x2,
|
||||
'ATT_UM_3': 0x3,
|
||||
'POWER_UM': 100,
|
||||
'TIMER_DELAY': 10.0,
|
||||
'STATE_MASHINE_TIMER': 0.3,
|
||||
}
|
||||
# Конфигурация параметров для каждого прибора
|
||||
const PRIBOR_CONFIG_N := {
|
||||
'1н': {'angle': 0.0, 'sectors': [4, 8]},
|
||||
'2н': {'angle': 90.0, 'sectors': [7, 11]},
|
||||
'3н': {'angle': 180.0, 'sectors': [6, 10]},
|
||||
'4н': {'angle': 270.0, 'sectors': [5, 9]},
|
||||
}
|
||||
# Конфигурация частот и ширин для каждого ФС
|
||||
const FS_PARAMS_N := {
|
||||
2: {'freq': 932.0, 'width': 100.0},
|
||||
3: {'freq': 1157.0, 'width': 100.0}
|
||||
}
|
||||
enum STATE_VAL { NONE = 0, GOOD = 1, ERROR = 2 }
|
||||
var block_ip_config_n:= {
|
||||
'maa2000_1': [0, false],
|
||||
'maa2000_2': [1, false],
|
||||
'ip9_50_1': [2, false],
|
||||
'ip9_50_2': [3, false],
|
||||
'ip12_50_1': [4, false],
|
||||
'ip5_25': [7, false],
|
||||
}
|
||||
var block_kasseta_y5_prd_config_n: = {
|
||||
'yau07': false,
|
||||
'ems': false,
|
||||
'ug': false,
|
||||
'ukp1': false,
|
||||
'ukp2': false,
|
||||
}
|
||||
|
||||
# Основные переменные
|
||||
var start_litera: int = 2
|
||||
var ug_work_1: int = 2 ## Аттенюация усилителей мощности
|
||||
var ug_work_2: int = 3 ## Аттенюация усилителей мощности
|
||||
# Флаги и таймеры
|
||||
var mashine_timer: Timer = Timer.new()
|
||||
var prd_n_module: Object
|
||||
var unit_prd_n: Object
|
||||
var control_prd_n: Object
|
||||
# Результаты контроля
|
||||
var control_results_n: Dictionary = {
|
||||
'block_ip': false, # Проверка касет П1 и ИП МА2000
|
||||
'temperature': true, # Проверка температур УМ
|
||||
'dkm_2': false,
|
||||
'dkm_3': false,
|
||||
'dou_2': false,
|
||||
'dou_3': false,
|
||||
'fs_2': 2,
|
||||
'fs_3': 2,
|
||||
}
|
||||
var test_control_n = preload('res://scripts/pribor-prd.gd')
|
||||
var ctrl_pos = 0
|
||||
################################
|
||||
func on_state_mashine() -> void:
|
||||
control_prd_n.state_control_machine()
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
var unit_name = get_meta('unit_name')[0]
|
||||
var prd_n_module = prd.prd_dict[unit_name]
|
||||
unit_prd_n = prd_n_module.unit_control
|
||||
var power_amplifier: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
for temp in power_amplifier:
|
||||
temp.value1 = -70
|
||||
unit_prd_n.connect('control_is_over', Callable(self, 'on_press_device'))
|
||||
start_control()
|
||||
on_press_device()
|
||||
|
||||
initialize_connections()
|
||||
setup_timer()
|
||||
set_default_state()
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
set_frame($input_0, unit_prd_n.ems_input_1)
|
||||
set_frame($input_1, unit_prd_n.ems_input_2)
|
||||
set_frame($output_0, unit_prd_n.ems_output_1)
|
||||
set_frame($output_1, unit_prd_n.ems_output_2)
|
||||
|
||||
|
||||
func set_frame(node_frame: Node, val: int): node_frame.set_frame(val)
|
||||
|
||||
|
||||
func start_control() -> void:
|
||||
set_default_state(get_tree().get_nodes_in_group('default_reset'), get_tree().get_nodes_in_group('power_amplifier'))
|
||||
find_labels(self)
|
||||
|
||||
|
||||
func initialize_connections() -> void:
|
||||
var unit_name = get_meta('unit_name')[0]
|
||||
prd_n_module = prd.prd_dict[unit_name]
|
||||
unit_prd_n = prd_n_module.unit_yau07
|
||||
|
||||
unit_prd_n.connect('line_changed', Callable(self, 'on_line_changed'))
|
||||
var power_amplifiers: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
var init_data: Dictionary = {
|
||||
'control_label': $control_result,
|
||||
'power_amplifiers': power_amplifiers,
|
||||
'unit_prd': unit_prd_n,
|
||||
'module_prd' : prd_n_module,
|
||||
'constants': constants_n,
|
||||
'prd_config': PRIBOR_CONFIG_N,
|
||||
'fs_params': FS_PARAMS_N,
|
||||
'block_ip_prd_config': block_ip_config_n,
|
||||
'block_kasseta_y5_prd_config': block_kasseta_y5_prd_config_n,
|
||||
'control_results': control_results_n,
|
||||
'current_litera': start_litera,
|
||||
}
|
||||
control_prd_n = test_control_n.TestPRD.new(init_data)
|
||||
add_child(control_prd_n)
|
||||
control_prd_n.connect('control_is_over', Callable(self, 'on_control_result'))
|
||||
|
||||
|
||||
func setup_timer() -> void:
|
||||
add_child(mashine_timer)
|
||||
mashine_timer.connect('timeout', Callable(self, 'on_state_mashine'))
|
||||
mashine_timer.wait_time = constants_n.STATE_MASHINE_TIMER
|
||||
mashine_timer.start()
|
||||
|
||||
|
||||
func set_default_state() -> void:
|
||||
for group in get_tree().get_nodes_in_group('default_reset'):
|
||||
static func set_default_state(default_reset_array_node: Array, power_amplifier_arr_node: Array) -> void:
|
||||
for group in default_reset_array_node:
|
||||
group.state = STATE_VAL.NONE
|
||||
|
||||
for group in get_tree().get_nodes_in_group('power_amplifier'):
|
||||
for group in power_amplifier_arr_node:
|
||||
group.state = STATE_VAL.NONE
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
$control_result.text = 'Выполняется ...'
|
||||
$control_result.text = 'Ожидается запуск контроля ...' # TODO: Необходимо сделать пулл сообщений
|
||||
$control_result.add_theme_color_override('font_color', Color.ALICE_BLUE)
|
||||
signaller.connect('режим_работа', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_журнал', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_эмс', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_настройки', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_контроль', Callable(self, 'on_mode_changed').bind(true))
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
prd_n_module.cmd_array.append([unit_prd_n.CmdCode.WRITE_ISA, [constants_n.ADDR_UG_LITERA_1, ug_work_1, constants_n.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
#prd_n_module.cmd_array.append([unit_prd_n.CmdCode.WRITE_ISA, [constants_n.ADDR_UG_LITERA_1, ug_work_1, constants_n.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
|
||||
|
||||
func on_line_changed(unit_pribor: Object) -> void:
|
||||
if not unit_pribor.online:
|
||||
set_default_state()
|
||||
static func temperature_fill(temperature_arr_node: Array, temperature_dic: Dictionary)->void:
|
||||
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]
|
||||
|
||||
|
||||
func on_mode_changed(in_tree: bool) -> void:
|
||||
if not in_tree:
|
||||
mashine_timer.stop()
|
||||
signaller.emit_signal('interfer_off_all')
|
||||
prd_n_module.cmd_array.append([unit_prd_n.CmdCode.WRITE_ISA, [constants_n.ADDR_UG_LITERA_1, ug_work_1, constants_n.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
else:
|
||||
set_default_state()
|
||||
control_prd_n.state = control_prd_n.STATE_MASHINE.INIT
|
||||
mashine_timer.start()
|
||||
|
||||
|
||||
func power_fill(pow_dic: Dictionary, fs_result: Dictionary) -> void:
|
||||
#if not control_prd_n.block_kasseta_y5_config.yau07 or not control_prd_n.block_kasseta_y5_config.ukp1 or not control_prd_n.block_kasseta_y5_config.ukp2:
|
||||
#return
|
||||
var power_amplifier: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
for i_powapm in power_amplifier:
|
||||
var powamp_meta: String = i_powapm.get_meta('um')
|
||||
static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifier_arr_node: Array, POWER_THRESHOLD: int) -> void:
|
||||
for i_node_powapm in power_amplifier_arr_node:
|
||||
var powamp_meta: String = i_node_powapm.get_meta('um')
|
||||
var status = STATE_VAL.GOOD if pow_dic else STATE_VAL.NONE
|
||||
if pow_dic[powamp_meta].size() < 6:
|
||||
status = STATE_VAL.ERROR
|
||||
else:
|
||||
if powamp_meta in ['um_1', 'um_2', 'um_3', 'um_4', 'um_5', 'um_6'] and not fs_result.fs_2: return
|
||||
if powamp_meta in ['um_7', 'um_8', 'um_9', 'um_10', 'um_11', 'um_12'] and not fs_result.fs_3: return
|
||||
i_powapm.value0 = pow_dic[powamp_meta]
|
||||
for i_p in pow_dic[powamp_meta]:
|
||||
if i_p < constants_n.POWER_THRESHOLD:
|
||||
status = STATE_VAL.ERROR
|
||||
i_powapm.state = status
|
||||
if not pow_dic.has(powamp_meta): return
|
||||
if powamp_meta in ['um_1', 'um_2', 'um_3', 'um_4', 'um_5', 'um_6'] and not fs_result.fs_2: return
|
||||
if powamp_meta in ['um_9', 'um_10', 'um_11', 'um_12', 'um_13', 'um_14'] and not fs_result.fs_3: return
|
||||
i_node_powapm.value0 = pow_dic[powamp_meta]
|
||||
for i_p in pow_dic[powamp_meta]:
|
||||
if i_p < POWER_THRESHOLD:
|
||||
status = STATE_VAL.ERROR
|
||||
i_node_powapm.state = status
|
||||
|
||||
|
||||
func on_control_result(result_dic: Dictionary, power_dic: Dictionary) -> void:
|
||||
mashine_timer.stop()
|
||||
block_kasseta_y5_prd_config_n = control_prd_n.block_kasseta_y5_config
|
||||
func on_press_device() -> void:
|
||||
var nodes_y5: Array = get_tree().get_nodes_in_group('y-5')
|
||||
var node_ip_power_arr: Array = get_tree().get_nodes_in_group('power_supply')
|
||||
var fs_nodes: Array = get_tree().get_nodes_in_group('fs_group')
|
||||
var power_amplifier_arr_node: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
var default_reset_array_node = get_tree().get_nodes_in_group('default_reset')
|
||||
var module_fs_2: Node = $kasseta_FS_ND/ref_A4
|
||||
var dou_2: Node = $dou2_A5
|
||||
var module_fs_3: Node = $kasseta_FS_ND/ref_A3
|
||||
var dou_3: Node = $dou3_A6
|
||||
var for_control_result: Dictionary = {
|
||||
'control_is_over': unit_prd_n.flag_control_is_over,
|
||||
'result_dic': unit_prd_n.control_results,
|
||||
'power_dic': unit_prd_n.power_result,
|
||||
'block_kasseta_y5_config': unit_prd_n.block_kasseta_y5_config,
|
||||
'block_ip_config': unit_prd_n.block_ip_config,
|
||||
'temperature_um' : unit_prd_n.temperature_um,
|
||||
'nodes_y5': nodes_y5,
|
||||
'node_ip_power_arr': node_ip_power_arr,
|
||||
'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,
|
||||
'dou_3': dou_3,
|
||||
}
|
||||
on_control_result(for_control_result)
|
||||
|
||||
|
||||
static func on_control_result(for_result_dic: Dictionary) -> void:
|
||||
temperature_fill(for_result_dic.power_amplifier, for_result_dic.temperature_um)
|
||||
|
||||
var block_kasseta_y5_prd_config_n: Dictionary = for_result_dic.block_kasseta_y5_config
|
||||
var nodes_y5: Array = for_result_dic.nodes_y5
|
||||
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 block_kasseta_y5_prd_config_n['yau07'] == false:
|
||||
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
|
||||
|
||||
block_ip_config_n = control_prd_n.block_ip_config
|
||||
var node_ip_power_arr: Array = get_tree().get_nodes_in_group('power_supply')
|
||||
for power_supply in node_ip_power_arr:
|
||||
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:
|
||||
power_supply.state = STATE_VAL.GOOD if block_ip_config_n[meta_ip][1] else STATE_VAL.ERROR
|
||||
|
||||
var fs_nodes: Array = get_tree().get_nodes_in_group('fs_group')
|
||||
for f in fs_nodes:
|
||||
if not for_result_dic.control_is_over:
|
||||
set_default_state(for_result_dic.default_reset_array_node, for_result_dic.power_amplifier)
|
||||
return
|
||||
var result_dic: Dictionary = for_result_dic.result_dic
|
||||
for f in for_result_dic.fs_nodes:
|
||||
var fs_meta: String = f.get_meta('fs')
|
||||
if result_dic.has(fs_meta):
|
||||
var new_state = result_dic[fs_meta]
|
||||
f.state = new_state
|
||||
result_dic[fs_meta] = new_state
|
||||
f.state = result_dic[fs_meta]
|
||||
|
||||
if result_dic.fs_2 == 1:
|
||||
$kasseta_FS_ND/ref_A4.state = STATE_VAL.GOOD if result_dic.dkm_2 else STATE_VAL.ERROR
|
||||
$dou2_A5.state = STATE_VAL.GOOD if result_dic.dou_2 else STATE_VAL.ERROR
|
||||
else:
|
||||
result_dic.fs_2 = 0
|
||||
if result_dic.fs_3 == 1:
|
||||
$kasseta_FS_ND/ref_A3.state = STATE_VAL.GOOD if result_dic.dkm_3 else STATE_VAL.ERROR
|
||||
$dou3_A6.state = STATE_VAL.GOOD if result_dic.dou_3 else STATE_VAL.ERROR
|
||||
else:
|
||||
result_dic.fs_3 = 0
|
||||
if result_dic.fs_2 == 1 and block_kasseta_y5_prd_config_n['yau07']:
|
||||
for_result_dic.module_fs_2.state = STATE_VAL.GOOD if result_dic.dkm_2 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_2.state = STATE_VAL.GOOD if result_dic.dou_2 else STATE_VAL.ERROR
|
||||
|
||||
power_fill(power_dic, result_dic)
|
||||
|
||||
var result = true
|
||||
if result_dic.fs_3 == 1 and block_kasseta_y5_prd_config_n['yau07']:
|
||||
for_result_dic.module_fs_3.state = STATE_VAL.GOOD if result_dic.dkm_3 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_3.state = STATE_VAL.GOOD if result_dic.dou_3 else STATE_VAL.ERROR
|
||||
|
||||
if block_kasseta_y5_prd_config_n['yau07']:
|
||||
power_fill(for_result_dic.power_dic, for_result_dic.result_dic, for_result_dic.power_amplifier, for_result_dic.POWER_THRESHOLD)
|
||||
var result: bool = true
|
||||
for device in result_dic.values():
|
||||
if not device:
|
||||
result = false
|
||||
|
||||
var name_prd = control_prd_n.self_name
|
||||
if result:
|
||||
$control_result.text = 'Прибор ПРД-%s исправен' % name_prd
|
||||
$control_result.add_theme_color_override('font_color', Color.GREEN)
|
||||
else:
|
||||
$control_result.text = 'Прибор ПРД-%s неисправен' % name_prd
|
||||
$control_result.add_theme_color_override('font_color', Color.RED)
|
||||
log.message(Logger.INFO, 'Прибор ПРД-%s %s' % [for_result_dic.name_prd, ['неисправен', 'исправен'][int(result)]])
|
||||
|
||||
|
||||
func find_labels(node1: Node):
|
||||
|
||||
@@ -1,12 +1,35 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dnuexoef2nnv5"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://dnuexoef2nnv5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cto2r4ipew65m" path="res://scenes/pribor-prd-n/pribor-prd-n.gd" id="1_bnnv3"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="2_is25t"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="3_meukj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bk1655p4e8y4u" path="res://scenes/контроль/кассета-у-5-нв.tscn" id="4_xkifg"]
|
||||
[ext_resource type="Script" uid="uid://crpedygm3gohi" path="res://scenes/контроль/кассета.gd" id="6_b5wvk"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcyxqni7gxvtq" path="res://scenes/контроль/блок-в.tscn" id="7_bnnv3"]
|
||||
[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/элемент-в.tscn" id="7_eoqf2"]
|
||||
[ext_resource type="Texture2D" uid="uid://belwchvdktrw0" path="res://data/эмс-бланк.png" id="8_bnnv3"]
|
||||
[ext_resource type="Texture2D" uid="uid://bwddxs24es81u" path="res://data/эмс-бланк-пост.png" id="9_is25t"]
|
||||
[ext_resource type="Texture2D" uid="uid://pfoscstbm025" path="res://data/эмс-бланк-перем.png" id="10_meukj"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvl3sq036gn75" path="res://data/эмс-бланк-замыкание.png" id="11_xkifg"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_1wf07"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("8_bnnv3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("9_is25t")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("10_meukj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("11_xkifg")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="pribor_prd_n" type="Control"]
|
||||
layout_mode = 3
|
||||
@@ -17,7 +40,7 @@ offset_right = 15.0
|
||||
offset_bottom = 30.0
|
||||
script = ExtResource("1_bnnv3")
|
||||
|
||||
[node name="maa2000_A23" parent="." groups=["default_reset", "power_supply"] instance=ExtResource("2_is25t")]
|
||||
[node name="maa2000_A23" parent="." groups=["power_supply"] instance=ExtResource("2_is25t")]
|
||||
layout_mode = 2
|
||||
offset_left = 8.0
|
||||
offset_top = 877.0
|
||||
@@ -27,7 +50,7 @@ fname = "MAA2000"
|
||||
rname = "A23"
|
||||
metadata/ip = "maa2000_2"
|
||||
|
||||
[node name="maa2000_A22" parent="." groups=["default_reset", "power_supply"] instance=ExtResource("2_is25t")]
|
||||
[node name="maa2000_A22" parent="." groups=["power_supply"] instance=ExtResource("2_is25t")]
|
||||
layout_mode = 2
|
||||
offset_left = 485.0
|
||||
offset_top = 877.0
|
||||
@@ -79,12 +102,83 @@ text = "Панель
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="kasseta_U5" parent="." instance=ExtResource("4_xkifg")]
|
||||
[node name="kasseta_U5" type="NinePatchRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 175.0
|
||||
offset_top = 242.0
|
||||
offset_right = 485.0
|
||||
offset_bottom = 432.0
|
||||
texture = ExtResource("3_meukj")
|
||||
patch_margin_left = 16
|
||||
patch_margin_top = 16
|
||||
patch_margin_right = 16
|
||||
patch_margin_bottom = 16
|
||||
script = ExtResource("6_b5wvk")
|
||||
|
||||
[node name="lbl_fname" type="Label" parent="kasseta_U5"]
|
||||
self_modulate = Color(1, 1, 1, 0.62)
|
||||
layout_mode = 0
|
||||
offset_left = 5.0
|
||||
offset_top = 7.0
|
||||
offset_right = 305.0
|
||||
offset_bottom = 35.0
|
||||
text = "Кассета У5"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ref_A24" parent="kasseta_U5" groups=["power_supply"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 5.0
|
||||
offset_top = 32.0
|
||||
offset_right = 55.0
|
||||
offset_bottom = 182.0
|
||||
fname = "ИП5-25"
|
||||
rname = "A24"
|
||||
metadata/ip = "ip5_25"
|
||||
|
||||
[node name="ref_A30" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 55.0
|
||||
offset_top = 32.0
|
||||
offset_right = 105.0
|
||||
offset_bottom = 182.0
|
||||
fname = "ЯУ-07Б"
|
||||
rname = "A30"
|
||||
metadata/y5 = "yau07"
|
||||
|
||||
[node name="ref_A26" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 105.0
|
||||
offset_top = 32.0
|
||||
offset_right = 155.0
|
||||
offset_bottom = 182.0
|
||||
fname = "ЭМС-Г"
|
||||
rname = "A26"
|
||||
metadata/y5 = "ems"
|
||||
|
||||
[node name="ref_A27" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 155.0
|
||||
offset_top = 32.0
|
||||
offset_right = 205.0
|
||||
offset_bottom = 182.0
|
||||
fname = "УГ"
|
||||
rname = "A27"
|
||||
metadata/y5 = "ug"
|
||||
|
||||
[node name="ref_A28" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 205.0
|
||||
offset_top = 32.0
|
||||
offset_right = 255.0
|
||||
offset_bottom = 182.0
|
||||
fname = "УКП"
|
||||
rname = "A28"
|
||||
metadata/y5 = "ukp1"
|
||||
|
||||
[node name="ref_A29" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 254.0
|
||||
offset_top = 32.0
|
||||
offset_right = 304.0
|
||||
offset_bottom = 182.0
|
||||
fname = "УКП"
|
||||
rname = "A29"
|
||||
metadata/y5 = "ukp2"
|
||||
|
||||
[node name="kasseta_FS_ND" type="NinePatchRect" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -118,7 +212,7 @@ offset_top = 32.0
|
||||
offset_right = 105.0
|
||||
offset_bottom = 182.0
|
||||
fname = "Блок ФС-3"
|
||||
rname = "A3"
|
||||
rname = "A4"
|
||||
|
||||
[node name="ref_A1" parent="kasseta_FS_ND" groups=["default_reset", "fs_group"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 105.0
|
||||
@@ -126,7 +220,7 @@ offset_top = 32.0
|
||||
offset_right = 155.0
|
||||
offset_bottom = 182.0
|
||||
fname = "Модуль ФС"
|
||||
rname = "A1"
|
||||
rname = "A2"
|
||||
metadata/fs = "fs_3"
|
||||
|
||||
[node name="ref_A2" parent="kasseta_FS_ND" groups=["default_reset", "fs_group"] instance=ExtResource("7_eoqf2")]
|
||||
@@ -135,7 +229,7 @@ offset_top = 32.0
|
||||
offset_right = 205.0
|
||||
offset_bottom = 182.0
|
||||
fname = "Модуль ФС"
|
||||
rname = "A2"
|
||||
rname = "A1"
|
||||
metadata/fs = "fs_2"
|
||||
|
||||
[node name="ref_A4" parent="kasseta_FS_ND" groups=["default_reset"] instance=ExtResource("7_eoqf2")]
|
||||
@@ -144,7 +238,7 @@ offset_top = 32.0
|
||||
offset_right = 255.0
|
||||
offset_bottom = 182.0
|
||||
fname = "Блок ФС-2"
|
||||
rname = "A4"
|
||||
rname = "A3"
|
||||
|
||||
[node name="kasseta_P_1" type="NinePatchRect" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -160,7 +254,7 @@ patch_margin_bottom = 16
|
||||
script = ExtResource("6_b5wvk")
|
||||
fname = "Кассета П-1"
|
||||
|
||||
[node name="ref_A21" parent="kasseta_P_1" groups=["default_reset", "power_supply"] instance=ExtResource("7_eoqf2")]
|
||||
[node name="ref_A21" parent="kasseta_P_1" groups=["power_supply"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 9.0
|
||||
offset_top = 33.0
|
||||
offset_right = 59.0
|
||||
@@ -169,7 +263,7 @@ fname = "ИП12-50"
|
||||
rname = "A21"
|
||||
metadata/ip = "ip12_50_1"
|
||||
|
||||
[node name="ref_A20" parent="kasseta_P_1" groups=["default_reset", "power_supply"] instance=ExtResource("7_eoqf2")]
|
||||
[node name="ref_A20" parent="kasseta_P_1" groups=["power_supply"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 59.0
|
||||
offset_top = 33.0
|
||||
offset_right = 109.0
|
||||
@@ -178,7 +272,7 @@ fname = "ИП9-50"
|
||||
rname = "A20"
|
||||
metadata/ip = "ip9_50_1"
|
||||
|
||||
[node name="ref_A19" parent="kasseta_P_1" groups=["default_reset", "power_supply"] instance=ExtResource("7_eoqf2")]
|
||||
[node name="ref_A19" parent="kasseta_P_1" groups=["power_supply"] instance=ExtResource("7_eoqf2")]
|
||||
offset_left = 109.0
|
||||
offset_top = 33.0
|
||||
offset_right = 159.0
|
||||
@@ -204,9 +298,9 @@ offset_left = 485.0
|
||||
offset_top = 242.0
|
||||
offset_right = 652.0
|
||||
offset_bottom = 337.0
|
||||
fname = "УМ1535Б"
|
||||
fname = "УМ1535А"
|
||||
rname = "A7"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_1"
|
||||
|
||||
@@ -218,7 +312,7 @@ offset_right = 652.0
|
||||
offset_bottom = 432.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A8"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_2"
|
||||
|
||||
@@ -230,7 +324,7 @@ offset_right = 652.0
|
||||
offset_bottom = 527.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A9"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_3"
|
||||
|
||||
@@ -242,7 +336,7 @@ offset_right = 652.0
|
||||
offset_bottom = 622.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A10"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_4"
|
||||
|
||||
@@ -254,7 +348,7 @@ offset_right = 652.0
|
||||
offset_bottom = 717.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A11"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_5"
|
||||
|
||||
@@ -266,7 +360,7 @@ offset_right = 652.0
|
||||
offset_bottom = 812.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A12"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_6"
|
||||
|
||||
@@ -278,9 +372,9 @@ offset_right = 175.0
|
||||
offset_bottom = 337.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A13"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_7"
|
||||
metadata/um = "um_9"
|
||||
|
||||
[node name="um1535_A14" parent="." groups=["power_amplifier"] instance=ExtResource("7_bnnv3")]
|
||||
layout_mode = 0
|
||||
@@ -290,9 +384,9 @@ offset_right = 175.0
|
||||
offset_bottom = 432.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A14"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_8"
|
||||
metadata/um = "um_10"
|
||||
|
||||
[node name="um1535_A15" parent="." groups=["power_amplifier"] instance=ExtResource("7_bnnv3")]
|
||||
layout_mode = 0
|
||||
@@ -302,9 +396,9 @@ offset_right = 175.0
|
||||
offset_bottom = 527.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A15"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_9"
|
||||
metadata/um = "um_11"
|
||||
|
||||
[node name="um1535_A16" parent="." groups=["power_amplifier"] instance=ExtResource("7_bnnv3")]
|
||||
layout_mode = 0
|
||||
@@ -314,9 +408,9 @@ offset_right = 175.0
|
||||
offset_bottom = 622.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A16"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_10"
|
||||
metadata/um = "um_12"
|
||||
|
||||
[node name="um1535_A17" parent="." groups=["power_amplifier"] instance=ExtResource("7_bnnv3")]
|
||||
layout_mode = 0
|
||||
@@ -326,9 +420,9 @@ offset_right = 175.0
|
||||
offset_bottom = 717.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A17"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_11"
|
||||
metadata/um = "um_13"
|
||||
|
||||
[node name="um1535_A18" parent="." groups=["power_amplifier"] instance=ExtResource("7_bnnv3")]
|
||||
layout_mode = 0
|
||||
@@ -338,9 +432,9 @@ offset_right = 175.0
|
||||
offset_bottom = 812.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A18"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_12"
|
||||
metadata/um = "um_14"
|
||||
|
||||
[node name="control_result" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -350,3 +444,19 @@ offset_right = 649.0
|
||||
offset_bottom = 1003.0
|
||||
horizontal_alignment = 1
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="input_0" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(456, 589)
|
||||
sprite_frames = SubResource("SpriteFrames_1wf07")
|
||||
|
||||
[node name="input_1" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(207, 586)
|
||||
sprite_frames = SubResource("SpriteFrames_1wf07")
|
||||
|
||||
[node name="output_0" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(458, 476)
|
||||
sprite_frames = SubResource("SpriteFrames_1wf07")
|
||||
|
||||
[node name="output_1" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(210, 477)
|
||||
sprite_frames = SubResource("SpriteFrames_1wf07")
|
||||
|
||||
@@ -1,187 +1,125 @@
|
||||
@tool
|
||||
extends 'res://scenes/контроль/прибор.gd'
|
||||
|
||||
const constants_v = {
|
||||
'POWER_UKP_1': 31,
|
||||
'POWER_UKP_2': 63,
|
||||
'DKM_BIT_4': 3,
|
||||
'DKM_BIT_5': 4,
|
||||
'BASE_ADDR_EMS_G': 0x120,
|
||||
'ADDR_UG_LITERA_1': 0x106,
|
||||
'ADDR_UG_LITERA_2': 0x108,
|
||||
'ADDR_UG_LITERA_3': 0x10A,
|
||||
'TEMP_THRESHOLD': 70,
|
||||
'POWER_THRESHOLD': 40,
|
||||
'RAY_DOU_NUM': 0x3,
|
||||
'ATT_UM_4': 0x2,
|
||||
'ATT_UM_5': 0x3,
|
||||
'POWER_UM': 100,
|
||||
'TIMER_DELAY': 10.0,
|
||||
'STATE_MASHINE_TIMER': 0.3,
|
||||
}
|
||||
# Конфигурация параметров для каждого прибора
|
||||
const PRIBOR_CONFIG_V := {
|
||||
'1в': {'angle': 0.0, 'sectors': [12, 16]},
|
||||
'2в': {'angle': 90.0, 'sectors': [15, 19]},
|
||||
'3в': {'angle': 180.0, 'sectors': [14, 18]},
|
||||
'4в': {'angle': 270.0, 'sectors': [13, 17]},
|
||||
}
|
||||
# Конфигурация частот и ширин для каждого ФС
|
||||
const FS_PARAMS_V := {
|
||||
4: {'freq': 1227.0, 'width': 100.0},
|
||||
5: {'freq': 1575.0, 'width': 110.0},
|
||||
}
|
||||
enum STATE_VAL { NONE = 0, GOOD = 1, ERROR = 2 }
|
||||
var block_ip_config_v := {
|
||||
'maa2000_1': [0, false],
|
||||
'maa2000_2': [1, false],
|
||||
'ip9_50_1': [2, false],
|
||||
'ip9_50_2': [3, false],
|
||||
'ip12_50_1': [4, false],
|
||||
'ip5_25': [7, false],
|
||||
}
|
||||
var block_kasseta_y5_prd_config_v: = {
|
||||
'yau07': false,
|
||||
'ems': false,
|
||||
'ug': false,
|
||||
'ukp1': false,
|
||||
'ukp2': false,
|
||||
}
|
||||
|
||||
# Основные переменные
|
||||
var start_litera: int = 4
|
||||
var ug_work_1: int = 2 ## Аттенюация усилителей мощности
|
||||
var ug_work_2: int = 3 ## Аттенюация усилителей мощности
|
||||
# Флаги и таймеры
|
||||
var mashine_timer: Timer = Timer.new()
|
||||
var prd_v_module: Object
|
||||
var unit_prd_v: Object
|
||||
var control_prd_v: Object
|
||||
# Результаты контроля
|
||||
var control_results_v: Dictionary = {
|
||||
'block_ip': false, # Проверка касет П1 и ИП МА2000
|
||||
'temperature': true, # Проверка температур УМ
|
||||
'dkm_4': false,
|
||||
'dkm_5': false,
|
||||
'dou_4': false,
|
||||
'dou_5': false,
|
||||
'fs_4': 2,
|
||||
'fs_5': 2,
|
||||
}
|
||||
var test_control_v = preload('res://scripts/pribor-prd.gd')
|
||||
var ctrl_pos = 70
|
||||
|
||||
|
||||
func on_state_mashine() -> void:
|
||||
control_prd_v.state_control_machine()
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
var unit_name = get_meta('unit_name')[0]
|
||||
var prd_v_module = prd.prd_dict[unit_name]
|
||||
unit_prd_v = prd_v_module.unit_control
|
||||
var power_amplifier: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
for temp in power_amplifier:
|
||||
temp.value1 = -70
|
||||
unit_prd_v.connect('control_is_over', Callable(self, 'on_press_device'))
|
||||
on_press_device()
|
||||
|
||||
initialize_connections()
|
||||
setup_timer()
|
||||
set_default_state()
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
set_frame($input_0, unit_prd_v.ems_input_1)
|
||||
set_frame($input_1, unit_prd_v.ems_input_2)
|
||||
set_frame($output_0, unit_prd_v.ems_output_1)
|
||||
set_frame($output_1, unit_prd_v.ems_output_2)
|
||||
|
||||
|
||||
func set_frame(node_frame: Node, val: int): node_frame.set_frame(val)
|
||||
|
||||
|
||||
func start_control() -> void:
|
||||
set_default_state(get_tree().get_nodes_in_group('default_reset'), get_tree().get_nodes_in_group('power_amplifier'))
|
||||
find_labels(self)
|
||||
|
||||
|
||||
func initialize_connections() -> void:
|
||||
var unit_name = get_meta('unit_name')[0]
|
||||
prd_v_module = prd.prd_dict[unit_name]
|
||||
unit_prd_v = prd_v_module.unit_yau07
|
||||
|
||||
unit_prd_v.connect('line_changed', Callable(self, 'on_line_changed'))
|
||||
var power_amplifiers: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
var init_data: Dictionary = {
|
||||
'control_label': $control_result,
|
||||
'power_amplifiers': power_amplifiers,
|
||||
'unit_prd': unit_prd_v,
|
||||
'module_prd' : prd_v_module,
|
||||
'constants': constants_v,
|
||||
'prd_config': PRIBOR_CONFIG_V,
|
||||
'fs_params': FS_PARAMS_V,
|
||||
'block_ip_prd_config': block_ip_config_v,
|
||||
'block_kasseta_y5_prd_config': block_kasseta_y5_prd_config_v,
|
||||
'control_results': control_results_v,
|
||||
'current_litera': start_litera,
|
||||
}
|
||||
control_prd_v = test_control_v.TestPRD.new(init_data)
|
||||
add_child(control_prd_v)
|
||||
control_prd_v.connect('control_is_over', Callable(self, 'on_control_result'))
|
||||
|
||||
|
||||
func setup_timer() -> void:
|
||||
add_child(mashine_timer)
|
||||
mashine_timer.connect('timeout', Callable(self, 'on_state_mashine'))
|
||||
mashine_timer.wait_time = constants_v.STATE_MASHINE_TIMER
|
||||
mashine_timer.start()
|
||||
|
||||
|
||||
func set_default_state() -> void:
|
||||
for group in get_tree().get_nodes_in_group('default_reset'):
|
||||
static func set_default_state(default_reset_array_node: Array, power_amplifier_arr_node: Array) -> void:
|
||||
for group in default_reset_array_node:
|
||||
group.state = STATE_VAL.NONE
|
||||
|
||||
for group in get_tree().get_nodes_in_group('power_amplifier'):
|
||||
for group in power_amplifier_arr_node:
|
||||
group.state = STATE_VAL.NONE
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
$control_result.text = 'Выполняется ...'
|
||||
$control_result.text = 'Ожидается запуск контроля ...' # TODO: Необходимо сделать пулл сообщений
|
||||
$control_result.add_theme_color_override('font_color', Color.ALICE_BLUE)
|
||||
signaller.connect('режим_работа', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_журнал', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_эмс', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_настройки', Callable(self, 'on_mode_changed').bind(false))
|
||||
signaller.connect('режим_контроль', Callable(self, 'on_mode_changed').bind(true))
|
||||
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
prd_v_module.cmd_array.append([unit_prd_v.CmdCode.WRITE_ISA, [constants_v.ADDR_UG_LITERA_1, ug_work_1, constants_v.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
#prd_v_module.cmd_array.append([unit_prd_v.CmdCode.WRITE_ISA, [constants_v.ADDR_UG_LITERA_1, ug_work_1, constants_v.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
|
||||
|
||||
func on_line_changed(unit_pribor: Object) -> void:
|
||||
if not unit_pribor.online:
|
||||
set_default_state()
|
||||
static func temperature_fill(temperature_arr_node: Array, temperature_dic: Dictionary)->void:
|
||||
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]
|
||||
|
||||
|
||||
func on_mode_changed(in_tree: bool) -> void:
|
||||
if not in_tree:
|
||||
mashine_timer.stop()
|
||||
prd_v_module.cmd_array.append([unit_prd_v.CmdCode.WRITE_ISA, [constants_v.ADDR_UG_LITERA_1, ug_work_1, constants_v.ADDR_UG_LITERA_2, ug_work_2]])
|
||||
signaller.emit_signal('interfer_off_all')
|
||||
else:
|
||||
set_default_state()
|
||||
control_prd_v.state = control_prd_v.STATE_MASHINE.INIT
|
||||
mashine_timer.start()
|
||||
|
||||
|
||||
func power_fill(pow_dic: Dictionary, fs_result: Dictionary) -> void:
|
||||
var power_amplifier: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifier: Array, POWER_THRESHOLD: int) -> void:
|
||||
for i_powapm in power_amplifier:
|
||||
var powamp_meta: String = i_powapm.get_meta('um')
|
||||
var status = STATE_VAL.GOOD if pow_dic else STATE_VAL.NONE
|
||||
if not pow_dic.has(powamp_meta): return
|
||||
if pow_dic[powamp_meta].size() < 6:
|
||||
status = STATE_VAL.ERROR
|
||||
else:
|
||||
if powamp_meta in ['um_1', 'um_2', 'um_3', 'um_4', 'um_5', 'um_6'] and not fs_result.fs_4: return
|
||||
if powamp_meta in ['um_7', 'um_8', 'um_9', 'um_10', 'um_11', 'um_12'] and not fs_result.fs_5: return
|
||||
if powamp_meta in ['um_9', 'um_10', 'um_11', 'um_12', 'um_13', 'um_14'] and not fs_result.fs_5: return
|
||||
i_powapm.value0 = pow_dic[powamp_meta]
|
||||
for i_p in pow_dic[powamp_meta]:
|
||||
if i_p < constants_v.POWER_THRESHOLD:
|
||||
if i_p < POWER_THRESHOLD:
|
||||
status = STATE_VAL.ERROR
|
||||
i_powapm.state = status
|
||||
|
||||
|
||||
func on_control_result(result_dic: Dictionary, power_dic: Dictionary) -> void:
|
||||
mashine_timer.stop()
|
||||
block_kasseta_y5_prd_config_v = control_prd_v.block_kasseta_y5_config
|
||||
func on_press_device() -> void:
|
||||
var nodes_y5: Array = get_tree().get_nodes_in_group('y-5')
|
||||
var node_ip_power_arr: Array = get_tree().get_nodes_in_group('power_supply')
|
||||
var fs_nodes: Array = get_tree().get_nodes_in_group('fs_group')
|
||||
var power_amplifier: Array = get_tree().get_nodes_in_group('power_amplifier')
|
||||
var default_reset_array_node: Array = get_tree().get_nodes_in_group('default_reset')
|
||||
var module_fs_4: Node = $kasseta_FS_VD/ref_A6
|
||||
var dou_4: Node = $dou4_A5
|
||||
var module_fs_5: Node = $kasseta_FS_VD/ref_A2
|
||||
var dou_5: Node = $dou5_A6
|
||||
var for_control_result: Dictionary = {
|
||||
'control_is_over': unit_prd_v.flag_control_is_over,
|
||||
'result_dic': unit_prd_v.control_results,
|
||||
'power_dic': unit_prd_v.power_result,
|
||||
'block_kasseta_y5_config': unit_prd_v.block_kasseta_y5_config,
|
||||
'block_ip_config': unit_prd_v.block_ip_config,
|
||||
'temperature_um' : unit_prd_v.temperature_um,
|
||||
'nodes_y5': nodes_y5,
|
||||
'node_ip_power_arr': node_ip_power_arr,
|
||||
'fs_nodes': fs_nodes,
|
||||
'power_amplifier': power_amplifier,
|
||||
'default_reset_array_node': default_reset_array_node,
|
||||
'POWER_THRESHOLD': unit_prd_v.constants.POWER_THRESHOLD,
|
||||
'name_prd': unit_prd_v.self_name,
|
||||
'module_fs_4': module_fs_4,
|
||||
'dou_4': dou_4,
|
||||
'module_fs_5': module_fs_5,
|
||||
'dou_5': dou_5,
|
||||
}
|
||||
on_control_result(for_control_result)
|
||||
|
||||
|
||||
static func on_control_result(for_result_dic: Dictionary) -> void:
|
||||
temperature_fill(for_result_dic.power_amplifier, for_result_dic.temperature_um)
|
||||
|
||||
var block_kasseta_y5_prd_config_v: Dictionary = for_result_dic.block_kasseta_y5_config
|
||||
var nodes_y5: Array = for_result_dic.nodes_y5
|
||||
for node_y5 in nodes_y5:
|
||||
var meta_y5 = node_y5.get_meta('y5')
|
||||
if block_kasseta_y5_prd_config_v.has(meta_y5):
|
||||
@@ -190,45 +128,38 @@ func on_control_result(result_dic: Dictionary, power_dic: Dictionary) -> void:
|
||||
break
|
||||
node_y5.state = STATE_VAL.GOOD if block_kasseta_y5_prd_config_v[meta_y5] else STATE_VAL.ERROR
|
||||
|
||||
block_ip_config_v = control_prd_v.block_ip_config
|
||||
var node_ip_power_arr: Array = get_tree().get_nodes_in_group('power_supply')
|
||||
for power_supply in node_ip_power_arr:
|
||||
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:
|
||||
power_supply.state = STATE_VAL.GOOD if block_ip_config_v[meta_ip][1] else STATE_VAL.ERROR
|
||||
|
||||
var fs_nodes: Array = get_tree().get_nodes_in_group('fs_group')
|
||||
for f in fs_nodes:
|
||||
if not for_result_dic.control_is_over:
|
||||
set_default_state(for_result_dic.default_reset_array_node, for_result_dic.power_amplifier)
|
||||
return
|
||||
var result_dic: Dictionary = for_result_dic.result_dic
|
||||
for f in for_result_dic.fs_nodes:
|
||||
var fs_meta: String = f.get_meta('fs')
|
||||
if result_dic.has(fs_meta):
|
||||
var new_state = result_dic[fs_meta]
|
||||
f.state = new_state
|
||||
result_dic[fs_meta] = new_state
|
||||
f.state = result_dic[fs_meta]
|
||||
|
||||
if result_dic.fs_5 == 1:
|
||||
$kasseta_FS_VD/ref_A2.state = STATE_VAL.GOOD if result_dic.dkm_5 else STATE_VAL.ERROR
|
||||
$dou5_A6.state = STATE_VAL.GOOD if result_dic.dou_5 else STATE_VAL.ERROR
|
||||
else:
|
||||
result_dic.fs_5 = 0
|
||||
if result_dic.fs_4 == 1:
|
||||
$kasseta_FS_VD/ref_A6.state = STATE_VAL.GOOD if result_dic.dkm_4 else STATE_VAL.ERROR
|
||||
$dou4_A5.state = STATE_VAL.GOOD if result_dic.dou_4 else STATE_VAL.ERROR
|
||||
else:
|
||||
result_dic.fs_4 = 0
|
||||
power_fill(power_dic, result_dic)
|
||||
if result_dic.fs_5 == 1 and block_kasseta_y5_prd_config_v['yau07']:
|
||||
for_result_dic.module_fs_5.state = STATE_VAL.GOOD if result_dic.dkm_5 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_5.state = STATE_VAL.GOOD if result_dic.dou_5 else STATE_VAL.ERROR
|
||||
|
||||
if result_dic.fs_4 == 1 and block_kasseta_y5_prd_config_v['yau07']:
|
||||
for_result_dic.module_fs_4.state = STATE_VAL.GOOD if result_dic.dkm_4 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_4.state = STATE_VAL.GOOD if result_dic.dou_4 else STATE_VAL.ERROR
|
||||
|
||||
if block_kasseta_y5_prd_config_v['yau07']:
|
||||
power_fill(for_result_dic.power_dic, for_result_dic.result_dic, for_result_dic.power_amplifier, for_result_dic.POWER_THRESHOLD)
|
||||
|
||||
var result = true
|
||||
var result: bool = true
|
||||
for device in result_dic.values():
|
||||
if not device:
|
||||
result = false
|
||||
|
||||
var name_prd = control_prd_v.self_name
|
||||
if result:
|
||||
$control_result.text = 'Прибор ПРД-%s исправен' % name_prd
|
||||
$control_result.add_theme_color_override('font_color', Color.GREEN)
|
||||
else:
|
||||
$control_result.text = 'Прибор ПРД-%s неисправен' % name_prd
|
||||
$control_result.add_theme_color_override('font_color', Color.RED)
|
||||
log.message(Logger.INFO, 'Прибор ПРД-%s %s' % [for_result_dic.name_prd, ['неисправен', 'исправен'][int(result)]])
|
||||
|
||||
|
||||
func find_labels(node1: Node):
|
||||
|
||||
@@ -1,13 +1,36 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cvskpe1ti3p45"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://cvskpe1ti3p45"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cvuosuvjaci1h" path="res://scenes/pribor-prd-v/pribor-prd-v.gd" id="1_c20s6"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="2_xpo4b"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="3_wyy1b"]
|
||||
[ext_resource type="PackedScene" uid="uid://bk1655p4e8y4u" path="res://scenes/контроль/кассета-у-5-нв.tscn" id="4_gl2bl"]
|
||||
[ext_resource type="PackedScene" uid="uid://cd5sue1e8iyrv" path="res://scenes/pribor-prd-n/kasseta-fs-nd.tscn" id="5_nhd2k"]
|
||||
[ext_resource type="Script" uid="uid://crpedygm3gohi" path="res://scenes/контроль/кассета.gd" id="6_os4mt"]
|
||||
[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/элемент-в.tscn" id="7_38u2b"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcyxqni7gxvtq" path="res://scenes/контроль/блок-в.tscn" id="8_4e87c"]
|
||||
[ext_resource type="Texture2D" uid="uid://belwchvdktrw0" path="res://data/эмс-бланк.png" id="9_4e87c"]
|
||||
[ext_resource type="Texture2D" uid="uid://bwddxs24es81u" path="res://data/эмс-бланк-пост.png" id="10_g8fvp"]
|
||||
[ext_resource type="Texture2D" uid="uid://pfoscstbm025" path="res://data/эмс-бланк-перем.png" id="11_gsby4"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvl3sq036gn75" path="res://data/эмс-бланк-замыкание.png" id="12_vxfkm"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_s5gcy"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("9_4e87c")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("10_g8fvp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("11_gsby4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("12_vxfkm")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="pribor_prd_v" type="Control"]
|
||||
layout_mode = 3
|
||||
@@ -18,7 +41,7 @@ offset_right = 15.0
|
||||
offset_bottom = 30.0
|
||||
script = ExtResource("1_c20s6")
|
||||
|
||||
[node name="maa2000_A22" parent="." groups=["default_reset", "power_supply"] instance=ExtResource("2_xpo4b")]
|
||||
[node name="maa2000_A22" parent="." groups=["power_supply"] instance=ExtResource("2_xpo4b")]
|
||||
layout_mode = 2
|
||||
offset_left = 485.0
|
||||
offset_top = 877.0
|
||||
@@ -37,7 +60,7 @@ offset_bottom = 877.0
|
||||
fname = "ДОУ-4"
|
||||
rname = "A5"
|
||||
|
||||
[node name="maa2000_A23" parent="." groups=["default_reset", "power_supply"] instance=ExtResource("2_xpo4b")]
|
||||
[node name="maa2000_A23" parent="." groups=["power_supply"] instance=ExtResource("2_xpo4b")]
|
||||
layout_mode = 2
|
||||
offset_left = 8.0
|
||||
offset_top = 877.0
|
||||
@@ -80,12 +103,83 @@ text = "Панель
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="kasseta_U5" parent="." instance=ExtResource("4_gl2bl")]
|
||||
[node name="kasseta_U5" type="NinePatchRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 175.0
|
||||
offset_top = 242.0
|
||||
offset_right = 485.0
|
||||
offset_bottom = 432.0
|
||||
texture = ExtResource("3_wyy1b")
|
||||
patch_margin_left = 16
|
||||
patch_margin_top = 16
|
||||
patch_margin_right = 16
|
||||
patch_margin_bottom = 16
|
||||
script = ExtResource("6_os4mt")
|
||||
|
||||
[node name="lbl_fname" type="Label" parent="kasseta_U5"]
|
||||
self_modulate = Color(1, 1, 1, 0.62)
|
||||
layout_mode = 0
|
||||
offset_left = 5.0
|
||||
offset_top = 7.0
|
||||
offset_right = 305.0
|
||||
offset_bottom = 35.0
|
||||
text = "Кассета У5"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ref_A24" parent="kasseta_U5" groups=["power_supply"] instance=ExtResource("7_38u2b")]
|
||||
offset_left = 5.0
|
||||
offset_top = 32.0
|
||||
offset_right = 55.0
|
||||
offset_bottom = 182.0
|
||||
fname = "ИП5-25"
|
||||
rname = "A24"
|
||||
metadata/ip = "ip5_25"
|
||||
|
||||
[node name="ref_A30" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_38u2b")]
|
||||
offset_left = 55.0
|
||||
offset_top = 32.0
|
||||
offset_right = 105.0
|
||||
offset_bottom = 182.0
|
||||
fname = "ЯУ-07Б"
|
||||
rname = "A30"
|
||||
metadata/y5 = "yau07"
|
||||
|
||||
[node name="ref_A26" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_38u2b")]
|
||||
offset_left = 105.0
|
||||
offset_top = 32.0
|
||||
offset_right = 155.0
|
||||
offset_bottom = 182.0
|
||||
fname = "ЭМС-Г"
|
||||
rname = "A26"
|
||||
metadata/y5 = "ems"
|
||||
|
||||
[node name="ref_A27" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_38u2b")]
|
||||
offset_left = 155.0
|
||||
offset_top = 32.0
|
||||
offset_right = 205.0
|
||||
offset_bottom = 182.0
|
||||
fname = "УГ"
|
||||
rname = "A27"
|
||||
metadata/y5 = "ug"
|
||||
|
||||
[node name="ref_A28" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_38u2b")]
|
||||
offset_left = 205.0
|
||||
offset_top = 32.0
|
||||
offset_right = 255.0
|
||||
offset_bottom = 182.0
|
||||
fname = "УКП"
|
||||
rname = "A28"
|
||||
metadata/y5 = "ukp1"
|
||||
|
||||
[node name="ref_A29" parent="kasseta_U5" groups=["y-5"] instance=ExtResource("7_38u2b")]
|
||||
offset_left = 254.0
|
||||
offset_top = 32.0
|
||||
offset_right = 304.0
|
||||
offset_bottom = 182.0
|
||||
fname = "УКП"
|
||||
rname = "A29"
|
||||
metadata/y5 = "ukp2"
|
||||
|
||||
[node name="kasseta_FS_VD" parent="." instance=ExtResource("5_nhd2k")]
|
||||
layout_mode = 0
|
||||
@@ -109,7 +203,7 @@ patch_margin_bottom = 16
|
||||
script = ExtResource("6_os4mt")
|
||||
fname = "Кассета П-1В"
|
||||
|
||||
[node name="ref_A19" parent="kasseta_P_1" groups=["default_reset", "power_supply"] instance=ExtResource("7_38u2b")]
|
||||
[node name="ref_A19" parent="kasseta_P_1" groups=["power_supply"] instance=ExtResource("7_38u2b")]
|
||||
offset_left = 9.0
|
||||
offset_top = 33.0
|
||||
offset_right = 59.0
|
||||
@@ -118,7 +212,7 @@ fname = "ИП9-50"
|
||||
rname = "A19"
|
||||
metadata/ip = "ip9_50_1"
|
||||
|
||||
[node name="ref_A20" parent="kasseta_P_1" groups=["default_reset", "power_supply"] instance=ExtResource("7_38u2b")]
|
||||
[node name="ref_A20" parent="kasseta_P_1" groups=["power_supply"] instance=ExtResource("7_38u2b")]
|
||||
offset_left = 59.0
|
||||
offset_top = 33.0
|
||||
offset_right = 109.0
|
||||
@@ -127,7 +221,7 @@ fname = "ИП9-50"
|
||||
rname = "A20"
|
||||
metadata/ip = "ip9_50_2"
|
||||
|
||||
[node name="ref_A21" parent="kasseta_P_1" groups=["default_reset", "power_supply"] instance=ExtResource("7_38u2b")]
|
||||
[node name="ref_A21" parent="kasseta_P_1" groups=["power_supply"] instance=ExtResource("7_38u2b")]
|
||||
offset_left = 109.0
|
||||
offset_top = 33.0
|
||||
offset_right = 159.0
|
||||
@@ -153,9 +247,9 @@ offset_left = 485.0
|
||||
offset_top = 242.0
|
||||
offset_right = 652.0
|
||||
offset_bottom = 337.0
|
||||
fname = "УМ1535Б"
|
||||
fname = "УМ1535А"
|
||||
rname = "A7"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_1"
|
||||
|
||||
@@ -167,7 +261,7 @@ offset_right = 652.0
|
||||
offset_bottom = 432.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A8"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_2"
|
||||
|
||||
@@ -179,7 +273,7 @@ offset_right = 652.0
|
||||
offset_bottom = 527.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A9"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_3"
|
||||
|
||||
@@ -191,7 +285,7 @@ offset_right = 652.0
|
||||
offset_bottom = 622.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A10"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_4"
|
||||
|
||||
@@ -203,7 +297,7 @@ offset_right = 652.0
|
||||
offset_bottom = 717.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A11"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_5"
|
||||
|
||||
@@ -215,7 +309,7 @@ offset_right = 652.0
|
||||
offset_bottom = 812.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A12"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_6"
|
||||
|
||||
@@ -227,9 +321,9 @@ offset_right = 175.0
|
||||
offset_bottom = 337.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A13"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_7"
|
||||
metadata/um = "um_9"
|
||||
|
||||
[node name="um1535_A14" parent="." groups=["power_amplifier"] instance=ExtResource("8_4e87c")]
|
||||
layout_mode = 0
|
||||
@@ -239,9 +333,9 @@ offset_right = 175.0
|
||||
offset_bottom = 432.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A14"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_8"
|
||||
metadata/um = "um_10"
|
||||
|
||||
[node name="um1535_A15" parent="." groups=["power_amplifier"] instance=ExtResource("8_4e87c")]
|
||||
layout_mode = 0
|
||||
@@ -251,9 +345,9 @@ offset_right = 175.0
|
||||
offset_bottom = 527.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A15"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_9"
|
||||
metadata/um = "um_11"
|
||||
|
||||
[node name="um1535_A16" parent="." groups=["power_amplifier"] instance=ExtResource("8_4e87c")]
|
||||
layout_mode = 0
|
||||
@@ -263,9 +357,9 @@ offset_right = 175.0
|
||||
offset_bottom = 622.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A16"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_10"
|
||||
metadata/um = "um_12"
|
||||
|
||||
[node name="um1535_A17" parent="." groups=["power_amplifier"] instance=ExtResource("8_4e87c")]
|
||||
layout_mode = 0
|
||||
@@ -275,9 +369,9 @@ offset_right = 175.0
|
||||
offset_bottom = 717.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A17"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_11"
|
||||
metadata/um = "um_13"
|
||||
|
||||
[node name="um1535_A18" parent="." groups=["power_amplifier"] instance=ExtResource("8_4e87c")]
|
||||
layout_mode = 0
|
||||
@@ -287,9 +381,9 @@ offset_right = 175.0
|
||||
offset_bottom = 812.0
|
||||
fname = "УМ1535А"
|
||||
rname = "A18"
|
||||
value0_info = "Мощность, Вт"
|
||||
value0_info = "Мощность"
|
||||
value1_info = "Температура,°C"
|
||||
metadata/um = "um_12"
|
||||
metadata/um = "um_14"
|
||||
|
||||
[node name="control_result" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -299,3 +393,19 @@ offset_right = 649.0
|
||||
offset_bottom = 1003.0
|
||||
horizontal_alignment = 1
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="input_0" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(457, 586)
|
||||
sprite_frames = SubResource("SpriteFrames_s5gcy")
|
||||
|
||||
[node name="input_1" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(209, 586)
|
||||
sprite_frames = SubResource("SpriteFrames_s5gcy")
|
||||
|
||||
[node name="output_0" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(457, 482)
|
||||
sprite_frames = SubResource("SpriteFrames_s5gcy")
|
||||
|
||||
[node name="output_1" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(209, 482)
|
||||
sprite_frames = SubResource("SpriteFrames_s5gcy")
|
||||
|
||||
@@ -4,7 +4,7 @@ const STATUS_GOOD := {"text": "Исправно", "color": Color.GREEN, "font_co
|
||||
const STATUS_BAD := {"text": "Отказ", "color": Color.RED, "font_color": Color.WHITE}
|
||||
var _is_uf_status_initialized: bool = false
|
||||
var is_prd_operational: bool = true
|
||||
var is_uf_operational: bool = false
|
||||
var is_uf_operational: bool = true
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
@@ -1 +1 @@
|
||||
uid://b5ykwyk5vpi6
|
||||
uid://b5ykwyk5vpi6
|
||||
|
||||
@@ -79,25 +79,10 @@ visible = false
|
||||
layout_mode = 2
|
||||
metadata/_tab_index = 5
|
||||
|
||||
[node name="lbl_ready" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1503.0
|
||||
offset_right = 1600.0
|
||||
offset_bottom = 27.0
|
||||
tooltip_text = "Готовность аппаратуры к работе"
|
||||
mouse_filter = 0
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_o1r22")
|
||||
text = "Нет связи"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
script = ExtResource("8_tidwt")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="remote_control" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
offset_left = 1244.0
|
||||
offset_right = 1401.0
|
||||
offset_left = 1242.0
|
||||
offset_right = 1402.0
|
||||
offset_bottom = 27.0
|
||||
tooltip_text = "Комплекс находится под внешним управлением"
|
||||
mouse_filter = 0
|
||||
@@ -109,7 +94,7 @@ vertical_alignment = 1
|
||||
|
||||
[node name="тренаж_режим" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1404.0
|
||||
offset_left = 1405.0
|
||||
offset_right = 1501.0
|
||||
offset_bottom = 27.0
|
||||
tooltip_text = "Задействовать режим Тренаж"
|
||||
@@ -125,5 +110,20 @@ toggle_mode = true
|
||||
text = "Тренаж"
|
||||
script = ExtResource("9_41d34")
|
||||
|
||||
[node name="lbl_ready" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1504.0
|
||||
offset_right = 1600.0
|
||||
offset_bottom = 27.0
|
||||
tooltip_text = "Готовность аппаратуры к работе"
|
||||
mouse_filter = 0
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_o1r22")
|
||||
text = "Нет связи"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
script = ExtResource("8_tidwt")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[connection signal="tab_changed" from="tab_switch" to="tab_switch" method="_on_tab_changed"]
|
||||
[connection signal="toggled" from="тренаж_режим" to="tab_switch" method="_on_button_trenaj_toggled"]
|
||||
[connection signal="toggled" from="тренаж_режим" to="tab_switch" method="_on_button_trenazh_toggled"]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
extends Button
|
||||
|
||||
func _ready():
|
||||
connect("toggled", Callable(self, "_on_button_toggled"))
|
||||
|
||||
|
||||
func _on_button_toggled(mode: bool):
|
||||
if mode:
|
||||
tooltip_text = "Режим \"Тренаж\" задействован\nТекущее состояние: включено"
|
||||
else:
|
||||
tooltip_text = "Задейстовать режим \"Тренаж\"\nТекущее состояние: отключено"
|
||||
extends Button
|
||||
|
||||
func _ready():
|
||||
connect("toggled", Callable(self, "_on_button_toggled"))
|
||||
|
||||
|
||||
func _on_button_toggled(mode: bool):
|
||||
if mode:
|
||||
tooltip_text = "Режим \"Тренаж\" задействован\nТекущее состояние: включено"
|
||||
else:
|
||||
tooltip_text = "Задейстовать режим \"Тренаж\"\nТекущее состояние: отключено"
|
||||
|
||||
@@ -1 +1 @@
|
||||
uid://roajn6c6wvc1
|
||||
uid://roajn6c6wvc1
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -3,6 +3,5 @@
|
||||
[ext_resource type="Texture2D" uid="uid://cj1f2uy6qfvki" path="res://scenes/tilemap/23900.png" id="1_v0nwa"]
|
||||
|
||||
[node name="23900" type="Sprite2D"]
|
||||
rotation = 4.71239
|
||||
scale = Vector2(0.496934, 0.496934)
|
||||
texture = ExtResource("1_v0nwa")
|
||||
|
||||
@@ -373,7 +373,7 @@ func _process(delta) -> void:
|
||||
remove_child(req)
|
||||
req.queue_free()
|
||||
_req_count -= 1
|
||||
push_error('запрос \"%s\" не отправлен' % tile.url)
|
||||
push_error('запрос \"%s\" не отправлен' % tile.url) #TODO: For Deugs
|
||||
if _queue.is_empty():
|
||||
emit_signal('load_completed')
|
||||
|
||||
|
||||
79
scenes/контроль/control_prd.gd
Normal file
79
scenes/контроль/control_prd.gd
Normal file
@@ -0,0 +1,79 @@
|
||||
extends Button
|
||||
|
||||
var base_style: StyleBoxFlat
|
||||
var tween
|
||||
var pulsing: bool = false
|
||||
var original_text: String
|
||||
|
||||
|
||||
func _ready():
|
||||
original_text = text
|
||||
_setup_styles()
|
||||
_setup_signals()
|
||||
|
||||
|
||||
func _setup_styles() -> void:
|
||||
if get("theme_override_styles/disabled") == null:
|
||||
base_style = StyleBoxFlat.new()
|
||||
base_style.border_color = Color(1.0, 0.5, 0.0)
|
||||
base_style.border_width_top = 4
|
||||
base_style.border_width_bottom = 4
|
||||
base_style.border_width_left = 4
|
||||
base_style.border_width_right = 4
|
||||
base_style.bg_color = Color(0.2, 0.2, 0.2)
|
||||
set("theme_override_styles/disabled", base_style)
|
||||
else:
|
||||
base_style = get("theme_override_styles/disabled")
|
||||
set("theme_override_colors/font_disabled_color", Color(1.0, 1.0, 1.0))
|
||||
|
||||
|
||||
func _setup_signals() -> void:
|
||||
connect("pressed", Callable(self, "_on_pressed"))
|
||||
|
||||
if not signaller:
|
||||
return
|
||||
var signals_to_connect := ["режим_работа", "режим_журнал", "режим_эмс", "режим_настройки", "режим_контроль"]
|
||||
for signal_name in signals_to_connect:
|
||||
if signaller.has_signal(signal_name):
|
||||
signaller.connect(signal_name, Callable(self, "_on_status_change"))
|
||||
|
||||
|
||||
func _on_pressed():
|
||||
disabled = true
|
||||
text = "Идет выполнение контроля"
|
||||
_start_pulse()
|
||||
|
||||
|
||||
func _start_pulse():
|
||||
if pulsing:
|
||||
return
|
||||
pulsing = true
|
||||
tween = create_tween()
|
||||
tween.set_loops()
|
||||
var color1 = Color(1.0, 0.5, 0.0) # оранжевый
|
||||
var color2 = Color(0.4, 0.4, 0.4) # серый
|
||||
tween.tween_property(base_style, "border_color", color2, 0.5)\
|
||||
.set_trans(Tween.TRANS_SINE)\
|
||||
.set_ease(Tween.EASE_IN_OUT)
|
||||
tween.tween_property(base_style, "border_color", color1, 0.5)\
|
||||
.set_trans(Tween.TRANS_SINE)\
|
||||
.set_ease(Tween.EASE_IN_OUT)
|
||||
|
||||
|
||||
func _stop_pulse():
|
||||
if tween:
|
||||
tween.kill()
|
||||
tween = null
|
||||
base_style.border_color = Color(1.0, 0.5, 0.0)
|
||||
pulsing = false
|
||||
disabled = false
|
||||
text = original_text
|
||||
|
||||
|
||||
func _on_status_change():
|
||||
_stop_pulse()
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if tween:
|
||||
tween.kill()
|
||||
1
scenes/контроль/control_prd.gd.uid
Normal file
1
scenes/контроль/control_prd.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://xjs7owe2iexn
|
||||
@@ -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.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:
|
||||
@@ -191,8 +191,8 @@ func _enter_tree_defered():
|
||||
$margin/vbox/grid0/rname.text = rname
|
||||
$margin/vbox/grid0/fname.text = fname
|
||||
$margin/vbox/grid0/state.texture = textures[state]
|
||||
else:
|
||||
push_warning('обращение к %s вне дерева' % self)
|
||||
#else:
|
||||
#push_warning('обращение к %s вне дерева' % self) TODO: пишеться только когда заходишь в проект а дальше не используется
|
||||
|
||||
|
||||
func get_level_nodes() -> Array:
|
||||
@@ -273,10 +273,9 @@ theme_override_styles/panel = SubResource("StyleBoxEmpty_3nd2u")
|
||||
script = SubResource("GDScript_oj3k3")
|
||||
textures = [ExtResource("1_n1aqt"), ExtResource("2_rim3u"), ExtResource("3_3w8fg")]
|
||||
value0 = [20.0, 30.0, 40.0, 50.0, 60.0, 70.0]
|
||||
value1 = 56.0
|
||||
min_value1 = -50.0
|
||||
max_value0 = 100.0
|
||||
max_value1 = 120.0
|
||||
min_value1 = -40.0
|
||||
max_value0 = 1400.0
|
||||
max_value1 = 60.0
|
||||
step0 = 1.0
|
||||
step1 = 1.0
|
||||
value_name0 = "P,%"
|
||||
@@ -476,12 +475,11 @@ layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 56.00
|
||||
Диапазон: -50.00…120.00"
|
||||
Текущее: 0.00
|
||||
Диапазон: -40.00…70.00"
|
||||
mouse_filter = 0
|
||||
min_value = -50.0
|
||||
max_value = 120.0
|
||||
value = 56.0
|
||||
min_value = -40.0
|
||||
max_value = 60.0
|
||||
fill_mode = 3
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 8
|
||||
|
||||
410
scenes/контроль/блок-к.tscn
Normal file
410
scenes/контроль/блок-к.tscn
Normal file
@@ -0,0 +1,410 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://ffi1njkjceb5"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="1_uojqc"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="2_a8ar3"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="3_xwd13"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="4_eobkx"]
|
||||
[ext_resource type="Texture2D" uid="uid://00871pb6moln" path="res://data/прогресс-фон-1.png" id="5_mg57e"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1k856fxhrjnh" path="res://data/прогресс-заполнение-1.png" id="6_of7rd"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3nd2u"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_oj3k3"]
|
||||
script/source = "@tool
|
||||
class_name blok_v extends PanelContainer
|
||||
|
||||
@export var textures: Array
|
||||
@export var animation_duration: float = 1.5
|
||||
signal pressed(control: PanelContainer)
|
||||
|
||||
|
||||
## Значения уровней
|
||||
@export var value0: Array:
|
||||
set(v):
|
||||
value0.assign(v)
|
||||
var items: Array = get_level_nodes()
|
||||
var count: int = min(items.size(), v.size())
|
||||
for i in count:
|
||||
set_value0_animated(items[i], v[i])
|
||||
|
||||
|
||||
## Значение уровня
|
||||
@export var value1: float:
|
||||
set(v):
|
||||
value1 = v
|
||||
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
|
||||
|
||||
|
||||
@export var min_value0: float:
|
||||
set(v):
|
||||
min_value0 = v
|
||||
var items: = get_level_nodes()
|
||||
set_group_param(items, 'min_value', v)
|
||||
|
||||
|
||||
@export var min_value1: float:
|
||||
set(v):
|
||||
min_value1 = v
|
||||
if not is_inside_tree():
|
||||
return
|
||||
$margin/vbox/grid1/level7.min_value = v
|
||||
|
||||
|
||||
@export var max_value0: float:
|
||||
set(v):
|
||||
max_value0 = v
|
||||
var items: = get_level_nodes()
|
||||
set_group_param(items, 'max_value', v)
|
||||
|
||||
|
||||
@export var max_value1: float:
|
||||
set(v):
|
||||
max_value1 = v
|
||||
if not is_inside_tree():
|
||||
return
|
||||
$margin/vbox/grid1/level7.max_value = v
|
||||
|
||||
|
||||
@export var step0: float:
|
||||
set(v):
|
||||
step0 = v
|
||||
var items: = get_level_nodes()
|
||||
set_group_param(items, 'step', v)
|
||||
|
||||
|
||||
@export var step1: float:
|
||||
set(v):
|
||||
step1 = v
|
||||
if not is_inside_tree():
|
||||
return
|
||||
$margin/vbox/grid1/level7.step = v
|
||||
|
||||
|
||||
@export var value_name0: String:
|
||||
set(v):
|
||||
value_name0 = v
|
||||
var items: Array = get_name_nodes()
|
||||
set_group_param(items, 'text', v)
|
||||
|
||||
|
||||
@export var value_name1: String:
|
||||
set(v):
|
||||
value_name1 = v
|
||||
if not is_inside_tree():
|
||||
return
|
||||
$margin/vbox/grid2/lbl7.text = v
|
||||
|
||||
|
||||
@export var fname: String:
|
||||
set(v):
|
||||
fname = v
|
||||
if not is_inside_tree():
|
||||
return
|
||||
$margin/vbox/grid0/fname.text = v
|
||||
|
||||
|
||||
@export var rname: String:
|
||||
set(v):
|
||||
rname = v
|
||||
if not is_inside_tree():
|
||||
return
|
||||
$margin/vbox/grid0/rname.text = v
|
||||
|
||||
|
||||
@export var state: int:
|
||||
set(v):
|
||||
state = tools.clip_value(v, 0, textures.size() - 1)
|
||||
if not is_inside_tree():
|
||||
return
|
||||
$margin/vbox/grid0/state.texture = textures[state]
|
||||
|
||||
|
||||
@export var alignment: int:
|
||||
set(v):
|
||||
alignment = v
|
||||
if is_inside_tree():
|
||||
$margin/vbox.alignment = v
|
||||
|
||||
|
||||
@export var value0_info: String:
|
||||
set(v):
|
||||
value0_info = v
|
||||
|
||||
|
||||
@export var value1_info: String:
|
||||
set(v):
|
||||
value1_info = v
|
||||
|
||||
|
||||
func _on_button_pressed(): emit_signal('pressed', self)
|
||||
func set_value0(value: Array): value0.assign(value)
|
||||
func _enter_tree() -> void: call_deferred('_enter_tree_defered')
|
||||
|
||||
|
||||
func _ready():
|
||||
var items: Array = get_level_nodes()
|
||||
for item in items:
|
||||
item.connect('value_changed', on_level_changed.bind(item, value0_info))
|
||||
on_level_changed(item.value, item, value0_info)
|
||||
var level7: = $margin/vbox/grid1/level7
|
||||
level7.connect('value_changed', on_level_changed.bind(level7, value1_info))
|
||||
on_level_changed(level7.value, level7, value1_info)
|
||||
|
||||
|
||||
func on_level_changed(_val: float, item: TextureProgressBar, info: String):
|
||||
item.tooltip_text = '%s\\nТекущее: %0.2f\\nДиапазон: %0.2f…%0.2f' % [info, item.value, item.min_value, item.max_value]
|
||||
|
||||
|
||||
func set_group_param(items: Array, param: StringName, v) -> void:
|
||||
if not is_inside_tree():
|
||||
return
|
||||
if not get_tree():
|
||||
return
|
||||
for i in items.size():
|
||||
items[i].set(param, v)
|
||||
|
||||
|
||||
func set_value0_by_index(index: int, value: float) -> void:
|
||||
var items: Array = get_level_nodes()
|
||||
items[index].value = value
|
||||
|
||||
|
||||
func _enter_tree_defered():
|
||||
var items: Array = get_level_nodes()
|
||||
var count: int = min(items.size(), value0.size())
|
||||
for i in count:
|
||||
items[i].min_value = min_value0
|
||||
items[i].max_value = 1400 # max_value0: TODO для отладки
|
||||
items[i].step = step0
|
||||
items = get_name_nodes()
|
||||
set_group_param(items, 'text', value_name0)
|
||||
if is_inside_tree():
|
||||
$margin/vbox/grid1/level7.value = value1
|
||||
$margin/vbox/grid1/level7.min_value = min_value1
|
||||
$margin/vbox/grid1/level7.max_value = max_value1
|
||||
$margin/vbox/grid1/level7.step = step1
|
||||
$margin/vbox/grid2/lbl7.text = value_name1
|
||||
$margin/vbox.alignment = alignment
|
||||
$margin/vbox/grid0/rname.text = rname
|
||||
$margin/vbox/grid0/fname.text = fname
|
||||
$margin/vbox/grid0/state.texture = textures[state]
|
||||
|
||||
|
||||
func get_level_nodes() -> Array:
|
||||
if not is_inside_tree():
|
||||
return []
|
||||
if not get_tree():
|
||||
return []
|
||||
return [$margin/vbox/grid1/level1]
|
||||
|
||||
|
||||
func get_name_nodes() -> Array:
|
||||
if not is_inside_tree():
|
||||
return []
|
||||
if not get_tree():
|
||||
return []
|
||||
return [$margin/vbox/grid2/lbl1]
|
||||
|
||||
|
||||
func set_value0_animated(target_node, target_value: float) -> void:
|
||||
var tween: Tween = create_tween()
|
||||
tween.set_ease(Tween.EASE_OUT)
|
||||
tween.set_trans(Tween.TRANS_QUINT)
|
||||
tween.tween_property(target_node, 'value', target_value, animation_duration)
|
||||
"
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_rceim"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8yvwo"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6qu57"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_mlxje"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3dspb"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_45hqb"]
|
||||
script/source = "@tool
|
||||
|
||||
extends MarginContainer
|
||||
|
||||
|
||||
func _enter_tree() -> void:
|
||||
margins = [8, 8, 8, 8]
|
||||
|
||||
|
||||
@export var margins: Array:
|
||||
set(vals):
|
||||
add_theme_constant_override('margin_top', vals[0])
|
||||
add_theme_constant_override('margin_left', vals[1])
|
||||
add_theme_constant_override('margin_bottom', vals[2])
|
||||
add_theme_constant_override('margin_right', vals[3])
|
||||
get:
|
||||
var vals = [0, 0, 0, 0]
|
||||
vals[0] = get_theme_constant('margin_top')
|
||||
vals[1] = get_theme_constant('margin_left')
|
||||
vals[2] = get_theme_constant('margin_bottom')
|
||||
vals[3] = get_theme_constant('margin_right')
|
||||
return vals
|
||||
"
|
||||
|
||||
[node name="блок-к" type="PanelContainer"]
|
||||
editor_description = "Элемент замены из ЗИП"
|
||||
offset_right = 160.0
|
||||
offset_bottom = 88.0
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_3nd2u")
|
||||
script = SubResource("GDScript_oj3k3")
|
||||
textures = [ExtResource("1_uojqc"), ExtResource("2_a8ar3"), ExtResource("3_xwd13")]
|
||||
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
|
||||
step0 = 1.0
|
||||
step1 = 1.0
|
||||
value_name0 = "P,%"
|
||||
value_name1 = "°C"
|
||||
fname = "Блок В"
|
||||
rname = "A1"
|
||||
|
||||
[node name="button" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_rceim")
|
||||
theme_override_styles/disabled = SubResource("StyleBoxEmpty_8yvwo")
|
||||
theme_override_styles/hover = SubResource("StyleBoxEmpty_6qu57")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxEmpty_mlxje")
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_3dspb")
|
||||
|
||||
[node name="rect" type="NinePatchRect" parent="."]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("4_eobkx")
|
||||
draw_center = false
|
||||
region_rect = Rect2(0, 0, 63, 63)
|
||||
patch_margin_left = 17
|
||||
patch_margin_top = 17
|
||||
patch_margin_right = 17
|
||||
patch_margin_bottom = 15
|
||||
|
||||
[node name="margin" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 8
|
||||
theme_override_constants/margin_top = 8
|
||||
theme_override_constants/margin_right = 8
|
||||
theme_override_constants/margin_bottom = 8
|
||||
script = SubResource("GDScript_45hqb")
|
||||
margins = [8, 8, 8, 8]
|
||||
|
||||
[node name="vbox" type="VBoxContainer" parent="margin"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="grid0" type="GridContainer" parent="margin/vbox"]
|
||||
layout_mode = 2
|
||||
columns = 3
|
||||
|
||||
[node name="state" type="TextureRect" parent="margin/vbox/grid0"]
|
||||
custom_minimum_size = Vector2(24, 24)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 6
|
||||
texture = ExtResource("1_uojqc")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="fname" type="Label" parent="margin/vbox/grid0"]
|
||||
self_modulate = Color(1, 1, 1, 0.627451)
|
||||
custom_minimum_size = Vector2(0, 20)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_font_sizes/font_size = 17
|
||||
text = "Блок В"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="rname" type="Label" parent="margin/vbox/grid0"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 6
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "A1"
|
||||
horizontal_alignment = 2
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="grid1" type="GridContainer" parent="margin/vbox"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 3
|
||||
columns = 7
|
||||
|
||||
[node name="level1" type="TextureProgressBar" parent="margin/vbox/grid1" groups=["уровни"]]
|
||||
custom_minimum_size = Vector2(30, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00
|
||||
Диапазон: 0.00…1400.00"
|
||||
mouse_filter = 0
|
||||
max_value = 1400.0
|
||||
fill_mode = 3
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 8
|
||||
stretch_margin_top = 8
|
||||
stretch_margin_right = 8
|
||||
stretch_margin_bottom = 8
|
||||
texture_under = ExtResource("5_mg57e")
|
||||
texture_progress = ExtResource("6_of7rd")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="level7" type="TextureProgressBar" parent="margin/vbox/grid1"]
|
||||
custom_minimum_size = Vector2(30, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: -40.00
|
||||
Диапазон: -40.00…70.00"
|
||||
mouse_filter = 0
|
||||
min_value = -40.0
|
||||
max_value = 60.0
|
||||
value = -40.0
|
||||
fill_mode = 3
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 8
|
||||
stretch_margin_top = 8
|
||||
stretch_margin_right = 8
|
||||
stretch_margin_bottom = 8
|
||||
texture_under = ExtResource("5_mg57e")
|
||||
texture_progress = ExtResource("6_of7rd")
|
||||
tint_under = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
tint_over = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="grid2" type="GridContainer" parent="margin/vbox"]
|
||||
clip_contents = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
columns = 7
|
||||
|
||||
[node name="lbl1" type="Label" parent="margin/vbox/grid2" groups=["названия"]]
|
||||
clip_contents = true
|
||||
custom_minimum_size = Vector2(30, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = "P,%"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="lbl7" type="Label" parent="margin/vbox/grid2"]
|
||||
clip_contents = true
|
||||
custom_minimum_size = Vector2(30, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_font_sizes/font_size = 8
|
||||
text = "°C"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[connection signal="pressed" from="button" to="." method="_on_button_pressed"]
|
||||
@@ -14,7 +14,7 @@ patch_margin_right = 16
|
||||
patch_margin_bottom = 16
|
||||
script = ExtResource("2_mdnod")
|
||||
|
||||
[node name="ref_A26" parent="." groups=["default_reset", "power_supply"] instance=ExtResource("3_4a27g")]
|
||||
[node name="ref_A26" parent="." groups=["power_supply"] instance=ExtResource("3_4a27g")]
|
||||
offset_left = 10.0
|
||||
offset_top = 30.0
|
||||
offset_right = 60.0
|
||||
@@ -23,7 +23,7 @@ fname = "ИП9-50"
|
||||
rname = "A22"
|
||||
metadata/ip = "ip9_50_3"
|
||||
|
||||
[node name="ref_A23" parent="." groups=["default_reset", "power_supply"] instance=ExtResource("3_4a27g")]
|
||||
[node name="ref_A23" parent="." groups=["power_supply"] instance=ExtResource("3_4a27g")]
|
||||
offset_left = 60.0
|
||||
offset_top = 30.0
|
||||
offset_right = 110.0
|
||||
@@ -35,9 +35,10 @@ metadata/ip = "ip12_50_2"
|
||||
[node name="lbl_fname" type="Label" parent="."]
|
||||
self_modulate = Color(1, 1, 1, 0.62)
|
||||
layout_mode = 0
|
||||
offset_left = 5.0
|
||||
offset_left = 8.0
|
||||
offset_top = 5.0
|
||||
offset_right = 105.0
|
||||
offset_right = 112.0
|
||||
offset_bottom = 30.0
|
||||
text = "Касета П-2"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
@@ -31,7 +31,7 @@ offset_top = 32.0
|
||||
offset_right = 55.0
|
||||
offset_bottom = 182.0
|
||||
fname = "ИП5-25"
|
||||
rname = "A24"
|
||||
rname = "A31"
|
||||
metadata/ip = "ip5_25"
|
||||
|
||||
[node name="ref_A30" parent="." groups=["y-5"] instance=ExtResource("3_picsk")]
|
||||
@@ -40,7 +40,7 @@ offset_top = 32.0
|
||||
offset_right = 105.0
|
||||
offset_bottom = 182.0
|
||||
fname = "ЯУ-07Б"
|
||||
rname = "A30"
|
||||
rname = "A37"
|
||||
metadata/y5 = "yau07"
|
||||
|
||||
[node name="ref_A26" parent="." groups=["y-5"] instance=ExtResource("3_picsk")]
|
||||
@@ -49,7 +49,7 @@ offset_top = 32.0
|
||||
offset_right = 155.0
|
||||
offset_bottom = 182.0
|
||||
fname = "ЭМС-Г"
|
||||
rname = "A26"
|
||||
rname = "A33"
|
||||
metadata/y5 = "ems"
|
||||
|
||||
[node name="ref_A27" parent="." groups=["y-5"] instance=ExtResource("3_picsk")]
|
||||
@@ -58,7 +58,7 @@ offset_top = 32.0
|
||||
offset_right = 205.0
|
||||
offset_bottom = 182.0
|
||||
fname = "УГ"
|
||||
rname = "A27"
|
||||
rname = "A34"
|
||||
metadata/y5 = "ug"
|
||||
|
||||
[node name="ref_A28" parent="." groups=["y-5"] instance=ExtResource("3_picsk")]
|
||||
@@ -67,7 +67,7 @@ offset_top = 32.0
|
||||
offset_right = 255.0
|
||||
offset_bottom = 182.0
|
||||
fname = "УКП"
|
||||
rname = "A28"
|
||||
rname = "A36"
|
||||
metadata/y5 = "ukp1"
|
||||
|
||||
[node name="ref_A29" parent="." groups=["y-5"] instance=ExtResource("3_picsk")]
|
||||
@@ -76,5 +76,5 @@ offset_top = 32.0
|
||||
offset_right = 304.0
|
||||
offset_bottom = 182.0
|
||||
fname = "УКП"
|
||||
rname = "A29"
|
||||
rname = "A35"
|
||||
metadata/y5 = "ukp2"
|
||||
|
||||
@@ -1,16 +1,85 @@
|
||||
@tool
|
||||
|
||||
extends TextureButton
|
||||
|
||||
@onready var tween: Tween
|
||||
@export var state_colors: Array
|
||||
|
||||
func _on_toggled(toggled_on): $frame.visible = toggled_on
|
||||
func _enter_tree() -> void: $label.self_modulate = state_colors[state]
|
||||
|
||||
func _ready():
|
||||
toggle_mode = true
|
||||
focus_mode = Control.FOCUS_ALL
|
||||
connect("focus_entered", _on_focus_entered)
|
||||
connect("focus_exited", _on_focus_exited)
|
||||
|
||||
|
||||
#func _enter_tree() -> void:
|
||||
#if has_node("label"):
|
||||
#$label.self_modulate = state_colors[state]
|
||||
|
||||
|
||||
func update_progress_bar(target_value) -> void:
|
||||
if tween:
|
||||
tween.kill()
|
||||
tween = create_tween()
|
||||
tween.tween_property($control_progress, "value", target_value, 0.3)
|
||||
|
||||
|
||||
func _on_toggled(toggled_on):
|
||||
if has_node("frame"):
|
||||
$frame.visible = toggled_on
|
||||
|
||||
|
||||
func _on_focus_entered():
|
||||
button_pressed = true
|
||||
#enter_press() TODO: Пока что без выбора прибора
|
||||
|
||||
|
||||
func _on_focus_exited():
|
||||
pass
|
||||
|
||||
|
||||
func enter_press():
|
||||
var enter_event = InputEventAction.new()
|
||||
enter_event.action = "ui_accept"
|
||||
enter_event.pressed = true
|
||||
Input.parse_input_event(enter_event)
|
||||
|
||||
|
||||
@export var state: int:
|
||||
set(v):
|
||||
v = 0 if v < 0 else v % state_colors.size()
|
||||
state = v
|
||||
if is_inside_tree():
|
||||
if is_inside_tree() and has_node("label"):
|
||||
$label.self_modulate = state_colors[v]
|
||||
|
||||
|
||||
@export var progress_value: float = 0.0:
|
||||
set(v):
|
||||
progress_value = v
|
||||
|
||||
if is_inside_tree():
|
||||
update_progress_bar(v)
|
||||
var max_val = $control_progress.get('max_value')
|
||||
var percentage = (v / max_val) * 100.0
|
||||
$control_progress.tooltip_text = 'Процесс контроля %01d%%' % percentage
|
||||
|
||||
|
||||
@export var progress_visible: bool:
|
||||
set(v):
|
||||
progress_visible = v
|
||||
if is_inside_tree():
|
||||
$control_progress.visible = v
|
||||
|
||||
|
||||
@export var progress_max_value: int:
|
||||
set(v):
|
||||
progress_max_value = v
|
||||
if is_inside_tree():
|
||||
$control_progress.max_value = v
|
||||
|
||||
|
||||
@export var progress_min_value: int:
|
||||
set(v):
|
||||
progress_min_value = v
|
||||
if is_inside_tree():
|
||||
$control_progress.min_value = v
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=18 format=3 uid="uid://lwmw4egynmd1"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://lwmw4egynmd1"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bar8k5qef7kch" path="res://data/УФ.png" id="2_0nvm1"]
|
||||
[ext_resource type="Script" uid="uid://q3gmpsqspjfp" path="res://scenes/контроль/внешний.gd" id="2_8r80x"]
|
||||
@@ -14,7 +14,10 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="8_isjua"]
|
||||
[ext_resource type="Texture2D" uid="uid://b4isaggma6q3" path="res://data/Грани22.png" id="9_iqgf5"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="9_ll0vs"]
|
||||
[ext_resource type="Texture2D" uid="uid://00871pb6moln" path="res://data/прогресс-фон-1.png" id="9_w6m6a"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1k856fxhrjnh" path="res://data/прогресс-заполнение-1.png" id="10_lbx5w"]
|
||||
[ext_resource type="Script" uid="uid://bncy1x53jp73d" path="res://scenes/контроль/connect_pribor.gd" id="11_u7tym"]
|
||||
[ext_resource type="Script" uid="uid://xjs7owe2iexn" path="res://scenes/контроль/control_prd.gd" id="18_lbx5w"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_iqgf5"]
|
||||
script/source = "extends Panel
|
||||
@@ -84,6 +87,8 @@ func _ready():
|
||||
if prd.prd_dict.has(item):
|
||||
var prd_module = prd.prd_dict[item]
|
||||
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))
|
||||
if item == 'уарэп-эмс':
|
||||
signaller.connect('update_uf_serviceability', Callable(self, 'on_update_uf_serviceability').bind(pribor_node))
|
||||
# Пиктограммы приборов, которые отображают состояние подключения только
|
||||
@@ -143,8 +148,20 @@ func on_serviceability_changed(prd_module: Object, prd_pribor:Node)-> void:
|
||||
|
||||
|
||||
func on_update_uf_serviceability(uf_serviceaability: bool, uf_pribor: Node)-> void:
|
||||
|
||||
uf_pribor.state = 1 if uf_serviceaability else 2
|
||||
|
||||
|
||||
func _on_control_prd_pressed() -> void:
|
||||
signaller.emit_signal('start_contol_device')
|
||||
|
||||
|
||||
func on_update_progress(value_progress: float, pribor_node: Node) -> void:
|
||||
pribor_node.progress_value = value_progress
|
||||
pribor_node.progress_visible = value_progress > 0
|
||||
|
||||
|
||||
func on_update_max_value_progress(max_value_progress: int, pribor_node: Node) -> void:
|
||||
pribor_node.progress_max_value = max_value_progress
|
||||
"
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_foasq"]
|
||||
@@ -348,9 +365,9 @@ script = ExtResource("11_u7tym")
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1048.0
|
||||
offset_top = 193.0
|
||||
offset_top = 179.0
|
||||
offset_right = 1125.0
|
||||
offset_bottom = 309.0
|
||||
offset_bottom = 295.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -366,9 +383,9 @@ metadata/unit_name = ["уарэп-яу07-1н"]
|
||||
[node name="label" type="Label" parent="pribor_prd_n_1"]
|
||||
layout_mode = 0
|
||||
offset_left = 8.0
|
||||
offset_top = -38.0
|
||||
offset_top = -40.0
|
||||
offset_right = 60.0
|
||||
offset_bottom = -19.0
|
||||
offset_bottom = -21.0
|
||||
text = "ПРД Н1"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -396,13 +413,36 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_n_1"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -4.0
|
||||
offset_top = 124.0
|
||||
offset_right = 89.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_uf" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1183.0
|
||||
offset_top = 565.0
|
||||
offset_top = 558.0
|
||||
offset_right = 1294.0
|
||||
offset_bottom = 750.0
|
||||
offset_bottom = 743.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -419,9 +459,9 @@ metadata/online_proc = "on_line_changed"
|
||||
self_modulate = Color(0, 1, 0, 1)
|
||||
layout_mode = 0
|
||||
offset_left = 15.0
|
||||
offset_top = -34.0
|
||||
offset_top = -44.0
|
||||
offset_right = 91.0
|
||||
offset_bottom = -15.0
|
||||
offset_bottom = -25.0
|
||||
text = "УФ"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -453,9 +493,9 @@ script = ExtResource("11_u7tym")
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1058.0
|
||||
offset_top = 595.0
|
||||
offset_top = 588.0
|
||||
offset_right = 1164.0
|
||||
offset_bottom = 751.0
|
||||
offset_bottom = 744.0
|
||||
pivot_offset = Vector2(-10, -65)
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
@@ -470,10 +510,10 @@ metadata/online_proc = "online_change_arr"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_rtr"]
|
||||
layout_mode = 0
|
||||
offset_left = 12.0
|
||||
offset_top = -54.0
|
||||
offset_right = 95.0
|
||||
offset_bottom = -35.0
|
||||
offset_left = 11.0
|
||||
offset_top = -49.0
|
||||
offset_right = 94.0
|
||||
offset_bottom = -30.0
|
||||
text = "РТР"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -495,17 +535,17 @@ patch_margin_bottom = 16
|
||||
|
||||
[node name="label2" type="Label" parent="pribor_rtr"]
|
||||
layout_mode = 0
|
||||
offset_left = 12.0
|
||||
offset_top = -54.0
|
||||
offset_right = 95.0
|
||||
offset_bottom = -35.0
|
||||
offset_left = 11.0
|
||||
offset_top = -49.0
|
||||
offset_right = 94.0
|
||||
offset_bottom = -30.0
|
||||
text = "РТР"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_rtr"]
|
||||
light_mask = 3
|
||||
position = Vector2(55, -15)
|
||||
position = Vector2(53, -15)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
@@ -515,9 +555,9 @@ script = ExtResource("11_u7tym")
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1053.0
|
||||
offset_top = 432.0
|
||||
offset_top = 425.0
|
||||
offset_right = 1886.0
|
||||
offset_bottom = 1072.0
|
||||
offset_bottom = 1065.0
|
||||
scale = Vector2(0.2, 0.2)
|
||||
pivot_offset = Vector2(-10, -65)
|
||||
size_flags_horizontal = 15
|
||||
@@ -533,9 +573,9 @@ metadata/online_proc = "on_line_changed"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_afsp_1"]
|
||||
layout_mode = 0
|
||||
offset_left = 165.0
|
||||
offset_left = 175.0
|
||||
offset_top = -245.0
|
||||
offset_right = 262.0
|
||||
offset_right = 272.0
|
||||
offset_bottom = -225.0
|
||||
scale = Vector2(5, 5)
|
||||
text = "АФСП 1"
|
||||
@@ -560,9 +600,9 @@ patch_margin_bottom = 16
|
||||
|
||||
[node name="label2" type="Label" parent="pribor_afsp_1"]
|
||||
layout_mode = 0
|
||||
offset_left = 165.0
|
||||
offset_left = 175.0
|
||||
offset_top = -245.0
|
||||
offset_right = 262.0
|
||||
offset_right = 272.0
|
||||
offset_bottom = -225.0
|
||||
scale = Vector2(5, 5)
|
||||
text = "АФСП 1"
|
||||
@@ -581,9 +621,9 @@ script = ExtResource("11_u7tym")
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1243.0
|
||||
offset_top = 432.0
|
||||
offset_top = 425.0
|
||||
offset_right = 2076.0
|
||||
offset_bottom = 1072.0
|
||||
offset_bottom = 1065.0
|
||||
scale = Vector2(0.2, 0.2)
|
||||
pivot_offset = Vector2(-10, -65)
|
||||
size_flags_horizontal = 15
|
||||
@@ -600,9 +640,9 @@ metadata/online_proc = "on_line_changed"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_afsp_2"]
|
||||
layout_mode = 0
|
||||
offset_left = 200.0
|
||||
offset_left = 175.0
|
||||
offset_top = -240.0
|
||||
offset_right = 297.0
|
||||
offset_right = 272.0
|
||||
offset_bottom = -220.0
|
||||
scale = Vector2(5, 5)
|
||||
text = "АФСП 2"
|
||||
@@ -627,9 +667,9 @@ patch_margin_bottom = 16
|
||||
|
||||
[node name="label2" type="Label" parent="pribor_afsp_2"]
|
||||
layout_mode = 0
|
||||
offset_left = 200.0
|
||||
offset_left = 175.0
|
||||
offset_top = -240.0
|
||||
offset_right = 297.0
|
||||
offset_right = 272.0
|
||||
offset_bottom = -220.0
|
||||
scale = Vector2(5, 5)
|
||||
text = "АФСП 2"
|
||||
@@ -638,7 +678,7 @@ vertical_alignment = 1
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_afsp_2"]
|
||||
light_mask = 3
|
||||
position = Vector2(425, -40)
|
||||
position = Vector2(415, -40)
|
||||
scale = Vector2(3, 3)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
@@ -648,9 +688,9 @@ script = ExtResource("11_u7tym")
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1313.0
|
||||
offset_top = 565.0
|
||||
offset_top = 558.0
|
||||
offset_right = 1407.0
|
||||
offset_bottom = 751.0
|
||||
offset_bottom = 744.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -665,9 +705,9 @@ metadata/online_proc = "online_change_arr"
|
||||
[node name="label" type="Label" parent="pribor_uyep"]
|
||||
layout_mode = 0
|
||||
offset_left = 26.8566
|
||||
offset_top = -38.3276
|
||||
offset_top = -43.3276
|
||||
offset_right = 66.8566
|
||||
offset_bottom = -19.3276
|
||||
offset_bottom = -24.3276
|
||||
text = "У-ЭП"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -699,9 +739,9 @@ script = ExtResource("11_u7tym")
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1440.0
|
||||
offset_top = 680.0
|
||||
offset_top = 687.0
|
||||
offset_right = 1517.0
|
||||
offset_bottom = 796.0
|
||||
offset_bottom = 803.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -716,10 +756,10 @@ metadata/online_proc = "on_line_changed"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_prd_v_2"]
|
||||
layout_mode = 0
|
||||
offset_left = 14.0
|
||||
offset_top = -38.0
|
||||
offset_right = 66.0
|
||||
offset_bottom = -19.0
|
||||
offset_left = 11.0
|
||||
offset_top = -42.0
|
||||
offset_right = 63.0
|
||||
offset_bottom = -23.0
|
||||
text = "ПРД В2"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -741,19 +781,42 @@ patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_prd_v_2"]
|
||||
light_mask = 3
|
||||
position = Vector2(40, -10)
|
||||
position = Vector2(37, -10)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_v_2"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -4.0
|
||||
offset_top = 124.0
|
||||
offset_right = 89.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_n_2" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1440.0
|
||||
offset_top = 345.0
|
||||
offset_top = 322.0
|
||||
offset_right = 1517.0
|
||||
offset_bottom = 461.0
|
||||
offset_bottom = 438.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -768,10 +831,10 @@ metadata/online_proc = "on_line_changed"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_prd_n_2"]
|
||||
layout_mode = 0
|
||||
offset_left = 15.0
|
||||
offset_top = -38.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = -19.0
|
||||
offset_left = 11.0
|
||||
offset_top = -42.0
|
||||
offset_right = 63.0
|
||||
offset_bottom = -23.0
|
||||
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/outline_size = 0
|
||||
text = "ПРД Н2"
|
||||
@@ -795,19 +858,42 @@ patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_prd_n_2"]
|
||||
light_mask = 3
|
||||
position = Vector2(40, -10)
|
||||
position = Vector2(37, -10)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_n_2"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -4.0
|
||||
offset_top = 124.0
|
||||
offset_right = 89.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_k_2" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1440.0
|
||||
offset_top = 515.0
|
||||
offset_top = 504.0
|
||||
offset_right = 1517.0
|
||||
offset_bottom = 631.0
|
||||
offset_bottom = 620.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -822,10 +908,10 @@ metadata/online_proc = "on_line_changed"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_prd_k_2"]
|
||||
layout_mode = 0
|
||||
offset_left = 17.0
|
||||
offset_top = -38.0
|
||||
offset_right = 69.0
|
||||
offset_bottom = -19.0
|
||||
offset_left = 11.0
|
||||
offset_top = -42.0
|
||||
offset_right = 63.0
|
||||
offset_bottom = -23.0
|
||||
text = "ПРД К2"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -847,19 +933,42 @@ patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_prd_k_2"]
|
||||
light_mask = 3
|
||||
position = Vector2(43, -10)
|
||||
position = Vector2(37, -10)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_k_2"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -4.0
|
||||
offset_top = 124.0
|
||||
offset_right = 89.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_v_3" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1048.0
|
||||
offset_top = 802.0
|
||||
offset_top = 803.0
|
||||
offset_right = 1125.0
|
||||
offset_bottom = 918.0
|
||||
offset_bottom = 919.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -875,9 +984,9 @@ metadata/online_proc = "on_line_changed"
|
||||
[node name="label" type="Label" parent="pribor_prd_v_3"]
|
||||
layout_mode = 0
|
||||
offset_left = 9.0
|
||||
offset_top = -38.0
|
||||
offset_top = -41.0
|
||||
offset_right = 61.0
|
||||
offset_bottom = -19.0
|
||||
offset_bottom = -22.0
|
||||
text = "ПРД В3"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -899,19 +1008,42 @@ patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_prd_v_3"]
|
||||
light_mask = 3
|
||||
position = Vector2(34, -10)
|
||||
position = Vector2(35, -10)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_v_3"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -8.0
|
||||
offset_top = 124.0
|
||||
offset_right = 85.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_n_3" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1323.0
|
||||
offset_top = 802.0
|
||||
offset_top = 803.0
|
||||
offset_right = 1400.0
|
||||
offset_bottom = 918.0
|
||||
offset_bottom = 919.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -927,9 +1059,9 @@ metadata/online_proc = "on_line_changed"
|
||||
[node name="label" type="Label" parent="pribor_prd_n_3"]
|
||||
layout_mode = 0
|
||||
offset_left = 8.0
|
||||
offset_top = -38.0
|
||||
offset_top = -43.0
|
||||
offset_right = 60.0
|
||||
offset_bottom = -19.0
|
||||
offset_bottom = -24.0
|
||||
text = "ПРД Н3"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -957,13 +1089,36 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_n_3"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -7.0
|
||||
offset_top = 124.0
|
||||
offset_right = 86.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_k_3" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1188.0
|
||||
offset_top = 802.0
|
||||
offset_top = 803.0
|
||||
offset_right = 1265.0
|
||||
offset_bottom = 918.0
|
||||
offset_bottom = 919.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -979,9 +1134,9 @@ metadata/online_proc = "on_line_changed"
|
||||
[node name="label" type="Label" parent="pribor_prd_k_3"]
|
||||
layout_mode = 0
|
||||
offset_left = 9.0
|
||||
offset_top = -38.0
|
||||
offset_top = -42.0
|
||||
offset_right = 61.0
|
||||
offset_bottom = -19.0
|
||||
offset_bottom = -23.0
|
||||
text = "ПРД К3"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1009,13 +1164,36 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_k_3"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -8.0
|
||||
offset_top = 124.0
|
||||
offset_right = 85.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_v_1" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1328.0
|
||||
offset_top = 198.0
|
||||
offset_top = 179.0
|
||||
offset_right = 1405.0
|
||||
offset_bottom = 314.0
|
||||
offset_bottom = 295.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -1031,9 +1209,9 @@ metadata/online_proc = "on_line_changed"
|
||||
[node name="label" type="Label" parent="pribor_prd_v_1"]
|
||||
layout_mode = 0
|
||||
offset_left = 8.0
|
||||
offset_top = -38.0
|
||||
offset_top = -44.0
|
||||
offset_right = 60.0
|
||||
offset_bottom = -19.0
|
||||
offset_bottom = -25.0
|
||||
text = "ПРД В1"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1061,13 +1239,36 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_v_1"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -4.0
|
||||
offset_top = 124.0
|
||||
offset_right = 89.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_k_1" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 1183.0
|
||||
offset_top = 193.0
|
||||
offset_top = 179.0
|
||||
offset_right = 1260.0
|
||||
offset_bottom = 309.0
|
||||
offset_bottom = 295.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -1083,9 +1284,9 @@ metadata/online_proc = "on_line_changed"
|
||||
[node name="label" type="Label" parent="pribor_prd_k_1"]
|
||||
layout_mode = 0
|
||||
offset_left = 9.0
|
||||
offset_top = -38.0
|
||||
offset_top = -44.0
|
||||
offset_right = 61.0
|
||||
offset_bottom = -19.0
|
||||
offset_bottom = -25.0
|
||||
text = "ПРД К1"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1113,13 +1314,36 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_k_1"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -4.0
|
||||
offset_top = 124.0
|
||||
offset_right = 89.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_v_4" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 946.0
|
||||
offset_top = 345.0
|
||||
offset_right = 1023.0
|
||||
offset_bottom = 461.0
|
||||
offset_left = 940.0
|
||||
offset_top = 322.0
|
||||
offset_right = 1017.0
|
||||
offset_bottom = 438.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -1133,10 +1357,10 @@ metadata/online_proc = "on_line_changed"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_prd_v_4"]
|
||||
layout_mode = 0
|
||||
offset_left = 17.0
|
||||
offset_top = -38.0
|
||||
offset_right = 69.0
|
||||
offset_bottom = -19.0
|
||||
offset_left = 15.0
|
||||
offset_top = -41.0
|
||||
offset_right = 67.0
|
||||
offset_bottom = -22.0
|
||||
text = "ПРД В4"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1164,13 +1388,36 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_v_4"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -6.0
|
||||
offset_top = 124.0
|
||||
offset_right = 87.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_n_4" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 941.0
|
||||
offset_top = 685.0
|
||||
offset_top = 687.0
|
||||
offset_right = 1018.0
|
||||
offset_bottom = 801.0
|
||||
offset_bottom = 803.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -1185,9 +1432,9 @@ metadata/online_proc = "on_line_changed"
|
||||
[node name="label" type="Label" parent="pribor_prd_n_4"]
|
||||
layout_mode = 0
|
||||
offset_left = 14.0
|
||||
offset_top = -38.0
|
||||
offset_top = -41.0
|
||||
offset_right = 66.0
|
||||
offset_bottom = -19.0
|
||||
offset_bottom = -22.0
|
||||
text = "ПРД Н4"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1215,13 +1462,36 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_n_4"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -8.0
|
||||
offset_top = 124.0
|
||||
offset_right = 85.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pribor_prd_k_4" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
offset_left = 946.0
|
||||
offset_top = 515.0
|
||||
offset_right = 1023.0
|
||||
offset_bottom = 631.0
|
||||
offset_left = 941.0
|
||||
offset_top = 504.0
|
||||
offset_right = 1018.0
|
||||
offset_bottom = 620.0
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
toggle_mode = true
|
||||
@@ -1235,10 +1505,10 @@ metadata/online_proc = "on_line_changed"
|
||||
|
||||
[node name="label" type="Label" parent="pribor_prd_k_4"]
|
||||
layout_mode = 0
|
||||
offset_left = 17.0
|
||||
offset_top = -38.0
|
||||
offset_right = 69.0
|
||||
offset_bottom = -19.0
|
||||
offset_left = 14.0
|
||||
offset_top = -40.0
|
||||
offset_right = 66.0
|
||||
offset_bottom = -21.0
|
||||
text = "ПРД К4"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
@@ -1260,12 +1530,35 @@ patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_prd_k_4"]
|
||||
light_mask = 3
|
||||
position = Vector2(42, -10)
|
||||
position = Vector2(39, -10)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_k_4"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -8.0
|
||||
offset_top = 124.0
|
||||
offset_right = 85.0
|
||||
offset_bottom = 134.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00"
|
||||
mouse_filter = 0
|
||||
max_value = 30.0
|
||||
nine_patch_stretch = true
|
||||
stretch_margin_left = 5
|
||||
stretch_margin_top = 5
|
||||
stretch_margin_right = 5
|
||||
stretch_margin_bottom = 5
|
||||
texture_under = ExtResource("9_w6m6a")
|
||||
texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="txr_legend0" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 219.0
|
||||
@@ -1387,6 +1680,17 @@ points = PackedVector2Array(-8, 0, 608, 0)
|
||||
width = 2.0
|
||||
default_color = Color(1, 1, 1, 0.352941)
|
||||
|
||||
[node name="control_prd" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1101.0
|
||||
offset_top = 64.0
|
||||
offset_right = 1326.0
|
||||
offset_bottom = 104.0
|
||||
focus_mode = 0
|
||||
text = "Запуск контроля"
|
||||
script = ExtResource("18_lbx5w")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[connection signal="toggled" from="pribor_prd_n_1" to="pribor_prd_n_1" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_uf" to="pribor_uf" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_rtr" to="pribor_rtr" method="_on_toggled"]
|
||||
@@ -1404,3 +1708,4 @@ default_color = Color(1, 1, 1, 0.352941)
|
||||
[connection signal="toggled" from="pribor_prd_v_4" to="pribor_prd_v_4" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_prd_n_4" to="pribor_prd_n_4" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_prd_k_4" to="pribor_prd_k_4" method="_on_toggled"]
|
||||
[connection signal="pressed" from="control_prd" to="." method="_on_control_prd_pressed"]
|
||||
|
||||
@@ -564,7 +564,7 @@ func set_btns_disabled(value: bool, btn):
|
||||
btn.set_disabled(value)
|
||||
|
||||
|
||||
func on_interfer_prinuditelno (prenuditelno_sectors, btns):
|
||||
func on_interfer_prinuditelno(prenuditelno_sectors, btns):
|
||||
for key in prenuditelno_sectors:
|
||||
var sectors = []
|
||||
for sector in prenuditelno_sectors[key]:
|
||||
@@ -625,7 +625,7 @@ func _on_btn_all_work_pressed() -> void:
|
||||
|
||||
func on_th_aoa_update(ths):
|
||||
count_threats(ths)
|
||||
|
||||
|
||||
|
||||
func count_threats(ths):
|
||||
$count_all_pad/count_all.text = '%02d' % ths.size()
|
||||
|
||||
@@ -383,8 +383,8 @@ texture_normal = ExtResource("14_ggrwd")
|
||||
[connection signal="toggled" from="btn_activate" to="." method="on_btn_activate"]
|
||||
[connection signal="toggled" from="btn_center" to="." method="on_btn_center_toggled"]
|
||||
[connection signal="button_down" from="zoom_plus" to="tilemap" method="_on_zoom_plus_button_down"]
|
||||
[connection signal="button_up" from="zoom_plus" to="tilemap" method="_on_zoom_button_up"]
|
||||
[connection signal="button_up" from="zoom_plus" to="tilemap" method="_on_zoom_plus_button_up"]
|
||||
[connection signal="button_up" from="zoom_plus" to="tilemap" method="_on_zoom_button_up"]
|
||||
[connection signal="button_down" from="zoom_minus" to="tilemap" method="_on_zoom_minus_button_down"]
|
||||
[connection signal="button_up" from="zoom_minus" to="tilemap" method="_on_zoom_button_up"]
|
||||
[connection signal="pressed" from="btn_all_work" to="." method="_on_btn_all_work_pressed"]
|
||||
|
||||
@@ -29,7 +29,7 @@ func on_trassa_line_changed(unit_trassa):
|
||||
$"СкруглённыйПрямоугольникБелый/Label10".text = '-'
|
||||
|
||||
|
||||
func on_sector_klaster(data, unit_trassa):
|
||||
func on_sector_klaster(_data, unit_trassa):
|
||||
$"СкруглённыйПрямоугольникБелый/Label6".text = str(unit_trassa.dap)
|
||||
$"СкруглённыйПрямоугольникБелый/Label7".text = str(unit_trassa.daa)
|
||||
$"СкруглённыйПрямоугольникБелый/Label8".text = '1'
|
||||
|
||||
1
scripts/.gd.uid
Normal file
1
scripts/.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://durllxmhtejp1
|
||||
@@ -267,7 +267,7 @@ func on_th_aoa_update(threats: Dictionary, ecms: Dictionary, unit_instance) -> v
|
||||
thr.nmfs = nmfs
|
||||
if (thr.proto in gos_protocols) and thr.fflags.proto and (not gos_flag):
|
||||
gos_nmfs.append(nmfs)
|
||||
|
||||
|
||||
thr.emit_state = 0
|
||||
for ecm in ecms.values():
|
||||
if thr.nmfs == ecm.nmfs:
|
||||
@@ -279,7 +279,7 @@ func on_th_aoa_update(threats: Dictionary, ecms: Dictionary, unit_instance) -> v
|
||||
ecm_active = false
|
||||
if ecm_active and (prd.fs_caps_id[ecm.nmfs] in fs_closed):
|
||||
interfer_off(ecm, unit_instance)
|
||||
|
||||
|
||||
var th_id = thr.id
|
||||
for ecm_i in thrs.keys():
|
||||
if thrs[ecm_i] == th_id:
|
||||
@@ -695,4 +695,3 @@ func set_th_emit(th: threats.Threat, ecm: Interfer):
|
||||
return
|
||||
else:
|
||||
th.emit_state = 1
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ class Fs:
|
||||
class PRD:
|
||||
var prd_name: String ## Имя прибора
|
||||
var unit_yau07 ## Юнит эмс
|
||||
var unit_control: Object ## Класс проверки прибора ПРД
|
||||
var fs_dic: Dictionary ## Массив блоков ФС
|
||||
var yemsg_board: yemsboards.EmsBoard ## Плата ЭМС-Г
|
||||
var state = PrdState.WORK
|
||||
@@ -167,6 +168,7 @@ class PRD:
|
||||
unit_yau07 = u_yau07
|
||||
init_ems_g()
|
||||
|
||||
|
||||
func init_ems_g():
|
||||
var in_tbl: Array = []
|
||||
var out_tbl: Array = []
|
||||
@@ -283,6 +285,9 @@ func _ready() -> void:
|
||||
var unit_prd = network.get_unit_instance(prd_name)
|
||||
var new_prd = PRD.new(prd_name, unit_prd)
|
||||
prd_dict[prd_name] = new_prd
|
||||
var unit_control = TestPRD.new({'unit_prd': unit_prd}, new_prd.cmd_array)
|
||||
add_child(unit_control)
|
||||
new_prd.unit_control = unit_control
|
||||
for key in FS_PRD.keys():
|
||||
var fs = Fs.new(key, FS_PRD[key][0])
|
||||
fs_dict[key] = fs
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -216,6 +216,10 @@ signal sector_klaster (new_sector_data)
|
||||
signal clear_klaster ()
|
||||
|
||||
|
||||
## Вызывается при нажатии на кнопку "Запуск контроля".[br]
|
||||
signal start_contol_device()
|
||||
|
||||
|
||||
## Вызывается при программном отключении помехи.[br]
|
||||
## [param ecm] - выключаемая помеха ([b]true[/b]
|
||||
signal on_prog_ecm_off(ecm: interfer.Interfer)
|
||||
|
||||
@@ -325,8 +325,9 @@ func _set_row_selected(i_row: int, selected: bool = true) -> void:
|
||||
var node = nodes[node_key]
|
||||
var selector = nodes[selector_key]
|
||||
nodes.erase(selector_key)
|
||||
if is_instance_valid(selector):
|
||||
node.remove_child(selector)
|
||||
if is_instance_valid(node) and is_instance_valid(selector):
|
||||
if selector.get_parent() == node:
|
||||
node.remove_child(selector)
|
||||
selector.queue_free()
|
||||
else:
|
||||
push_warning('обращение к удалённому элементу \"%s\"' % selector_key)
|
||||
@@ -448,6 +449,7 @@ func remove_row(i_row: int):
|
||||
|
||||
if nodes.has(sel_key):
|
||||
var selector = nodes[sel_key]
|
||||
if selector == null: return
|
||||
var prnt = selector.get_parent()
|
||||
prnt.remove_child(selector)
|
||||
selector.queue_free()
|
||||
@@ -484,8 +486,11 @@ func next_index(indexes: Array) -> void:
|
||||
func swap_nodes(nodes_copy, node_key_format, i0, i1) -> void:
|
||||
var key0 = node_key_format % [i0.y, i0.x]
|
||||
var key1 = node_key_format % [i1.y, i1.x]
|
||||
nodes_copy[key1] = nodes[key0]
|
||||
nodes_copy[key1].name = key1
|
||||
if is_instance_valid(nodes[key0]):
|
||||
nodes_copy[key1] = nodes[key0]
|
||||
nodes_copy[key1].name = key1
|
||||
else:
|
||||
print_debug("Ошибка: нод ", key0, " был освобожден")
|
||||
|
||||
|
||||
## Переназначает ключи в соответствии с размерами таблицы.
|
||||
|
||||
Reference in New Issue
Block a user