отладка дкм 1

This commit is contained in:
2025-03-07 09:05:07 +03:00
parent a7a4ffaa9e
commit 05143f6f45
7 changed files with 182 additions and 85 deletions

View File

@@ -7,6 +7,20 @@ var button_link_meta: Dictionary = {}
var status_fs_1
var status_fs_2
var status_fs_3
var CI_1_UF: Node
var CI_2_UF: Node
var CI_3_UF: Node
var CZI_2_FS: Node
var CZI_3_FS: Node
var CZI_4_FS: Node
var CZI_5_FS: Node
var CI_2_FS: Node
var CI_3_FS: Node
var CI_4_FS: Node
var CI_5_FS: Node
var CI_1_FS: Node
var CI_6_FS: Node
var CI_7_FS: Node
func _on_read_ems_g():
@@ -86,6 +100,7 @@ func _ready() -> void:
var parrent_NODE2 = get_parent().get_parent()
parrent_NODE2.connect('read_ems_g_start', Callable(self, '_on_read_ems_g'))
parrent_NODE2.connect('read_ems_g_finish', Callable(self, '_on_sync'))
Network.connect('yau_receive', Callable(self, '_on_data_received'))
create_link_button(node_select1, shift+1, 16+shift+1, shift, 16+shift)
@@ -100,13 +115,11 @@ func _on_data_received(data_from_yau_07):
var in_imp: int = data_from_yau_07.decode_u16(Constants.DataIndices.IN_IMPULS_PRD)
var out_blank: int = data_from_yau_07.decode_u16(Constants.DataIndices.OUT_BLANK_PRD)
var out_imp: int = data_from_yau_07.decode_u16(Constants.DataIndices.OUT_IMPULS_PRD)
var parent_node2 = get_parent().get_parent()
process_sockets_vert(in_blank, in_imp, 16, 1, parent_node2)
process_sockets_horizon(out_blank, out_imp, 16, 2, parent_node2)
process_sockets_vert(in_blank, in_imp, 16, 1)
process_sockets_horizon(out_blank, out_imp, 16, 2)
func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_node2: Node):
func process_sockets_horizon(blank: int, imp: int, count: int, col: int):
for i in count:
var socket_status = node_select1.get_node2(col+i, shift).get_child(1, false)
var frame_type = Constants.Frame.WORK
@@ -117,22 +130,21 @@ func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_
frame_type = Constants.Frame.VARIABLE
set_frame(socket_status, frame_type)
if i == 1: # СИ_2_в_УФ
var CI_2_UF = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(2).get_node2(1, 6).get_child(1)
if i == 0: # СИ_2_в_УФ
set_frame(CI_1_UF, frame_type)
elif i == 1: # СИ_2_в_УФ
set_frame(CI_2_UF, frame_type)
if i == 2: # СИ_3_в_УФ
var CI_3_UF = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(2).get_node2(1, 6).get_child(1)
if i == 2: # СИ_3_в_УФ
set_frame(CI_3_UF, frame_type)
if i == 4: # Модуляция_УМ_2
if i == 4: # Модуляция_УМ_2
pass
if i == 5: # Модуляция_УМ_3
if i == 5: # Модуляция_УМ_3
pass
if i == 9: # ФГОЗ_3
if i == 9: # ФГОЗ_3
pass
func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_node2: Node):
func process_sockets_vert(blank: int, imp: int, count: int, col: int):
for i in count:
var socket_status = node_select1.get_node2(col, i + shift+1).get_child(1, false)
var frame_type = Constants.Frame.WORK
@@ -146,62 +158,49 @@ func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_nod
if Constants.CURRENT_MODE == Constants.MODE.PRD_H:
if i == 1: # СЗИ_2_от_УФ
# $TabContainer /PRD /body_grid/litera_2_4_6/yau07b_control
var CZI_2_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(2).get_node2(1, 7).get_child(1)
set_frame(CZI_2_FS, frame_type)
if i == 2: # СЗИ_3_от_УФ
var CZI_3_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(2).get_node2(1, 7).get_child(1)
set_frame(CZI_3_FS, frame_type)
elif Constants.CURRENT_MODE == Constants.MODE.PRD_B:
if i == 3: # СЗИ_4_от_УФ
# $TabContainer /PRD /body_grid/litera_2_4_6/yau07b_control
var CZI_2_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(2).get_node2(1, 7).get_child(1)
set_frame(CZI_2_FS, frame_type)
set_frame(CZI_4_FS, frame_type)
if i == 4: # СЗИ_5_от_УФ
var CZI_3_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(2).get_node2(1, 7).get_child(1)
set_frame(CZI_3_FS, frame_type)
set_frame(CZI_5_FS, frame_type)
if Constants.CURRENT_MODE == Constants.MODE.PRD_H:
if i == 9: # СИ_2_от_ФС
var CI_2_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(0).get_node2(1, 6).get_child(1)
set_frame(CI_2_FS, frame_type)
if frame_type == Constants.Frame.CONSTANT and status_fs_1 != Constants.Frame.CONSTANT:
emit_signal('signal_FS_is_ready', Constants.META.CI_2_OT_FS)
status_fs_1 = frame_type
if i == 10: # СИ_3_от_ФС
var CI_3_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(0).get_node2(1, 6).get_child(1)
set_frame(CI_3_FS, frame_type)
if frame_type == Constants.Frame.CONSTANT and status_fs_2 != Constants.Frame.CONSTANT:
emit_signal('signal_FS_is_ready', Constants.META.CI_3_OT_FS)
status_fs_2 = frame_type
elif Constants.CURRENT_MODE == Constants.MODE.PRD_B:
if i == 11: # СИ_4_от_ФС
var CI_4_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(0).get_node2(1, 6).get_child(1)
set_frame(CI_4_FS, frame_type)
if frame_type == Constants.Frame.CONSTANT and status_fs_1 != Constants.Frame.CONSTANT:
emit_signal('signal_FS_is_ready', Constants.META.CI_4_OT_FS)
status_fs_1 = frame_type
if i == 12: # СИ_5_от_ФС
var CI_5_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(0).get_node2(1, 6).get_child(1)
set_frame(CI_5_FS, frame_type)
if frame_type == Constants.Frame.CONSTANT and status_fs_2 != Constants.Frame.CONSTANT:
emit_signal('signal_FS_is_ready', Constants.META.CI_5_OT_FS)
status_fs_2 = frame_type
elif Constants.CURRENT_MODE == Constants.MODE.PRD_K:
if i == 8: # СИ_1_от_ФС
var CI_1_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(2).get_child(0).get_node2(1, 6).get_child(1)
set_frame(CI_1_FS, frame_type)
if frame_type == Constants.Frame.CONSTANT and status_fs_1 != Constants.Frame.CONSTANT:
emit_signal('signal_FS_is_ready', Constants.META.CI_1_OT_FS)
status_fs_1 = frame_type
if i == 13: # СИ_6_от_ФС
var CI_6_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(0).get_node2(1, 6).get_child(1)
set_frame(CI_6_FS, frame_type)
if frame_type == Constants.Frame.CONSTANT and status_fs_2 != Constants.Frame.CONSTANT:
emit_signal('signal_FS_is_ready', Constants.META.CI_6_OT_FS)
status_fs_2 = frame_type
if i == 14: # СИ_7_от_ФС
var CI_7_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(0).get_node2(1, 6).get_child(1)
set_frame(CI_7_FS, frame_type)
if frame_type == Constants.Frame.CONSTANT and status_fs_3 != Constants.Frame.CONSTANT:
emit_signal('signal_FS_is_ready', Constants.META.CI_7_OT_FS)