From ad03ab0537d2f91520ec320bf21253d28e787cd3 Mon Sep 17 00:00:00 2001 From: sasha80 Date: Wed, 19 Mar 2025 09:30:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0.=20=D0=A1=D0=BA=D0=BE=D1=80=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=B0=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=BE=D0=B6=D0=B8=D0=B4=D0=B0=D0=BD=D0=B8=D0=B8?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=D0=B1=D0=BE=D1=80=D0=B0=20=D0=B8=20=D0=B2?= =?UTF-8?q?=D0=BE=20=D0=B2=D1=80=D0=B5=D0=BC=D1=8F=20=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/pribor-uyep/sch3-view.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scenes/pribor-uyep/sch3-view.gd b/scenes/pribor-uyep/sch3-view.gd index 6438139..49dc46c 100644 --- a/scenes/pribor-uyep/sch3-view.gd +++ b/scenes/pribor-uyep/sch3-view.gd @@ -45,6 +45,7 @@ func on_data_received(_data: PackedByteArray): pass func _on_timeout(unit_sch3, mbc: ModbusClientRtu) -> void: push_warning(step_fsm) if step_fsm == Sch3Fsm.WRITE: + timer.wait_time = request_period if write_stack.size(): var ad = write_stack.pop_front() mbc.write(ad.addr, ad.data) @@ -54,6 +55,7 @@ func _on_timeout(unit_sch3, mbc: ModbusClientRtu) -> void: elif step_fsm == Sch3Fsm.READ_HOLDING: unit_sch3.read_holding(base_holding_address, regs_holding_count) elif step_fsm == Sch3Fsm.CONNECT: + timer.wait_time = reconnect_period mbc.queue_clear() mbc.flush() mbc.try_reconnect() @@ -113,7 +115,6 @@ func on_line_changed(unit_sch3: sch_3.Sch3): for item in get_tree().get_nodes_in_group('bits_items_good'): item.texture = textures[STATE_VAL.NONE] if not unit_sch3.online: - timer.wait_time = reconnect_period for item in get_tree().get_nodes_in_group('bits_items_switch'): item.disabled = true regs_holding.clear() @@ -123,7 +124,6 @@ func on_line_changed(unit_sch3: sch_3.Sch3): $margin/vbox/grid1/lbl_freq.text = '<нет данных>' $margin/vbox/grid1/state_freq.texture = textures[STATE_VAL.NONE] $margin/vbox/grid/state.texture = textures[STATE_VAL.NONE] - timer.wait_time = reconnect_period step_fsm = Sch3Fsm.CONNECT else: timer.wait_time = request_period