1 litera is almost ready

This commit is contained in:
2025-03-07 00:20:35 +03:00
parent 1c7aba948a
commit a7a4ffaa9e
9 changed files with 854 additions and 283 deletions

View File

@@ -6,6 +6,7 @@ var shift: int = 2
var button_link_meta: Dictionary = {}
var status_fs_1
var status_fs_2
var status_fs_3
func _on_read_ems_g():
@@ -190,21 +191,21 @@ func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_nod
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_2 != Constants.Frame.CONSTANT:
emit_signal('signal_FS_is_ready', Constants.META.CI_7_OT_FS)
status_fs_2 = 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_1 != Constants.Frame.CONSTANT:
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_1 = frame_type
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_2 != Constants.Frame.CONSTANT:
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)
status_fs_2 = frame_type
status_fs_3 = frame_type
func set_frame(node: Node, val: int): node.set_frame(val)
@@ -260,7 +261,14 @@ func on_mode_link(mode, list):
## Формирование команды для отправкы команды на устройство
address_port_wr = Constants.BASE_PORTS.EMS_G+8
var set_mode = 0x0000 if mode == 0 else 0x2000 if mode == 1 else 0x4000 if mode == 2 else 0x8000
var set_mode: int = 0x0000 if mode == 0 else 0x2000 if mode == 1 else 0x4000 if mode == 2 else 0x8000
var node_prd: Node = get_parent().get_parent()
for i_meta in 3:
if meta == node_prd.current_meta[i_meta]:
node_prd.modul_um[i_meta] = set_mode
if node_prd.modul_um.has(0x8000):
node_prd.timer_modul_um.wait_time = 2.3
node_prd.timer_modul_um.start()
Network.write_port_isa(address_port_wr, set_mode)