From 4575a4ba186e8dc6b3878d78e3e349051c7aa457 Mon Sep 17 00:00:00 2001 From: Maxim Date: Wed, 18 Dec 2024 14:07:32 +0300 Subject: [PATCH] full sync ems g --- scripts/network.gd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/network.gd b/scripts/network.gd index ea869ff..4589676 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -60,6 +60,7 @@ func _ready() -> void: func _process(delta: float) -> void: last_update_time += delta poll_receive(soc_brodcast) + poll_receive(soc_unicast) state_machine() match unit.process(delta): Error.OK: soc_unicast.send_to(address, port, unit.tx_data.slice(0, unit.tx_len)) @@ -70,10 +71,8 @@ func state_machine(): var fl_done = (unit.cmd_state == unit.CmdState.DONE) ## Режим ожидания if state == Constants.STATE.WAIT and fl_done: - if send_array.size(): state = Constants.STATE.READ_ISA if send_array[0][0] == 'rd' else Constants.STATE.WRITE_ISA - ## Режим чтения из ИСА elif state == Constants.STATE.READ_ISA and fl_done: var ports_read = send_array.pop_front() @@ -88,7 +87,7 @@ func state_machine(): elif state == Constants.STATE.DONE and fl_done: emit_signal('yau_read_isa', unit.isa_ports) state = Constants.STATE.WAIT - + func on_line_changed(_unit) -> void: emit_signal('yau_status_line', unit.online)