From b755a8966c11cc4ae89d7797ad25e5cf5aeec043 Mon Sep 17 00:00:00 2001 From: lepshiy Date: Tue, 4 Feb 2025 15:38:16 +0300 Subject: [PATCH 01/15] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F/=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7?= =?UTF-8?q?=D0=BA=D0=B8=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/PRD-TU-MP550.iml | 5 ++--- others-Н1 | 1 + scripts/ems_g.gd | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 others-Н1 diff --git a/.idea/PRD-TU-MP550.iml b/.idea/PRD-TU-MP550.iml index d0876a7..15e76cf 100644 --- a/.idea/PRD-TU-MP550.iml +++ b/.idea/PRD-TU-MP550.iml @@ -1,8 +1,7 @@ - + + - - \ No newline at end of file diff --git a/others-Н1 b/others-Н1 new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/others-Н1 @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/scripts/ems_g.gd b/scripts/ems_g.gd index 0821155..25580c2 100644 --- a/scripts/ems_g.gd +++ b/scripts/ems_g.gd @@ -9,11 +9,11 @@ func _on_read_ems_g(): Constants.EMS_G_PORT_DATA_HOLDER.clear() for i_input in 16: Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_input) - Network.read_port_isa([Constants.BASE_PORTS.EMS_G+0xA]) + Network.read_port_isa([Constants.BASE_PORTS.EMS_G+2, Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+6, Constants.BASE_PORTS.EMS_G+8,Constants.BASE_PORTS.EMS_G+0xA]) for i_output in range(46, 62): Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_output) - Network.read_port_isa([Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+8]) + Network.read_port_isa([Constants.BASE_PORTS.EMS_G+2, Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+6, Constants.BASE_PORTS.EMS_G+8,Constants.BASE_PORTS.EMS_G+0xA]) func _on_sync(): From d1a8aa72792729abe29e5c5d414c8629ddf3e185 Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 6 Feb 2025 15:45:43 +0300 Subject: [PATCH 02/15] =?UTF-8?q?=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20PRD=20=D0=BF=D0=B0?= =?UTF-8?q?=D0=BD=D0=B5=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/ems_g.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ems_g.gd b/scripts/ems_g.gd index 25580c2..0821155 100644 --- a/scripts/ems_g.gd +++ b/scripts/ems_g.gd @@ -9,11 +9,11 @@ func _on_read_ems_g(): Constants.EMS_G_PORT_DATA_HOLDER.clear() for i_input in 16: Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_input) - Network.read_port_isa([Constants.BASE_PORTS.EMS_G+2, Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+6, Constants.BASE_PORTS.EMS_G+8,Constants.BASE_PORTS.EMS_G+0xA]) + Network.read_port_isa([Constants.BASE_PORTS.EMS_G+0xA]) for i_output in range(46, 62): Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_output) - Network.read_port_isa([Constants.BASE_PORTS.EMS_G+2, Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+6, Constants.BASE_PORTS.EMS_G+8,Constants.BASE_PORTS.EMS_G+0xA]) + Network.read_port_isa([Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+8]) func _on_sync(): From 529bc8a2d6ecf84b45358daaf35021b0901cd9c4 Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 6 Feb 2025 16:38:45 +0300 Subject: [PATCH 03/15] remove fs_2 --- scripts/FS.gd | 25 --------------- scripts/PRD.gd | 37 +++++++-------------- scripts/constants.gd | 11 ++++--- scripts/network.gd | 76 ++------------------------------------------ table/header.tscn | 9 +++++- table/node.tscn | 19 ++--------- 6 files changed, 30 insertions(+), 147 deletions(-) diff --git a/scripts/FS.gd b/scripts/FS.gd index 11e45f5..a1f4219 100644 --- a/scripts/FS.gd +++ b/scripts/FS.gd @@ -129,31 +129,6 @@ class FGOS: i += 1 emit_signal('data_received', self) - - #var GRP = data.decode_u8(0x0) - #var CMD = data.decode_u8(0x1) - #match CMD: - #Constants.CMD.READ_CARRIER: - #if GRP == Constants.GROUP.BASE: - #$manage_panel/get_freq/freq_ind.text = str(data.decode_u64(0xC)) + ' Гц' - #Constants.CMD.READ_ATT: - #if GRP == Constants.GROUP.RF: - #$manage_panel/get_att/att_ind.text = '-' + str(data.decode_float(0x18)) + ' dB' - #Constants.CMD.READ_GEN_STATUS: - #if GRP == Constants.GROUP.GENERATOR: - #if data.decode_u32(0xC) == 0: - #$manage_panel/get_gen_status/status_ind.text = 'Включен' - #$manage_panel/get_gen_status/status_ind.modulate = Color.GREEN - #else: - #$manage_panel/get_gen_status/status_ind.text = 'Выключен' - #$manage_panel/get_gen_status/status_ind.modulate = Color.RED - #Constants.CMD.BASE_GET_CURRENT_TEMP: - #if GRP == Constants.GROUP.BASE: - #$temp_1.text = '%.2f' % data.decode_float(0xC) + ' °C' - #$temp_2.text = str(data.decode_float(0x10)) + ' °C' - #$temp_3.text = str(data.decode_float(0x14)) + ' °C' - #$read.text = str(data.hex_encode()) - func start_session(): counter = 0 diff --git a/scripts/PRD.gd b/scripts/PRD.gd index adfe5f7..e4a7d03 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -2,7 +2,7 @@ extends Node2D signal read_ems_g_start() signal read_ems_g_finish() -var unit_fs = Fs.FGOS.new() +var unit_fs_1 = Fs.FGOS.new() var flag_mode = Constants.ADDRESSES[0][3] var broadcast_packet: PackedByteArray var node_select1: Node @@ -74,9 +74,9 @@ func _ready() -> void: node_select_fs_1.set_node_text(1, 0, 'Литера_2') node_select_fs_1.set_node_text(0, 1, 'Состояние') node_select_fs_1.set_node_text(0, 2, 'Частота') - node_select_fs_1.get_node2(1, 2).placeholder_text = '500' + #node_select_fs_1.get_node2(1, 2).placeholder_text = '500' node_select_fs_1.set_node_text(0, 3, 'Аттенюатор') - node_select_fs_1.get_node2(1, 3).editable = true + #node_select_fs_1.get_node2(1, 3).editable = true node_select_fs_1.set_node_text(0, 4, 'Генератор') node_select_fs_1.set_node_text(0, 5, 'fpga') node_select_fs_1.set_node_text(0, 6, 'СИ 2 от ФС') @@ -88,9 +88,10 @@ func _ready() -> void: node_select_fs_2.set_node_text(1, 0, 'Литера_3') node_select_fs_2.set_node_text(0, 1, 'Состояние') node_select_fs_2.set_node_text(0, 2, 'Частота') - node_select_fs_2.get_node2(1, 2).placeholder_text = '500' + #node_select_fs_2.get_node2(1, 2).placeholder_text = '500' node_select_fs_2.set_node_text(0, 3, 'Аттенюатор') - node_select_fs_2.get_node2(1, 3).editable = true + #node_select_fs_2.get_node2(1, 3).placeholder_text = '38.7' + #node_select_fs_2.get_node2(1, 3).d = true node_select_fs_2.set_node_text(0, 4, 'Генератор') node_select_fs_2.set_node_text(0, 5, 'fpga') node_select_fs_2.set_node_text(0, 6, 'СИ 3 от ФС') @@ -134,7 +135,6 @@ func _ready() -> void: Network.connect('yau_receive', Callable(self, '_on_data_received')) Network.connect('yau_read_isa', Callable(self, '_on_read_isa')) Network.connect('data_from_fs_1', Callable(self, '_on_data_fs_1')) - Network.connect('data_from_fs_2', Callable(self, '_on_data_fs_2')) node_select_yau_07b.get_node2(1, 1).get_child(1, false).connect('toggled', Callable(self, '_on_zapret1')) node_select_yau_07b.get_node2(1, 2).connect('item_selected', Callable(self, '_on_modul_um_1')) @@ -148,7 +148,6 @@ func _ready() -> void: node_select_yau_07b_2.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_fgos_2')) node_select_fs_1.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_1')) - node_select_fs_2.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_2')) func draw_control_panel_prd(mode) -> void: @@ -411,7 +410,6 @@ func on_btn_select(intem_from_sector: int) -> void: flag_mode = meta[2] draw_control_panel_prd(flag_mode) _on_start_fs_1() - _on_start_fs_2() func _on_zapret1(toggled_on: bool) -> void: @@ -514,32 +512,21 @@ func set_bits(v, a, m): func _on_start_fs_1(): - unit_fs.start_session() - unit_fs.base_get_current_temp() - - -func _on_start_fs_2(): - unit_fs.start_session() - unit_fs.base_get_current_temp() + unit_fs_1.start_session() + unit_fs_1.base_get_current_temp() func _on_get_status_1(toggled_btn): var inverted_state = not toggled_btn - unit_fs.set_gen_state(inverted_state) - unit_fs.get_gen_state() - - -func _on_get_status_2(toggled_btn): - var inverted_state = not toggled_btn - unit_fs.set_gen_state(inverted_state) - unit_fs.get_gen_state() + unit_fs_1.set_gen_state(inverted_state) + unit_fs_1.get_gen_state() func _on_set_ferq(): var freq = int($set_space/write_to_set_freq.get_text()) * 1_000_000 - unit_fs.set_carrier(freq) + unit_fs_1.set_carrier(freq) func _on_set_att(): var att = float($set_space/write_to_set_att.get_text()) - unit_fs.set_att_batch(att) + unit_fs_1.set_att_batch(att) diff --git a/scripts/constants.gd b/scripts/constants.gd index 11fe86a..8705ffd 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -12,9 +12,10 @@ const TableNode = preload("res://table/node.tscn") const TableList = preload("res://table/node_list.tscn") const Switch = preload("res://table/switch.tscn") const SocketStatus = preload("res://table/socket_status.tscn") +const Header = preload("res://table/header.tscn") const SELECT_DEVICE: Array = [[TableNode, TableList]] const ROWS_REGS_DATA: Array = [ - [TableNode, TableNode], + [Header, Header], [TableNode, TableNode], [TableNode, TableNode], [TableNode, TableNode], @@ -22,7 +23,7 @@ const ROWS_REGS_DATA: Array = [ [TableNode, TableNode], [TableNode, TableNode]] const ROWS_YAU_07B_1: Array = [ - [TableNode, TableNode], + [Header, Header], [TableNode, Switch], [TableNode, TableList], [TableNode, TableList], @@ -30,7 +31,7 @@ const ROWS_YAU_07B_1: Array = [ [TableNode, TableNode], [TableNode, SocketStatus]] const ROWS_YAU_07B_2: Array = [ - [TableNode, TableNode], + [Header, Header], [TableNode, Switch], [TableNode, TableList], [TableNode, TableList], @@ -38,7 +39,7 @@ const ROWS_YAU_07B_2: Array = [ [TableNode, Switch], [TableNode, SocketStatus]] const ROWS_FS: Array = [ - [TableNode, TableNode, TableNode], + [Header, Header, Header], [TableNode, TableNode, TableNode], [TableNode, TableNode, TableNode], [TableNode, TableNode, TableNode], @@ -95,7 +96,7 @@ const OUT_EMS_G: Array = [ const OUT_x128: Array = [ 'Р', 'К', - '0', + 'Откл.', '1',] const RAY_DICT: Array = [ ' -5°', diff --git a/scripts/network.gd b/scripts/network.gd index ed952d6..cf8ad61 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -20,26 +20,19 @@ var state_fs = Constants.STATE.IDLE var client_fs_1: StreamPeer var peerstream_fs_1: PacketPeer -var ip_fs_2: String = Constants.ADDRESSES[0][5] -var command_stack_fs_2: Array -var state_fs_2 = Constants.STATE.IDLE -var client_fs_2: StreamPeer -var peerstream_fs_2: PacketPeer signal yau_status_line(_status) ## Вызывается когда меняется состояние связи с ячейкой signal yau_receive(_data_from_yau) signal yau_read_isa(_unit_isa_ports) signal data_send() -signal data_send_2() signal data_from_fs_1(data:PackedByteArray) -signal data_from_fs_2(data:PackedByteArray) signal port_opened(port_name: String) -signal port_opened_2(port_name: String) signal port_closed(port_name: String) signal port_error(error_str: String) + ## Класс для отправки данных в сокет class Socket extends PacketPeerUDP: func send_to(addr: String, port: int, data: PackedByteArray): @@ -86,27 +79,6 @@ func poll_receive_fs(client: StreamPeerTCP): state_fs = Constants.STATE.DONE -func poll_receive_fs_2(client: StreamPeerTCP): - client.poll() - var peer = peerstream_fs_2.get_stream_peer() - # Проверяем, существует ли соединение - if not peer: - emit_signal("port_fs_2_error", ip_fs_2) - return - # Проверяем состояние подключения - if client.get_status() != StreamPeerTCP.STATUS_CONNECTED: - emit_signal("port_closed_fs_2", ip_fs_2) - return - - if peer.get_available_bytes() > 0: - var rx_data: PackedByteArray - rx_data.append_array(peer.get_data(peer.get_available_bytes())[1]) - emit_signal("data_from_fs_2", rx_data) - emit_signal("port_opened_fs_2", ip_fs_2) - if state_fs_2 == Constants.STATE.SEND: - state_fs_2 = Constants.STATE.DONE - - func _ready() -> void: # Привязка для принятия широковещательного канала soc_brodcast = Socket.new() @@ -132,8 +104,6 @@ func _process(delta: float) -> void: if client_fs_1: poll_receive_fs(client_fs_1) - #if client_fs_2: - #poll_receive_fs_2(client_fs_2) poll_receive_yau07(soc_brodcast) poll_receive_yau07(soc_unicast) @@ -196,10 +166,9 @@ func on_command_change_device(meta_device): ip_address_yau = meta_device[0] ip_port_yau = meta_device[1] ip_fs_1 = meta_device[3] - ip_fs_2 = meta_device[4] + #ip_fs_2 = meta_device[4] #ip_fs_3 = meta_device[5] connect_fs() - connect_fs_2() func state_machine_fs(): @@ -240,44 +209,3 @@ func disconnect_fs(client_for_leave): client_for_leave.disconnect_from_host() state_fs = Constants.STATE.IDLE command_stack = [] - - - -func state_machine_fs_2(): - if client_fs_2: - ## State fs machine - if (state_fs_2 == Constants.STATE.IDLE) or (state_fs_2 == Constants.STATE.DONE): - if command_stack_fs_2: - var pack: Array = command_stack_fs_2.pop_front() - send_data_fs_2(pack) - state_fs_2 = Constants.STATE.SEND - - -# Подключится к модулю ФС -func connect_fs_2(): - if client_fs_2: - disconnect_fs_2(client_fs_2) - - client_fs_2 = StreamPeerTCP.new() - peerstream_fs_2 = PacketPeerStream.new() - var rc = client_fs_2.connect_to_host(ip_fs_2, Constants.PORT_FS) - if rc!= Error.OK: - emit_signal("port_error", ip_fs_2) - else: - peerstream_fs_2.set_stream_peer(client_fs_2) - - -# Отправить команду для ФС -func send_data_fs_2(data_to_sand: PackedByteArray): - if client_fs_2.get_status() == 2: - var peer = peerstream_fs_2.get_stream_peer() - if peer: - peer.put_data(data_to_sand) - emit_signal("data_send_2") - - -# Разорвать соединение с ФС -func disconnect_fs_2(client_for_leave): - client_for_leave.disconnect_from_host() - state_fs_2 = Constants.STATE.IDLE - command_stack = [] diff --git a/table/header.tscn b/table/header.tscn index 76a059d..881917e 100644 --- a/table/header.tscn +++ b/table/header.tscn @@ -1,9 +1,16 @@ [gd_scene load_steps=2 format=3 uid="uid://ch14g46swx74h"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2thpi"] -bg_color = Color(0.8, 0.403922, 0.27451, 1) +bg_color = Color(0.611765, 0.109804, 0.262745, 0.615686) +corner_radius_top_left = 2 +corner_radius_top_right = 2 +corner_radius_bottom_right = 2 +corner_radius_bottom_left = 2 +shadow_size = 2 +shadow_offset = Vector2(2, 2) [node name="heder" type="Label"] +custom_minimum_size = Vector2(0, 30) offset_right = 128.0 offset_bottom = 23.0 theme_override_colors/font_color = Color(0, 0, 0, 1) diff --git a/table/node.tscn b/table/node.tscn index a417ee8..01c02b1 100644 --- a/table/node.tscn +++ b/table/node.tscn @@ -10,28 +10,13 @@ corner_radius_bottom_right = 3 corner_radius_bottom_left = 3 [node name="Label" type="LineEdit"] -texture_filter = 2 -texture_repeat = 2 -clip_contents = true -layout_direction = 2 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_top = -103.0 -offset_right = 75.0 -offset_bottom = 137.0 -grow_horizontal = 2 -grow_vertical = 2 -size_flags_horizontal = 3 -size_flags_vertical = 3 +offset_right = 70.75 +offset_bottom = 32.0 focus_mode = 0 -mouse_default_cursor_shape = 0 theme_override_colors/font_uneditable_color = Color(1, 1, 1, 1) theme_override_font_sizes/font_size = 17 -theme_override_styles/read_only = SubResource("StyleBoxFlat_q1ixs") theme_override_styles/normal = SubResource("StyleBoxFlat_q1ixs") alignment = 1 -caret_blink = true caret_blink_interval = 0.5 [node name="ColorRect" type="ColorRect" parent="."] From 7b23507d40b1a071c570ad827957af0e712d54ee Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 6 Feb 2025 19:34:48 +0300 Subject: [PATCH 04/15] =?UTF-8?q?=D0=BA=D1=80=D0=B0=D1=81=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PRD_MP550.tscn | 15 ++++++++------- scripts/PRD.gd | 22 ++++++++++++---------- scripts/constants.gd | 16 ++++++++-------- scripts/control_panel.gd | 2 +- table/header.tscn | 12 +++++------- table/node.tscn | 33 ++++++++++++++++++++++----------- table/socket_status.tscn | 23 ++++++++++------------- table/switch.tscn | 4 ++++ 8 files changed, 70 insertions(+), 57 deletions(-) diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index ee5c21a..9dcfdb1 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -150,8 +150,8 @@ CheckBox/font_sizes/font_size = 14 script = ExtResource("1_v273n") [node name="Background" type="ColorRect" parent="."] -offset_right = 1941.0 -offset_bottom = 988.0 +offset_right = 3025.0 +offset_bottom = 1060.0 theme = SubResource("Theme_k5ur4") color = Color(0.356863, 0.278431, 0.356863, 1) metadata/_edit_lock_ = true @@ -329,6 +329,7 @@ script = ExtResource("2_vmbyo") metadata/_edit_lock_ = true [node name="PSK" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_2_4_6"] +modulate = Color(1, 1, 0.941176, 0.588235) material = ExtResource("3_3syd3") position = Vector2(914, 5) scale = Vector2(0.247968, 0.234167) @@ -386,6 +387,7 @@ script = ExtResource("2_vmbyo") metadata/_edit_lock_ = true [node name="PSK2" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_3_5_7"] +modulate = Color(1, 1, 0.941176, 0.588235) material = ExtResource("3_3syd3") position = Vector2(914, -6) scale = Vector2(0.247968, 0.234167) @@ -796,12 +798,11 @@ metadata/_edit_lock_ = true [node name="table1" type="GridContainer" parent="TabContainer/EMS_G"] layout_mode = 2 -offset_left = 27.0 -offset_top = 148.0 -offset_right = 27.0 -offset_bottom = 148.0 +offset_left = 35.0 +offset_top = 60.0 +offset_right = 35.0 +offset_bottom = 60.0 script = ExtResource("2_vmbyo") -metadata/_edit_lock_ = true [node name="load_boadr" type="ColorRect" parent="TabContainer/EMS_G"] layout_mode = 0 diff --git a/scripts/PRD.gd b/scripts/PRD.gd index e4a7d03..7154cc7 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -47,9 +47,9 @@ func _ready() -> void: draw_tabl(node_select_yau_07b, Constants.ROWS_YAU_07B_1, Constants.ROWS_YAU_07B_1.size()) node_select_yau_07b.set_columns_min_size([160, 120]) node_select_yau_07b.set_node_text(0, 0, 'ПРД-Н') - node_select_yau_07b.set_node_text(1, 0, 'Литера_2') - node_select_yau_07b.set_node_text(0, 1, 'Запрет СИ_2') - node_select_yau_07b.set_node_text(0, 2, 'Модуляция УМ_2') + node_select_yau_07b.set_node_text(1, 0, 'Литера 2') + node_select_yau_07b.set_node_text(0, 1, 'Запрет СИ 2') + node_select_yau_07b.set_node_text(0, 2, 'Модуляция УМ 2') node_select_yau_07b.set_node_text(0, 3, 'Положение луча') node_select_yau_07b.set_node_text(0, 4, 'Аттенюатор') node_select_yau_07b.set_node_text(0, 6, 'СИ 2 в УФ') @@ -58,9 +58,9 @@ func _ready() -> void: draw_tabl(node_select_yau_07b_2, Constants.ROWS_YAU_07B_2, Constants.ROWS_YAU_07B_2.size()) node_select_yau_07b_2.set_columns_min_size([160, 120]) node_select_yau_07b_2.set_node_text(0, 0, 'ПРД-Н') - node_select_yau_07b_2.set_node_text(1, 0, 'Литера_3') - node_select_yau_07b_2.set_node_text(0, 1, 'Запрет СИ_3') - node_select_yau_07b_2.set_node_text(0, 2, 'Модуляция УМ_3') + node_select_yau_07b_2.set_node_text(1, 0, 'Литера 3') + node_select_yau_07b_2.set_node_text(0, 1, 'Запрет СИ 3') + node_select_yau_07b_2.set_node_text(0, 2, 'Модуляция УМ 3') node_select_yau_07b_2.set_node_text(0, 3, 'Положение луча') node_select_yau_07b_2.set_node_text(0, 4, 'Аттенюатор') node_select_yau_07b_2.set_node_text(0, 5, 'ФГОЗ 3') @@ -71,12 +71,14 @@ func _ready() -> void: draw_tabl(node_select_fs_1, Constants.ROWS_FS, Constants.ROWS_FS.size()) node_select_fs_1.set_columns_min_size([120, 120, 150]) node_select_fs_1.set_node_text(0, 0, 'Модуль ФС') - node_select_fs_1.set_node_text(1, 0, 'Литера_2') + node_select_fs_1.set_node_text(1, 0, 'Литера 2') node_select_fs_1.set_node_text(0, 1, 'Состояние') node_select_fs_1.set_node_text(0, 2, 'Частота') - #node_select_fs_1.get_node2(1, 2).placeholder_text = '500' + node_select_fs_1.get_node2(1, 2).placeholder_text = 'в МГц' + node_select_fs_1.get_node2(1, 2).editable = true node_select_fs_1.set_node_text(0, 3, 'Аттенюатор') - #node_select_fs_1.get_node2(1, 3).editable = true + node_select_fs_1.get_node2(1, 3).placeholder_text = 'в dB' + node_select_fs_1.get_node2(1, 3).editable = true node_select_fs_1.set_node_text(0, 4, 'Генератор') node_select_fs_1.set_node_text(0, 5, 'fpga') node_select_fs_1.set_node_text(0, 6, 'СИ 2 от ФС') @@ -85,7 +87,7 @@ func _ready() -> void: draw_tabl(node_select_fs_2, Constants.ROWS_FS, Constants.ROWS_FS.size()) node_select_fs_2.set_columns_min_size([120, 120, 150]) node_select_fs_2.set_node_text(0, 0, 'Модуль ФС') - node_select_fs_2.set_node_text(1, 0, 'Литера_3') + node_select_fs_2.set_node_text(1, 0, 'Литера 3') node_select_fs_2.set_node_text(0, 1, 'Состояние') node_select_fs_2.set_node_text(0, 2, 'Частота') #node_select_fs_2.get_node2(1, 2).placeholder_text = '500' diff --git a/scripts/constants.gd b/scripts/constants.gd index 8705ffd..12279cd 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -108,14 +108,14 @@ const RAY_DICT: Array = [ ' Контроль', ] const ATT_DICT: Array = [ - ' 0 db', - ' 0.5 db', - ' 2 db', - ' 2.5 db', - ' 8 db', - ' 8.5 db', - ' 10 db', - ' 10.5 db', + ' 0 dB', + ' 0.5 dB', + ' 2 dB', + ' 2.5 dB', + ' 8 dB', + ' 8.5 dB', + ' 10 dB', + ' 10.5 dB', ] const SIGNS_PRD: Array = [ ## ПРК-К diff --git a/scripts/control_panel.gd b/scripts/control_panel.gd index 2f15fea..80e2e5b 100644 --- a/scripts/control_panel.gd +++ b/scripts/control_panel.gd @@ -36,7 +36,7 @@ func _on_data_received(data_from_yau_07): ## SOCKETS BOARDS for i in 4: - var sockets_ind = [$soc_y5/ref_A26/light_ind, + var sockets_ind = [ $soc_y5/ref_A26/light_ind, $soc_y5/ref_A27/light_ind, $soc_y5/ref_A28/light_ind, $soc_y5/ref_A29/light_ind] diff --git a/table/header.tscn b/table/header.tscn index 881917e..f12873f 100644 --- a/table/header.tscn +++ b/table/header.tscn @@ -1,19 +1,17 @@ [gd_scene load_steps=2 format=3 uid="uid://ch14g46swx74h"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2thpi"] -bg_color = Color(0.611765, 0.109804, 0.262745, 0.615686) -corner_radius_top_left = 2 +bg_color = Color(0.455894, 0.0685824, 0.187642, 0.945098) +corner_radius_top_left = 5 corner_radius_top_right = 2 -corner_radius_bottom_right = 2 -corner_radius_bottom_left = 2 -shadow_size = 2 -shadow_offset = Vector2(2, 2) +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 [node name="heder" type="Label"] custom_minimum_size = Vector2(0, 30) offset_right = 128.0 offset_bottom = 23.0 -theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_colors/font_color = Color(1, 1, 0.941176, 1) theme_override_font_sizes/font_size = 15 theme_override_styles/normal = SubResource("StyleBoxFlat_2thpi") horizontal_alignment = 1 diff --git a/table/node.tscn b/table/node.tscn index 01c02b1..f0db82f 100644 --- a/table/node.tscn +++ b/table/node.tscn @@ -2,24 +2,35 @@ [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q1ixs"] bg_color = Color(0, 0, 0, 0.490196) -border_width_bottom = 2 -border_color = Color(0.223529, 0.168627, 0.223529, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 [node name="Label" type="LineEdit"] -offset_right = 70.75 -offset_bottom = 32.0 -focus_mode = 0 -theme_override_colors/font_uneditable_color = Color(1, 1, 1, 1) +texture_filter = 2 +texture_repeat = 2 +clip_contents = true +layout_direction = 2 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -103.0 +offset_right = 75.0 +offset_bottom = 137.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_colors/font_uneditable_color = Color(1, 1, 0.941176, 1) theme_override_font_sizes/font_size = 17 +theme_override_styles/read_only = SubResource("StyleBoxFlat_q1ixs") theme_override_styles/normal = SubResource("StyleBoxFlat_q1ixs") alignment = 1 +caret_blink = true caret_blink_interval = 0.5 -[node name="ColorRect" type="ColorRect" parent="."] +[node name="Color_Ems_g" type="ColorRect" parent="."] layout_mode = 0 offset_right = 1933.0 offset_bottom = 1088.0 diff --git a/table/socket_status.tscn b/table/socket_status.tscn index ae21dbe..1f6040a 100644 --- a/table/socket_status.tscn +++ b/table/socket_status.tscn @@ -6,12 +6,10 @@ [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q1ixs"] bg_color = Color(0, 0, 0, 0.490196) -border_width_bottom = 2 -border_color = Color(0.223529, 0.168627, 0.223529, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 [sub_resource type="SpriteFrames" id="SpriteFrames_a7q1i"] animations = [{ @@ -34,18 +32,17 @@ animations = [{ }] [node name="PanelContainer" type="PanelContainer"] +custom_minimum_size = Vector2(50, 35) offset_left = -3.0 -offset_right = 319.0 -offset_bottom = 66.0 +offset_right = 119.0 +offset_bottom = 35.0 theme_override_styles/panel = SubResource("StyleBoxFlat_q1ixs") -metadata/_edit_lock_ = true -[node name="ColorRect" type="ColorRect" parent="."] +[node name="Color_ems_g" type="ColorRect" parent="."] layout_mode = 2 -color = Color(0, 0, 0, 0.195) +color = Color(1, 1, 1, 0) [node name="SZI_x" type="AnimatedSprite2D" parent="."] -position = Vector2(40, 11) +position = Vector2(59, 18) scale = Vector2(1.2, 1.2) sprite_frames = SubResource("SpriteFrames_a7q1i") -metadata/_edit_lock_ = true diff --git a/table/switch.tscn b/table/switch.tscn index 6a79c95..edbab12 100644 --- a/table/switch.tscn +++ b/table/switch.tscn @@ -3,6 +3,10 @@ [ext_resource type="Script" path="res://scripts/switch.gd" id="1_h0k6p"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r5cym"] +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_b6sp7"] From da73feed4bce2037692aa03c07d43cec45e95db4 Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 6 Feb 2025 21:43:33 +0300 Subject: [PATCH 05/15] modul fs --- PRD_MP550.tscn | 17 +++++++++-------- scripts/FS.gd | 25 +++++++++++++------------ scripts/PRD.gd | 17 +++++++++++------ scripts/constants.gd | 40 ++-------------------------------------- scripts/ems_g.gd | 8 ++++---- table/node.tscn | 1 + 6 files changed, 40 insertions(+), 68 deletions(-) diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 9dcfdb1..a6d11e2 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -806,25 +806,26 @@ script = ExtResource("2_vmbyo") [node name="load_boadr" type="ColorRect" parent="TabContainer/EMS_G"] layout_mode = 0 -offset_left = 27.0 -offset_top = 148.0 -offset_right = 1596.0 -offset_bottom = 717.0 +offset_left = 35.0 +offset_top = 58.0 +offset_right = 1604.0 +offset_bottom = 782.0 color = Color(0, 0, 0, 0.596078) +metadata/_edit_lock_ = true [node name="load" type="Sprite2D" parent="TabContainer/EMS_G/load_boadr"] material = SubResource("ShaderMaterial_slcfo") -position = Vector2(786, 284.5) -scale = Vector2(24.4688, 8.89063) +position = Vector2(785.001, 361.5) +scale = Vector2(24.5313, 11.2656) texture = SubResource("GradientTexture2D_0pk2o") metadata/_edit_lock_ = true [node name="Load_text" type="Label" parent="TabContainer/EMS_G/load_boadr"] layout_mode = 0 offset_left = 693.0 -offset_top = 277.0 +offset_top = 341.0 offset_right = 849.0 -offset_bottom = 316.0 +offset_bottom = 380.0 theme_override_colors/font_color = Color(1, 1, 1, 1) theme_override_colors/font_shadow_color = Color(0.427493, 0.427493, 0.427493, 1) theme_override_font_sizes/font_size = 28 diff --git a/scripts/FS.gd b/scripts/FS.gd index a1f4219..bb8f0b0 100644 --- a/scripts/FS.gd +++ b/scripts/FS.gd @@ -71,7 +71,8 @@ class FGOS: const CMD_OFFSET: int = 0x1 const COUNTER_OFFSET: int = 0x4 const PAYLOAD_OFFSET: int = 0x8 - + const INIT: int = 0xFFFFFFFF + const FINAL_XOR_VALUE: int = 0x00000000 signal line_changed(unit: FGOS) ## Вызывается когда меняется состояние связи с ячейкой @@ -82,12 +83,12 @@ class FGOS: func crc32(data: PackedByteArray) -> int: - var crc = Constants.INIT + var crc = INIT for byte in data: var index = (crc ^ byte) & 0xFF - crc = (Constants.CRC32_TABLE[index] ^ (crc >> 8)) & 0xFFFFFFFF + crc = (CRC32_TABLE[index] ^ (crc >> 8)) & 0xFFFFFFFF # Возвращаем только последние 4 байта в обратном порядке - var final_crc = crc ^ Constants.FINAL_XOR_VALUE + var final_crc = crc ^ FINAL_XOR_VALUE return final_crc @@ -132,7 +133,7 @@ class FGOS: func start_session(): counter = 0 - var packet = _form_packet(Constants.GROUP.BASE, Constants.CMD.START_SESSION, 0xC) + var packet = _form_packet(GROUP.BASE, CmdCode.START_SESSION, 0xC) _send_packet(packet) get_gen_state() get_att_batch() @@ -141,7 +142,7 @@ class FGOS: func set_gen_state(button_state: bool): var index_size = 0x1C - var packet = _form_packet(Constants.GROUP.GENERATOR, Constants.CMD.SET_GEN_STATUS, index_size) + var packet = _form_packet(GROUP.GENERATOR, CmdCode.SET_GEN_STATUS, index_size) packet.encode_u16(0x8, 0x0010) packet.encode_u32(0xC, button_state) ## MODE GEN STATUS _send_packet(packet) @@ -150,7 +151,7 @@ class FGOS: func set_carrier(installation_frequency: int): var index_size = 0x1C - var packet = _form_packet(Constants.GROUP.BASE, Constants.CMD.SET_CARRIER, index_size) + var packet = _form_packet(GROUP.BASE, CmdCode.SET_CARRIER, index_size) packet.encode_u16(0x8, 0x10) packet.encode_u64(0xC, installation_frequency) ## uint64_t freq low dword/high dword _send_packet(packet) @@ -158,27 +159,27 @@ class FGOS: func set_att_batch(attenuation: float): var index_size = 0x1C - var packet = _form_packet(Constants.GROUP.RF, Constants.CMD.SET_ATT, index_size) + var packet = _form_packet(GROUP.RF, CmdCode.SET_ATT, index_size) packet.encode_u16(0x8, 0x10) packet.encode_float(0x18, attenuation) _send_packet(packet) func get_carrier(): - var packet = _form_packet(Constants.GROUP.BASE, Constants.CMD.READ_CARRIER, INDEX_SIZE) + var packet = _form_packet(GROUP.BASE, CmdCode.READ_CARRIER, INDEX_SIZE) _send_packet(packet) func get_att_batch(): - var packet = _form_packet(Constants.GROUP.RF, Constants.CMD.READ_ATT, INDEX_SIZE) + var packet = _form_packet(GROUP.RF, CmdCode.READ_ATT, INDEX_SIZE) _send_packet(packet) func get_gen_state(): - var packet = _form_packet(Constants.GROUP.GENERATOR, Constants.CMD.READ_GEN_STATUS, INDEX_SIZE) + var packet = _form_packet(GROUP.GENERATOR, CmdCode.READ_GEN_STATUS, INDEX_SIZE) _send_packet(packet) func base_get_current_temp(): - var packet = _form_packet(Constants.GROUP.BASE, Constants.CMD.BASE_GET_CURRENT_TEMP, INDEX_SIZE) + var packet = _form_packet(GROUP.BASE, CmdCode.BASE_GET_CURRENT_TEMP, INDEX_SIZE) _send_packet(packet) diff --git a/scripts/PRD.gd b/scripts/PRD.gd index 7154cc7..45df211 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -150,6 +150,8 @@ func _ready() -> void: node_select_yau_07b_2.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_fgos_2')) node_select_fs_1.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_1')) + node_select_fs_1.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att')) + node_select_fs_1.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq')) func draw_control_panel_prd(mode) -> void: @@ -524,11 +526,14 @@ func _on_get_status_1(toggled_btn): unit_fs_1.get_gen_state() -func _on_set_ferq(): - var freq = int($set_space/write_to_set_freq.get_text()) * 1_000_000 - unit_fs_1.set_carrier(freq) +func _on_set_ferq(freq): + unit_fs_1.set_carrier(int(freq) * 1_000_000) + unit_fs_1.base_get_current_temp() + unit_fs_1.get_carrier() -func _on_set_att(): - var att = float($set_space/write_to_set_att.get_text()) - unit_fs_1.set_att_batch(att) +func _on_set_att(att): + unit_fs_1.set_att_batch(float(att)) + unit_fs_1.base_get_current_temp() + unit_fs_1.base_get_current_temp() + unit_fs_1.get_att_batch() diff --git a/scripts/constants.gd b/scripts/constants.gd index 12279cd..65eaef1 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -247,50 +247,14 @@ enum STATE { var EMS_G_PORT_DATA_HOLDER: Array = [] -# Таблица CRC-32 для модуля ФС -const CRC32_TABLE: Array = [ - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, - 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, - 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, - 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, - 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, - 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, - 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, - 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, - 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, - 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, - 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, - 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, - 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, - 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, - 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, - 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, - 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, - 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, - 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, - 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, - 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, - 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, - 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, - 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, - 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, - 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, - 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, - 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, - 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, - 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, - 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, - 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D] - const PORT_FS = 1201 -const INIT: int = 0xFFFFFFFF -const FINAL_XOR_VALUE: int = 0x00000000 enum GROUP { BASE = 0x00, GENERATOR = 0x03, RF = 0x06, } + enum CMD { START_SESSION = 0x0, READ_CARRIER = 0x1F, @@ -300,4 +264,4 @@ enum CMD { READ_GEN_STATUS = 0x05, SET_GEN_STATUS = 0x06, BASE_GET_CURRENT_TEMP = 0x36, -} + } diff --git a/scripts/ems_g.gd b/scripts/ems_g.gd index 0821155..d6c68a2 100644 --- a/scripts/ems_g.gd +++ b/scripts/ems_g.gd @@ -115,8 +115,12 @@ func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_ if i == 1: set_frame(get_specific_node(parent_node2, 5), frame_type) + 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) + set_frame(CI_2_UF, frame_type) if i == 2: set_frame(get_specific_node(parent_node2, 6), frame_type) + 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) + set_frame(CI_3_UF, frame_type) if i == 4: set_frame(get_specific_node(parent_node2, 7), frame_type) if i == 5: @@ -139,12 +143,8 @@ func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_nod if i == 1: set_frame(get_specific_node(parent_node2, 1), frame_type) - 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) - set_frame(CI_2_UF, frame_type) if i == 2: set_frame(get_specific_node(parent_node2, 2), frame_type) - 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) - set_frame(CI_3_UF, frame_type) if i == 9: set_frame(get_specific_node(parent_node2, 3), frame_type) 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) diff --git a/table/node.tscn b/table/node.tscn index f0db82f..e2b91cf 100644 --- a/table/node.tscn +++ b/table/node.tscn @@ -31,6 +31,7 @@ caret_blink = true caret_blink_interval = 0.5 [node name="Color_Ems_g" type="ColorRect" parent="."] +visible = false layout_mode = 0 offset_right = 1933.0 offset_bottom = 1088.0 From a2467c3d8b07e58695c86acce1733bffa8ae65e8 Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 6 Feb 2025 22:27:26 +0300 Subject: [PATCH 06/15] modul fs 1 --- project.godot | 2 +- scripts/PRD.gd | 62 +++++++++++++++++++++++++++---------------- scripts/modul_fs.gd | 64 ++++++++++++++++++++++----------------------- scripts/network.gd | 28 +++++++++++++++++++- 4 files changed, 99 insertions(+), 57 deletions(-) diff --git a/project.godot b/project.godot index 3dda21a..7b62efb 100644 --- a/project.godot +++ b/project.godot @@ -18,9 +18,9 @@ config/icon="res://icon.svg" [autoload] Constants="*res://scripts/constants.gd" +Fs="*res://scripts/FS.gd" Yau07="*res://scripts/yau07.gd" Network="*res://scripts/network.gd" -Fs="*res://scripts/FS.gd" [debug] diff --git a/scripts/PRD.gd b/scripts/PRD.gd index 45df211..a8afb7e 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -2,7 +2,7 @@ extends Node2D signal read_ems_g_start() signal read_ems_g_finish() -var unit_fs_1 = Fs.FGOS.new() + var flag_mode = Constants.ADDRESSES[0][3] var broadcast_packet: PackedByteArray var node_select1: Node @@ -90,10 +90,11 @@ func _ready() -> void: node_select_fs_2.set_node_text(1, 0, 'Литера 3') node_select_fs_2.set_node_text(0, 1, 'Состояние') node_select_fs_2.set_node_text(0, 2, 'Частота') - #node_select_fs_2.get_node2(1, 2).placeholder_text = '500' + node_select_fs_2.get_node2(1, 2).placeholder_text = 'в МГц' + node_select_fs_2.get_node2(1, 2).editable = true node_select_fs_2.set_node_text(0, 3, 'Аттенюатор') - #node_select_fs_2.get_node2(1, 3).placeholder_text = '38.7' - #node_select_fs_2.get_node2(1, 3).d = true + node_select_fs_2.get_node2(1, 3).placeholder_text = 'в dB' + node_select_fs_2.get_node2(1, 3).editable = true node_select_fs_2.set_node_text(0, 4, 'Генератор') node_select_fs_2.set_node_text(0, 5, 'fpga') node_select_fs_2.set_node_text(0, 6, 'СИ 3 от ФС') @@ -136,7 +137,8 @@ func _ready() -> void: Network.connect('yau_status_line', Callable(self, '_on_yau_status')) Network.connect('yau_receive', Callable(self, '_on_data_received')) Network.connect('yau_read_isa', Callable(self, '_on_read_isa')) - Network.connect('data_from_fs_1', Callable(self, '_on_data_fs_1')) + Network.connect('data_from_fs_1', _on_data_fs_1) + Network.connect('data_from_fs_2', _on_data_fs_2) node_select_yau_07b.get_node2(1, 1).get_child(1, false).connect('toggled', Callable(self, '_on_zapret1')) node_select_yau_07b.get_node2(1, 2).connect('item_selected', Callable(self, '_on_modul_um_1')) @@ -150,9 +152,13 @@ func _ready() -> void: node_select_yau_07b_2.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_fgos_2')) node_select_fs_1.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_1')) - node_select_fs_1.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att')) - node_select_fs_1.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq')) - + node_select_fs_1.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att_1')) + node_select_fs_1.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq_1')) + + node_select_fs_2.get_node2(1, 4).get_child(1, false).connect('toggled', Callable(self, '_on_get_status_2')) + node_select_fs_2.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att_2')) + node_select_fs_2.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq_2')) + func draw_control_panel_prd(mode) -> void: for node_path in Constants.NODE_MAP: @@ -223,7 +229,6 @@ func _on_data_fs_1(fs_1_data): Constants.CMD.BASE_GET_CURRENT_TEMP: if GRP == Constants.GROUP.BASE: node_select_fs_1.set_node_text(1, 5, '%.2f' % fs_1_data.decode_float(0xC) + ' °C') - #$read.text = str(fs_1_data.hex_encode()) func _on_data_fs_2(fs_2_data): @@ -514,26 +519,37 @@ func _on_read_isa_pressed() -> void: func set_bits(v, a, m): return (~m) & v | a & m - +## 1 ФС func _on_start_fs_1(): - unit_fs_1.start_session() - unit_fs_1.base_get_current_temp() + Network.start_work_fs() func _on_get_status_1(toggled_btn): var inverted_state = not toggled_btn - unit_fs_1.set_gen_state(inverted_state) - unit_fs_1.get_gen_state() + Network.get_fs_gen_status(inverted_state) -func _on_set_ferq(freq): - unit_fs_1.set_carrier(int(freq) * 1_000_000) - unit_fs_1.base_get_current_temp() - unit_fs_1.get_carrier() +func _on_set_ferq_1(freq: String): + Network.set_fs_ferq_carrier(int(freq) * 1_000_000) -func _on_set_att(att): - unit_fs_1.set_att_batch(float(att)) - unit_fs_1.base_get_current_temp() - unit_fs_1.base_get_current_temp() - unit_fs_1.get_att_batch() +func _on_set_att_1(att: String): + Network.set_fs_attenuation(float(att)) + + +## 2 ФС +func _on_start_fs_2(): + Network.start_work_fs() + + +func _on_get_status_2(toggled_btn): + var inverted_state = not toggled_btn + Network.get_fs_gen_status(inverted_state) + + +func _on_set_ferq_2(freq: String): + Network.set_fs_ferq_carrier(int(freq) * 1_000_000) + + +func _on_set_att_2(att: String): + Network.set_fs_attenuation(float(att)) diff --git a/scripts/modul_fs.gd b/scripts/modul_fs.gd index d59cbab..afa66c2 100644 --- a/scripts/modul_fs.gd +++ b/scripts/modul_fs.gd @@ -15,45 +15,45 @@ func _process(_delta: float) -> void: func _enter_tree() -> void: # Подключаем сигналы к методам Network.connect('data_send', _on_data_send) - Network.connect('data_from_fs_1', _on_data_received) - Network.connect('port_opened', _on_port_changed.bind(Color.GREEN)) - Network.connect('port_closed', _on_port_changed.bind(Color.GRAY)) - Network.connect('port_error', _on_port_changed.bind(Color.RED)) + #Network.connect('data_from_fs_1', _on_data_received) + #Network.connect('port_opened', _on_port_changed.bind(Color.GREEN)) + #Network.connect('port_closed', _on_port_changed.bind(Color.GRAY)) + #Network.connect('port_error', _on_port_changed.bind(Color.RED)) -func _on_port_changed(port_name: String, color: Color) -> void: - $manage_panel/con/ip_connect.text = port_name - $fs_connect.self_modulate = color +#func _on_port_changed(port_name: String, color: Color) -> void: + #$manage_panel/con/ip_connect.text = port_name + #$fs_connect.self_modulate = color func _on_data_send(): pass - -func _on_data_received(data: PackedByteArray): - var GRP = data.decode_u8(0x0) - var CMD = data.decode_u8(0x1) - match CMD: - Constants.CMD.READ_CARRIER: - if GRP == Constants.GROUP.BASE: - $manage_panel/get_freq/freq_ind.text = str(data.decode_u64(0xC)) + ' Гц' - Constants.CMD.READ_ATT: - if GRP == Constants.GROUP.RF: - $manage_panel/get_att/att_ind.text = '-' + str(data.decode_float(0x18)) + ' dB' - Constants.CMD.READ_GEN_STATUS: - if GRP == Constants.GROUP.GENERATOR: - if data.decode_u32(0xC) == 0: - $manage_panel/get_gen_status/status_ind.text = 'Включен' - $manage_panel/get_gen_status/status_ind.modulate = Color.GREEN - else: - $manage_panel/get_gen_status/status_ind.text = 'Выключен' - $manage_panel/get_gen_status/status_ind.modulate = Color.RED - Constants.CMD.BASE_GET_CURRENT_TEMP: - if GRP == Constants.GROUP.BASE: - $temp_1.text = '%.2f' % data.decode_float(0xC) + ' °C' - $temp_2.text = str(data.decode_float(0x10)) + ' °C' - $temp_3.text = str(data.decode_float(0x14)) + ' °C' - $read.text = str(data.hex_encode()) +# +#func _on_data_received(data: PackedByteArray): + #var GRP = data.decode_u8(0x0) + #var CMD = data.decode_u8(0x1) + #match CMD: + #Constants.CMD.READ_CARRIER: + #if GRP == Constants.GROUP.BASE: + #$manage_panel/get_freq/freq_ind.text = str(data.decode_u64(0xC)) + ' Гц' + #Constants.CMD.READ_ATT: + #if GRP == Constants.GROUP.RF: + #$manage_panel/get_att/att_ind.text = '-' + str(data.decode_float(0x18)) + ' dB' + #Constants.CMD.READ_GEN_STATUS: + #if GRP == Constants.GROUP.GENERATOR: + #if data.decode_u32(0xC) == 0: + #$manage_panel/get_gen_status/status_ind.text = 'Включен' + #$manage_panel/get_gen_status/status_ind.modulate = Color.GREEN + #else: + #$manage_panel/get_gen_status/status_ind.text = 'Выключен' + #$manage_panel/get_gen_status/status_ind.modulate = Color.RED + #Constants.CMD.BASE_GET_CURRENT_TEMP: + #if GRP == Constants.GROUP.BASE: + #$temp_1.text = '%.2f' % data.decode_float(0xC) + ' °C' + #$temp_2.text = str(data.decode_float(0x10)) + ' °C' + #$temp_3.text = str(data.decode_float(0x14)) + ' °C' + #$read.text = str(data.hex_encode()) func _on_send_pressed() -> void: diff --git a/scripts/network.gd b/scripts/network.gd index cf8ad61..f435940 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -2,6 +2,7 @@ extends Node # ЯУ-07 Блок var unit = Yau07.YaU07.new('ЯУ-07Б') +var unit_fs_1 = Fs.FGOS.new() var soc_unicast: Socket var soc_brodcast: Socket var ip_address_yau: String = Constants.ADDRESSES[0][1] @@ -27,6 +28,7 @@ signal yau_read_isa(_unit_isa_ports) signal data_send() signal data_from_fs_1(data:PackedByteArray) +signal data_from_fs_2(data:PackedByteArray) signal port_opened(port_name: String) signal port_closed(port_name: String) signal port_error(error_str: String) @@ -73,7 +75,8 @@ func poll_receive_fs(client: StreamPeerTCP): if peer.get_available_bytes() > 0: var rx_data: PackedByteArray rx_data.append_array(peer.get_data(peer.get_available_bytes())[1]) - emit_signal("data_from_fs_1", rx_data) + #emit_signal("data_from_fs_1", rx_data) + emit_signal("data_from_fs_2", rx_data) emit_signal("port_opened", ip_fs_1) if state_fs == Constants.STATE.SEND: state_fs = Constants.STATE.DONE @@ -209,3 +212,26 @@ func disconnect_fs(client_for_leave): client_for_leave.disconnect_from_host() state_fs = Constants.STATE.IDLE command_stack = [] + + +func start_work_fs(): + unit_fs_1.start_session() + unit_fs_1.base_get_current_temp() + + +func get_fs_gen_status(state_gen): + unit_fs_1.set_gen_state(state_gen) + unit_fs_1.get_gen_state() + unit_fs_1.base_get_current_temp() + + +func set_fs_ferq_carrier(freq: int): + unit_fs_1.set_carrier(freq) + unit_fs_1.base_get_current_temp() + unit_fs_1.get_carrier() + + +func set_fs_attenuation(attenuation: float): + unit_fs_1.set_att_batch(attenuation) + unit_fs_1.get_att_batch() + unit_fs_1.base_get_current_temp() From 6e5f0bed349c28d320c9fa18b1364e0b8cd9b89a Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 7 Feb 2025 00:10:18 +0300 Subject: [PATCH 07/15] modul fs 2 --- PRD_MP550.tscn | 19 +++-- Web.png | Bin 21325 -> 18795 bytes scripts/FS.gd | 3 +- scripts/PRD.gd | 21 ++++-- scripts/modul_fs.gd | 3 +- scripts/network.gd | 174 ++++++++++++++++++++++++++++++++++---------- 6 files changed, 169 insertions(+), 51 deletions(-) diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index a6d11e2..1bcb40f 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -252,9 +252,10 @@ color = Color(0.669446, 0.567301, 0.66881, 1) [node name="ISA" type="Label" parent="."] offset_left = 225.0 offset_top = 11.0 -offset_right = 1853.0 +offset_right = 409.0 offset_bottom = 48.0 autowrap_mode = 3 +metadata/_edit_lock_ = true [node name="read_isa" type="Button" parent="."] offset_left = 85.0 @@ -262,6 +263,7 @@ offset_top = 7.0 offset_right = 210.0 offset_bottom = 38.0 text = "Прочитать ISA" +metadata/_edit_lock_ = true [node name="TabContainer" type="TabContainer" parent="."] offset_left = 216.0 @@ -281,6 +283,7 @@ theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6") tab_alignment = 2 current_tab = 0 tab_focus_mode = 0 +metadata/_edit_lock_ = true [node name="PRD" type="Panel" parent="TabContainer"] layout_mode = 2 @@ -329,13 +332,14 @@ script = ExtResource("2_vmbyo") metadata/_edit_lock_ = true [node name="PSK" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_2_4_6"] -modulate = Color(1, 1, 0.941176, 0.588235) +modulate = Color(1, 1, 0.941176, 0.733333) material = ExtResource("3_3syd3") -position = Vector2(914, 5) -scale = Vector2(0.247968, 0.234167) +position = Vector2(955, 5) +scale = Vector2(0.23, 0.217) texture = SubResource("PlaceholderTexture2D_723du") offset = Vector2(800, 600) script = SubResource("GDScript_0sobq") +metadata/_edit_lock_ = true [node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/body_grid/litera_2_4_6/PSK"] modulate = Color(1, 1, 0.941176, 0.784314) @@ -387,13 +391,14 @@ script = ExtResource("2_vmbyo") metadata/_edit_lock_ = true [node name="PSK2" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_3_5_7"] -modulate = Color(1, 1, 0.941176, 0.588235) +modulate = Color(1, 1, 0.941176, 0.733333) material = ExtResource("3_3syd3") -position = Vector2(914, -6) -scale = Vector2(0.247968, 0.234167) +position = Vector2(955, -6) +scale = Vector2(0.23, 0.217) texture = SubResource("PlaceholderTexture2D_723du") offset = Vector2(800, 600) script = SubResource("GDScript_0sobq") +metadata/_edit_lock_ = true [node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/body_grid/litera_3_5_7/PSK2"] modulate = Color(1, 1, 0.941176, 0.784314) diff --git a/Web.png b/Web.png index 76c19445d71bb6737309086ad26908091a67802a..cceda451947018b87ddb36f69485c1915570ce7b 100644 GIT binary patch literal 18795 zcmc({dpMM97dZUPnK90%F$UvMQP|^seGD(dNqI8h(J$m0g&+Pa6zJGrI{9ISpzV_VfUTfX!UZ;EA>wYraH`AoC z1S|jm(k{;Hwg3PO1OEG40uBDM-BjUk@IR7F=Us;YKuTfhAMDXc!Y=?I0WRwtw#63v z;ZfyurA#=E%jJTgz~W-!*y7^i+Fy%{dwtCdsIB^V6b}6R&lp@8iv~xJEo#9C=%kk4 zqX-E+9{De)zJG>G={*Gdw4y8yxEOH(B8uo4O!@6fJ;YL_}M0Ps;bT z9*#e&UJ#yP&SSZ!lP;)vwwfO^|A;daiQzwx3ih?QXRN?m3|otrtfEE6JBm?C0&$<* z$^fO@2XYjJgRJAdT8Hb*aWDh|@teh^c_u$V8Ns}6(F1G@jo=9L!?5~i`k4=M?&6Bg zcJON?B|fa6#w+1G{zc4$(%awUjSU?*pVkN`@?Z0%@K?f546KgLsrpJDiok2L*ld`H zgaP-FGU-6AY^a>#UYJw;(QMgotJ>Q1R%1Xm3HDQ_)P83XW5gq`UNoKqQe62q&F-7g+>pHA>gEmI_k_#N?bR z6AKvOWyqAd`OM5rDNqgJeet>Wj}XC1?l2MMC0YDI(V`bis28k5^V|Fo`MJO&NBu}M z38O5kCf9}>pBSN(ixX+_e<#d#-Z=DGhoEIK$qGZ4PD>Q1<(J|a<*W_R+Ltg7roS=G z#}G;%|Jil+xz=efL-iUNnI5`2Y8wpFx^wr56+m~1MEr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YF7GL<#vYf4VI4*W)f3pS(@u~%Py;_I_HA*ZEvO259lmZsFtw^zBF z(fhlvp=e96evFky#jzGi^6&XFK|rbSFy8(&FIussIM?*==K5#NjV7&x$Y>JU16E^F zsdND?^bB1=i~WOxc=^$}w9euayoaa2yK(if>kvYAwv87h+m==-xI^ndA@(9PZl$i3 zL|Al=vJQuIN|2XFyP4Wtr=38AzX&sh?oin(@>v_vO zyr4aVNiHlLX2%!ZyUlNiv85_%eVdKuoKAm-m`Hw>3;OCXlz+P7j|$^*QmkS>+gU-i z=0qL+KLyn32RlkwWiS&ZD<%>dcm<4E_Un1Kz(ZIZ;=LT-Bz@{iEeQ0&d#(p}8H}1z zo3_RLG`Jx*xrW9P22Wc*b5md~a_nkX>U6iERScI%Ap5lZH2afPWCeAUdlCO+$0Vk;Eza!$(vav9 MPoKpV?yThh2R9SzWB>pF diff --git a/scripts/FS.gd b/scripts/FS.gd index bb8f0b0..c16846f 100644 --- a/scripts/FS.gd +++ b/scripts/FS.gd @@ -108,7 +108,8 @@ class FGOS: var crc = crc32(packet) packet.resize(packet.size() + 4) packet.encode_u32(packet.size() - 4, crc) - Network.command_stack.append(packet) + #Network.command_stack.append(packet) + Network.command_stack_2.append(packet) func _parse(rx_data: PackedByteArray): diff --git a/scripts/PRD.gd b/scripts/PRD.gd index a8afb7e..c27debc 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -137,6 +137,8 @@ func _ready() -> void: Network.connect('yau_status_line', Callable(self, '_on_yau_status')) Network.connect('yau_receive', Callable(self, '_on_data_received')) Network.connect('yau_read_isa', Callable(self, '_on_read_isa')) + Network.connect('port_fs_opened_1', _on_port_changed_fs_1.bind(Color.GREEN)) + Network.connect('port_fs_opened_2', _on_port_changed_fs_2.bind(Color.GREEN)) Network.connect('data_from_fs_1', _on_data_fs_1) Network.connect('data_from_fs_2', _on_data_fs_2) @@ -418,7 +420,8 @@ func on_btn_select(intem_from_sector: int) -> void: Network.on_command_change_device(meta) flag_mode = meta[2] draw_control_panel_prd(flag_mode) - _on_start_fs_1() + #_on_start_fs_1() + _on_start_fs_2() func _on_zapret1(toggled_on: bool) -> void: @@ -519,7 +522,12 @@ func _on_read_isa_pressed() -> void: func set_bits(v, a, m): return (~m) & v | a & m + ## 1 ФС +func _on_port_changed_fs_1(port_name: String, _color: Color) -> void: + $TabContainer/PRD/body_grid/litera_2_4_6/fs_control.set_node_text(1, 1, port_name) + + func _on_start_fs_1(): Network.start_work_fs() @@ -538,18 +546,21 @@ func _on_set_att_1(att: String): ## 2 ФС +func _on_port_changed_fs_2(port_name: String, _color: Color) -> void: + $TabContainer/PRD/body_grid/litera_3_5_7/fs_control.set_node_text(1, 1, port_name) + func _on_start_fs_2(): - Network.start_work_fs() + Network.start_work_fs_2() func _on_get_status_2(toggled_btn): var inverted_state = not toggled_btn - Network.get_fs_gen_status(inverted_state) + Network.get_fs_gen_status_2(inverted_state) func _on_set_ferq_2(freq: String): - Network.set_fs_ferq_carrier(int(freq) * 1_000_000) + Network.set_fs_ferq_carrier_2(int(freq) * 1_000_000) func _on_set_att_2(att: String): - Network.set_fs_attenuation(float(att)) + Network.set_fs_attenuation_2(float(att)) diff --git a/scripts/modul_fs.gd b/scripts/modul_fs.gd index afa66c2..61677ed 100644 --- a/scripts/modul_fs.gd +++ b/scripts/modul_fs.gd @@ -13,8 +13,9 @@ func _process(_delta: float) -> void: func _enter_tree() -> void: + pass # Подключаем сигналы к методам - Network.connect('data_send', _on_data_send) + #Network.connect('data_send', _on_data_send) #Network.connect('data_from_fs_1', _on_data_received) #Network.connect('port_opened', _on_port_changed.bind(Color.GREEN)) #Network.connect('port_closed', _on_port_changed.bind(Color.GRAY)) diff --git a/scripts/network.gd b/scripts/network.gd index f435940..912ae9d 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -2,7 +2,8 @@ extends Node # ЯУ-07 Блок var unit = Yau07.YaU07.new('ЯУ-07Б') -var unit_fs_1 = Fs.FGOS.new() +#var unit_fs_1 = Fs.FGOS.new() +var unit_fs_2 = Fs.FGOS.new() var soc_unicast: Socket var soc_brodcast: Socket var ip_address_yau: String = Constants.ADDRESSES[0][1] @@ -15,21 +16,30 @@ var state = Constants.STATE.WAIT var send_array: Array = [] # ФС Блок -var ip_fs_1: String = Constants.ADDRESSES[0][4] -var command_stack: Array -var state_fs = Constants.STATE.IDLE var client_fs_1: StreamPeer +var ip_fs_1: String = Constants.ADDRESSES[0][4] var peerstream_fs_1: PacketPeer +var state_fs = Constants.STATE.IDLE +var command_stack: Array + +## 2 ФС +var client_fs_2: StreamPeer +var ip_fs_2: String = Constants.ADDRESSES[0][5] +var peerstream_fs_2: PacketPeer +var state_fs_2 = Constants.STATE.IDLE +var command_stack_2: Array signal yau_status_line(_status) ## Вызывается когда меняется состояние связи с ячейкой signal yau_receive(_data_from_yau) signal yau_read_isa(_unit_isa_ports) -signal data_send() +#signal data_send() +#signal data_send_2() signal data_from_fs_1(data:PackedByteArray) signal data_from_fs_2(data:PackedByteArray) -signal port_opened(port_name: String) +signal port_fs_opened_1(port_name: String) +signal port_fs_opened_2(port_name: String) signal port_closed(port_name: String) signal port_error(error_str: String) @@ -60,24 +70,24 @@ func poll_receive_yau07(sock: Socket) -> bool: ## Приёмник return false -func poll_receive_fs(client: StreamPeerTCP): +func poll_receive_fs(client: StreamPeerTCP, peerstream: PacketPeer, ip_fs: String): client.poll() - var peer = peerstream_fs_1.get_stream_peer() + var peer = peerstream.get_stream_peer() # Проверяем, существует ли соединение if not peer: - emit_signal("port_error", ip_fs_1) + emit_signal("port_error", ip_fs) return # Проверяем состояние подключения if client.get_status() != StreamPeerTCP.STATUS_CONNECTED: - emit_signal("port_closed", ip_fs_1) + emit_signal("port_closed", ip_fs) return if peer.get_available_bytes() > 0: var rx_data: PackedByteArray rx_data.append_array(peer.get_data(peer.get_available_bytes())[1]) - #emit_signal("data_from_fs_1", rx_data) - emit_signal("data_from_fs_2", rx_data) - emit_signal("port_opened", ip_fs_1) + emit_signal("data_from_fs_1", rx_data) + #emit_signal("data_from_fs_2", rx_data) + emit_signal("port_fs_opened_1", ip_fs) if state_fs == Constants.STATE.SEND: state_fs = Constants.STATE.DONE @@ -96,7 +106,8 @@ func _ready() -> void: unit.connect('line_changed', Callable(self, 'on_line_changed')) unit.connect('command_fail', Callable(self, 'on_command_fail')) - connect_fs() + #connect_fs_1() + connect_fs_2() read_port_isa([0x106, 0x108]) @@ -106,13 +117,16 @@ func _process(delta: float) -> void: last_update_time_fs += delta if client_fs_1: - poll_receive_fs(client_fs_1) + poll_receive_fs(client_fs_1, peerstream_fs_1, ip_fs_1) + if client_fs_2: + poll_receive_fs_2(client_fs_2, peerstream_fs_2, ip_fs_2) poll_receive_yau07(soc_brodcast) poll_receive_yau07(soc_unicast) state_machine_yau07() - state_machine_fs() + #state_machine_fs() + state_machine_fs_2() match unit.process(delta): Error.OK: soc_unicast.send_to(ip_address_yau, ip_port_yau, unit.tx_data.slice(0, unit.tx_len)) @@ -169,9 +183,10 @@ func on_command_change_device(meta_device): ip_address_yau = meta_device[0] ip_port_yau = meta_device[1] ip_fs_1 = meta_device[3] - #ip_fs_2 = meta_device[4] + ip_fs_2 = meta_device[4] #ip_fs_3 = meta_device[5] - connect_fs() + #connect_fs_1() + connect_fs_2() func state_machine_fs(): @@ -180,12 +195,12 @@ func state_machine_fs(): if (state_fs == Constants.STATE.IDLE) or (state_fs == Constants.STATE.DONE): if command_stack: var pack: Array = command_stack.pop_front() - send_data(pack) + send_fs_data_1(pack) state_fs = Constants.STATE.SEND # Подключится к модулю ФС -func connect_fs(): +func connect_fs_1(): if client_fs_1: disconnect_fs(client_fs_1) @@ -199,7 +214,7 @@ func connect_fs(): # Отправить команду для ФС -func send_data(data_to_sand: PackedByteArray): +func send_fs_data_1(data_to_sand: PackedByteArray): if client_fs_1.get_status() == 2: var peer = peerstream_fs_1.get_stream_peer() if peer: @@ -213,25 +228,110 @@ func disconnect_fs(client_for_leave): state_fs = Constants.STATE.IDLE command_stack = [] - -func start_work_fs(): - unit_fs_1.start_session() - unit_fs_1.base_get_current_temp() +# +#func start_work_fs(): + #unit_fs_1.start_session() + #unit_fs_1.base_get_current_temp() +# +# +#func get_fs_gen_status(state_gen): + #unit_fs_1.set_gen_state(state_gen) + #unit_fs_1.get_gen_state() + #unit_fs_1.base_get_current_temp() +# +# +#func set_fs_ferq_carrier(freq: int): + #unit_fs_1.set_carrier(freq) + #unit_fs_1.base_get_current_temp() + #unit_fs_1.get_carrier() +# +# +#func set_fs_attenuation(attenuation: float): + #unit_fs_1.set_att_batch(attenuation) + #unit_fs_1.get_att_batch() + #unit_fs_1.base_get_current_temp() -func get_fs_gen_status(state_gen): - unit_fs_1.set_gen_state(state_gen) - unit_fs_1.get_gen_state() - unit_fs_1.base_get_current_temp() +## 2 ФС коннект +func connect_fs_2(): + if client_fs_2: + disconnect_fs_2(client_fs_2) + + client_fs_2 = StreamPeerTCP.new() + peerstream_fs_2 = PacketPeerStream.new() + var rc = client_fs_2.connect_to_host(ip_fs_2, Constants.PORT_FS) + if rc!= Error.OK: + print_debug('Port error %s' % ip_fs_2) + #emit_signal("port_error", ip_fs_2) + else: + peerstream_fs_2.set_stream_peer(client_fs_2) -func set_fs_ferq_carrier(freq: int): - unit_fs_1.set_carrier(freq) - unit_fs_1.base_get_current_temp() - unit_fs_1.get_carrier() +# Разорвать соединение с ФС +func disconnect_fs_2(client_for_leave): + client_for_leave.disconnect_from_host() + state_fs_2 = Constants.STATE.IDLE + command_stack_2 = [] + + +# Отправить команду для ФС +func send_fs_data_2(data_to_sand: PackedByteArray): + if client_fs_2.get_status() == 2: + var peer = peerstream_fs_2.get_stream_peer() + if peer: + peer.put_data(data_to_sand) + emit_signal("data_send_2") -func set_fs_attenuation(attenuation: float): - unit_fs_1.set_att_batch(attenuation) - unit_fs_1.get_att_batch() - unit_fs_1.base_get_current_temp() +func state_machine_fs_2(): + if client_fs_2: + ## State fs_2 machine + if (state_fs_2 == Constants.STATE.IDLE) or (state_fs_2 == Constants.STATE.DONE): + if command_stack_2: + var pack: Array = command_stack_2.pop_front() + send_fs_data_2(pack) + state_fs_2 = Constants.STATE.SEND + + +func poll_receive_fs_2(client: StreamPeerTCP, peerstream: PacketPeer, ip_fs: String): + client.poll() + var peer = peerstream.get_stream_peer() + # Проверяем, существует ли соединение + if not peer: + emit_signal("port_error", ip_fs) + return + # Проверяем состояние подключения + if client.get_status() != StreamPeerTCP.STATUS_CONNECTED: + emit_signal("port_closed", ip_fs) + return + + if peer.get_available_bytes() > 0: + var rx_data: PackedByteArray + rx_data.append_array(peer.get_data(peer.get_available_bytes())[1]) + emit_signal("data_from_fs_2", rx_data) + emit_signal("port_fs_opened_2", ip_fs) + if state_fs_2 == Constants.STATE.SEND: + state_fs_2 = Constants.STATE.DONE + + +func start_work_fs_2(): + unit_fs_2.start_session() + unit_fs_2.base_get_current_temp() + + +func get_fs_gen_status_2(state_gen): + unit_fs_2.set_gen_state(state_gen) + unit_fs_2.get_gen_state() + unit_fs_2.base_get_current_temp() + + +func set_fs_ferq_carrier_2(freq: int): + unit_fs_2.set_carrier(freq) + unit_fs_2.base_get_current_temp() + unit_fs_2.get_carrier() + + +func set_fs_attenuation_2(attenuation: float): + unit_fs_2.set_att_batch(attenuation) + unit_fs_2.get_att_batch() + unit_fs_2.base_get_current_temp() From 2f93972202ee252fb541d41e1127d687ebcbe1ea Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 7 Feb 2025 01:06:50 +0300 Subject: [PATCH 08/15] modul fs 3 --- scripts/ems_g.gd | 2 ++ scripts/network.gd | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/ems_g.gd b/scripts/ems_g.gd index d6c68a2..9587824 100644 --- a/scripts/ems_g.gd +++ b/scripts/ems_g.gd @@ -151,6 +151,8 @@ func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_nod set_frame(CI_2_FS, frame_type) if i == 10: set_frame(get_specific_node(parent_node2, 4), frame_type) + 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) func get_specific_node(parent_node2: Node, child_index: int)-> Node: diff --git a/scripts/network.gd b/scripts/network.gd index 912ae9d..69f7985 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -29,13 +29,11 @@ var peerstream_fs_2: PacketPeer var state_fs_2 = Constants.STATE.IDLE var command_stack_2: Array - +# Яу-07б signal yau_status_line(_status) ## Вызывается когда меняется состояние связи с ячейкой signal yau_receive(_data_from_yau) signal yau_read_isa(_unit_isa_ports) - -#signal data_send() -#signal data_send_2() +# ФС модуль signal data_from_fs_1(data:PackedByteArray) signal data_from_fs_2(data:PackedByteArray) signal port_fs_opened_1(port_name: String) @@ -44,7 +42,6 @@ signal port_closed(port_name: String) signal port_error(error_str: String) - ## Класс для отправки данных в сокет class Socket extends PacketPeerUDP: func send_to(addr: String, port: int, data: PackedByteArray): @@ -280,7 +277,6 @@ func send_fs_data_2(data_to_sand: PackedByteArray): var peer = peerstream_fs_2.get_stream_peer() if peer: peer.put_data(data_to_sand) - emit_signal("data_send_2") func state_machine_fs_2(): From c342115adf2b082adf92e5d9e8b8d4ad7ab08969 Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 7 Feb 2025 04:14:27 +0300 Subject: [PATCH 09/15] module fs 4 --- PRD57EF.tmp | 1003 +++++++++++++++++++++++++++++++++++++++++++ scripts/FS.gd | 91 ++-- scripts/PRD.gd | 4 +- scripts/modul_fs.gd | 16 +- scripts/network.gd | 180 ++++---- 5 files changed, 1150 insertions(+), 144 deletions(-) create mode 100644 PRD57EF.tmp diff --git a/PRD57EF.tmp b/PRD57EF.tmp new file mode 100644 index 0000000..1bcb40f --- /dev/null +++ b/PRD57EF.tmp @@ -0,0 +1,1003 @@ +[gd_scene load_steps=50 format=3 uid="uid://cvor2jm4xk3ha"] + +[ext_resource type="Script" path="res://scripts/PRD.gd" id="1_v273n"] +[ext_resource type="Texture2D" uid="uid://cdxdluvyb5uei" path="res://table/on.png" id="2_dv7xx"] +[ext_resource type="Script" path="res://table/table.gd" id="2_vmbyo"] +[ext_resource type="Material" uid="uid://s6xe8igevnv2" path="res://Shaders/shader_edu.tres" id="3_3syd3"] +[ext_resource type="Texture2D" uid="uid://cfktmk2rowmul" path="res://table/off.png" id="3_qvuyu"] +[ext_resource type="Shader" path="res://Shaders/ray.gdshader" id="4_uy5o2"] +[ext_resource type="Texture2D" uid="uid://co8dxcd8eckjs" path="res://Web.png" id="5_i3nvb"] +[ext_resource type="Shader" path="res://ray_2.gdshader" id="8_12mng"] +[ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="9_0r2qk"] +[ext_resource type="Script" path="res://scripts/control_panel.gd" id="9_akagi"] +[ext_resource type="Script" path="res://scripts/ems_g.gd" id="9_g1wia"] +[ext_resource type="Shader" path="res://load.gdshader" id="10_lf1xh"] +[ext_resource type="PackedScene" uid="uid://bdb0bhfu7366l" path="res://kasseta-fs-kd.tscn" id="10_tdh2s"] +[ext_resource type="PackedScene" uid="uid://bnlkbbn7b4a3k" path="res://table/элемент-эмс.tscn" id="11_d60jk"] +[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://table/элемент-в.tscn" id="11_fg7ul"] +[ext_resource type="Script" path="res://scripts/modul_fs.gd" id="15_b4pr1"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eib3t"] +bg_color = Color(0.223529, 0.168627, 0.223529, 1) +border_width_bottom = 6 +border_color = Color(0.228592, 0.173062, 0.22863, 1) +border_blend = true + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o0too"] +bg_color = Color(0.223529, 0.168627, 0.223529, 1) +border_width_bottom = 6 +border_color = Color(0.339047, 0.26316, 0.339004, 1) +border_blend = true + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gooip"] +bg_color = Color(0.143, 0.103, 0.143, 0.799) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lqhgx"] +bg_color = Color(0, 0, 0, 0.490196) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_148rs"] +bg_color = Color(0.141176, 0.101961, 0.141176, 0.8) +border_width_bottom = 4 +border_color = Color(0.223529, 0.168627, 0.223529, 1) +border_blend = true +corner_radius_top_left = 2 +corner_radius_top_right = 2 +corner_radius_bottom_right = 2 +corner_radius_bottom_left = 2 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ldbvf"] +bg_color = Color(0.141176, 0.101961, 0.141176, 0.8) + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_h8aei"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_d322q"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_8j02b"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ls6vm"] + +[sub_resource type="Theme" id="Theme_k5ur4"] +Button/styles/focus = SubResource("StyleBoxFlat_eib3t") +Button/styles/hover = SubResource("StyleBoxFlat_o0too") +Button/styles/normal = SubResource("StyleBoxFlat_o0too") +Button/styles/pressed = SubResource("StyleBoxFlat_eib3t") +CheckButton/icons/checked = ExtResource("2_dv7xx") +CheckButton/icons/unchecked = ExtResource("3_qvuyu") +OptionButton/font_sizes/font_size = 17 +OptionButton/styles/focus = SubResource("StyleBoxFlat_gooip") +OptionButton/styles/hover = SubResource("StyleBoxFlat_lqhgx") +OptionButton/styles/normal = SubResource("StyleBoxFlat_148rs") +OptionButton/styles/pressed = SubResource("StyleBoxFlat_ldbvf") +TabContainer/styles/panel = SubResource("StyleBoxTexture_h8aei") +TabContainer/styles/tab_focus = SubResource("StyleBoxTexture_d322q") +TabContainer/styles/tab_selected = SubResource("StyleBoxTexture_8j02b") +TabContainer/styles/tabbar_background = SubResource("StyleBoxTexture_ls6vm") + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pxarn"] +bg_color = Color(0.356863, 0.278431, 0.356863, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p247y"] +bg_color = Color(0.356863, 0.278431, 0.356863, 1) + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_rh6pm"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_x11tp"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_mn8w2"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_21lc8"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_k08q3"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_dklg6"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_17le6"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_7u7p7"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_1as41"] + +[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_723du"] +size = Vector2(1600, 1200) + +[sub_resource type="GDScript" id="GDScript_0sobq"] +script/source = "extends Sprite2D + +" + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_o7txs"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_dgiai"] +shader = ExtResource("4_uy5o2") +shader_parameter/color_signal = Color(0.588235, 0.466667, 0, 1) +shader_parameter/turn = 0.785 +shader_parameter/inner_radius = 0.32 + +[sub_resource type="Gradient" id="Gradient_ki0n7"] + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_0pk2o"] +gradient = SubResource("Gradient_ki0n7") +fill_from = Vector2(0.474359, 0.5) +metadata/_snap_enabled = true + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_2pxu2"] +shader = ExtResource("8_12mng") +shader_parameter/color_signal = Color(0.588242, 0.466356, 0, 1) +shader_parameter/turn = 0.785 +shader_parameter/inner_radius = 0.32 + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_tn8m6"] + +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ooo4i"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_slcfo"] +shader = ExtResource("10_lf1xh") +shader_parameter/frequency = 5.0 +shader_parameter/amplitude = 600.0 +shader_parameter/speed = 5.0 +shader_parameter/direction = -1.0 +shader_parameter/color1 = Color(0, 0, 0, 1) +shader_parameter/color2 = Color(0.235, 0.18, 0.235, 1) +shader_parameter/color3 = Color(0.235, 0.18, 0.235, 0.5) +shader_parameter/color4 = Color(0, 0, 0, 0) +shader_parameter/opacity = 0.218 +shader_parameter/turn = 0.785 + +[sub_resource type="Theme" id="Theme_yblys"] +CheckBox/font_sizes/font_size = 14 + +[node name="Node2D" type="Node2D"] +script = ExtResource("1_v273n") + +[node name="Background" type="ColorRect" parent="."] +offset_right = 3025.0 +offset_bottom = 1060.0 +theme = SubResource("Theme_k5ur4") +color = Color(0.356863, 0.278431, 0.356863, 1) +metadata/_edit_lock_ = true + +[node name="side_panel" type="ColorRect" parent="Background"] +layout_mode = 0 +offset_right = 216.0 +offset_bottom = 988.0 +color = Color(0.586231, 0.481877, 0.585869, 1) + +[node name="select_prd" type="Button" parent="Background/side_panel"] +layout_mode = 0 +offset_top = 120.0 +offset_right = 216.0 +offset_bottom = 156.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_font_sizes/font_size = 14 +theme_override_styles/pressed = SubResource("StyleBoxFlat_pxarn") +toggle_mode = true +button_pressed = true +text = "ПРД" + +[node name="select_control" type="Button" parent="Background/side_panel"] +layout_mode = 0 +offset_top = 160.0 +offset_right = 216.0 +offset_bottom = 196.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_font_sizes/font_size = 14 +theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") +toggle_mode = true +text = "КОНТРОЛЬ" + +[node name="select_ems_g" type="Button" parent="Background/side_panel"] +layout_mode = 0 +offset_top = 200.0 +offset_right = 216.0 +offset_bottom = 236.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_font_sizes/font_size = 14 +theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") +toggle_mode = true +text = "ЭМС Г" + +[node name="select_fs" type="Button" parent="Background/side_panel"] +layout_mode = 0 +offset_top = 241.0 +offset_right = 216.0 +offset_bottom = 277.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_font_sizes/font_size = 14 +theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") +toggle_mode = true +text = "Модуль ФС" + +[node name="save_config" type="Button" parent="Background/side_panel"] +layout_mode = 0 +offset_top = 832.0 +offset_right = 216.0 +offset_bottom = 868.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_font_sizes/font_size = 14 +theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") +text = "Сохранить" + +[node name="load_config" type="Button" parent="Background/side_panel"] +layout_mode = 0 +offset_top = 872.0 +offset_right = 216.0 +offset_bottom = 908.0 +focus_mode = 0 +mouse_default_cursor_shape = 2 +theme_override_font_sizes/font_size = 14 +theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") +text = "Загрузить" + +[node name="Litera_3_5_7" type="ColorRect" parent="Background"] +visible = false +layout_mode = 0 +offset_top = 48.0 +offset_right = 1941.0 +offset_bottom = 352.0 +color = Color(0.669446, 0.567301, 0.66881, 1) + +[node name="Litera_1" type="ColorRect" parent="Background"] +visible = false +layout_mode = 0 +offset_top = 359.0 +offset_right = 2182.0 +offset_bottom = 638.0 +color = Color(0.669446, 0.567301, 0.66881, 1) + +[node name="ISA" type="Label" parent="."] +offset_left = 225.0 +offset_top = 11.0 +offset_right = 409.0 +offset_bottom = 48.0 +autowrap_mode = 3 +metadata/_edit_lock_ = true + +[node name="read_isa" type="Button" parent="."] +offset_left = 85.0 +offset_top = 7.0 +offset_right = 210.0 +offset_bottom = 38.0 +text = "Прочитать ISA" +metadata/_edit_lock_ = true + +[node name="TabContainer" type="TabContainer" parent="."] +offset_left = 216.0 +offset_top = 39.0 +offset_right = 2420.0 +offset_bottom = 917.0 +theme = SubResource("Theme_k5ur4") +theme_override_colors/font_unselected_color = Color(0, 0, 0, 0.0392157) +theme_override_colors/font_selected_color = Color(0, 0, 0, 0) +theme_override_styles/tab_focus = SubResource("StyleBoxTexture_rh6pm") +theme_override_styles/tab_disabled = SubResource("StyleBoxTexture_x11tp") +theme_override_styles/tabbar_background = SubResource("StyleBoxTexture_mn8w2") +theme_override_styles/panel = SubResource("StyleBoxTexture_21lc8") +theme_override_styles/tab_selected = SubResource("StyleBoxTexture_k08q3") +theme_override_styles/tab_hovered = SubResource("StyleBoxTexture_dklg6") +theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6") +tab_alignment = 2 +current_tab = 0 +tab_focus_mode = 0 +metadata/_edit_lock_ = true + +[node name="PRD" type="Panel" parent="TabContainer"] +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7") +metadata/_tab_index = 0 +metadata/_edit_lock_ = true + +[node name="body_grid" type="GridContainer" parent="TabContainer/PRD"] +layout_mode = 0 +offset_left = 376.0 +offset_top = -4.0 +offset_right = 1648.0 +offset_bottom = 718.0 + +[node name="litera_2_4_6" type="GridContainer" parent="TabContainer/PRD/body_grid"] +clip_contents = true +custom_minimum_size = Vector2(700, 300) +layout_mode = 2 +size_flags_horizontal = 3 +columns = 5 + +[node name="fs_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"] +custom_minimum_size = Vector2(350, 0) +layout_mode = 2 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="space" type="Panel" parent="TabContainer/PRD/body_grid/litera_2_4_6"] +custom_minimum_size = Vector2(50, 0) +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_1as41") + +[node name="yau07b_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"] +layout_mode = 2 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="space2" type="Panel" parent="TabContainer/PRD/body_grid/litera_2_4_6"] +custom_minimum_size = Vector2(50, 0) +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_1as41") + +[node name="table_ukp_1" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"] +layout_mode = 2 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="PSK" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_2_4_6"] +modulate = Color(1, 1, 0.941176, 0.733333) +material = ExtResource("3_3syd3") +position = Vector2(955, 5) +scale = Vector2(0.23, 0.217) +texture = SubResource("PlaceholderTexture2D_723du") +offset = Vector2(800, 600) +script = SubResource("GDScript_0sobq") +metadata/_edit_lock_ = true + +[node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/body_grid/litera_2_4_6/PSK"] +modulate = Color(1, 1, 0.941176, 0.784314) +material = SubResource("ShaderMaterial_o7txs") +offset_left = 554.954 +offset_top = -30.0 +offset_right = 1290.95 +offset_bottom = 1134.0 +texture = ExtResource("5_i3nvb") +expand_mode = 1 +metadata/_edit_lock_ = true + +[node name="ray_1" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_2_4_6/PSK"] +material = SubResource("ShaderMaterial_dgiai") +position = Vector2(549.221, 543.623) +scale = Vector2(21.8765, 21.6782) +texture = SubResource("GradientTexture2D_0pk2o") +metadata/_edit_lock_ = true + +[node name="litera_3_5_7" type="GridContainer" parent="TabContainer/PRD/body_grid"] +custom_minimum_size = Vector2(500, 350) +layout_mode = 2 +columns = 5 + +[node name="fs_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_3_5_7"] +custom_minimum_size = Vector2(350, 0) +layout_mode = 2 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="space" type="Panel" parent="TabContainer/PRD/body_grid/litera_3_5_7"] +custom_minimum_size = Vector2(50, 0) +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_1as41") + +[node name="yau07b_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_3_5_7"] +layout_mode = 2 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="space2" type="Panel" parent="TabContainer/PRD/body_grid/litera_3_5_7"] +custom_minimum_size = Vector2(50, 0) +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_1as41") + +[node name="table_ukp_2" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_3_5_7"] +layout_mode = 2 +script = ExtResource("2_vmbyo") +metadata/_edit_lock_ = true + +[node name="PSK2" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_3_5_7"] +modulate = Color(1, 1, 0.941176, 0.733333) +material = ExtResource("3_3syd3") +position = Vector2(955, -6) +scale = Vector2(0.23, 0.217) +texture = SubResource("PlaceholderTexture2D_723du") +offset = Vector2(800, 600) +script = SubResource("GDScript_0sobq") +metadata/_edit_lock_ = true + +[node name="PSK grad" type="TextureRect" parent="TabContainer/PRD/body_grid/litera_3_5_7/PSK2"] +modulate = Color(1, 1, 0.941176, 0.784314) +show_behind_parent = true +material = SubResource("ShaderMaterial_o7txs") +offset_left = 554.954 +offset_top = -30.0 +offset_right = 1290.95 +offset_bottom = 1134.0 +texture = ExtResource("5_i3nvb") +expand_mode = 1 +metadata/_edit_lock_ = true + +[node name="ray_2" type="Sprite2D" parent="TabContainer/PRD/body_grid/litera_3_5_7/PSK2"] +material = SubResource("ShaderMaterial_2pxu2") +position = Vector2(549.221, 539.353) +scale = Vector2(21.8765, 21.6782) +texture = SubResource("GradientTexture2D_0pk2o") +metadata/_edit_lock_ = true + +[node name="select_dev" type="GridContainer" parent="TabContainer/PRD"] +layout_mode = 2 +offset_left = 16.0 +offset_top = 11.0 +offset_right = 16.0 +offset_bottom = 11.0 +script = ExtResource("2_vmbyo") +node_gap = Vector2(100, 50) + +[node name="ControlPanel" type="Panel" parent="TabContainer"] +visible = false +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6") +script = ExtResource("9_akagi") +metadata/_tab_index = 1 +metadata/_edit_lock_ = true + +[node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"] +layout_mode = 0 +offset_left = 4.0 +offset_top = 21.0 +offset_right = 624.0 +offset_bottom = 52.0 +theme_override_font_sizes/font_size = 22 +text = "Контроль исправности прибора ПРД-Н" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="soc_y5" type="NinePatchRect" parent="TabContainer/ControlPanel"] +layout_mode = 0 +offset_left = 199.0 +offset_top = 103.0 +offset_right = 516.0 +offset_bottom = 293.0 +texture = ExtResource("9_0r2qk") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 + +[node name="ref_A24" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +offset_left = 9.0 +offset_top = 34.0 +offset_right = 59.0 +offset_bottom = 184.0 +textures = Array[Texture]([]) +fname = "ИП-25" +rname = "A24" +metadata/_edit_lock_ = true + +[node name="ref_A30" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +offset_left = 59.0 +offset_top = 34.0 +offset_right = 109.0 +offset_bottom = 184.0 +textures = Array[Texture]([]) +fname = "ЯУ-07" +rname = "A30" +metadata/_edit_lock_ = true + +[node name="ref_A26" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +offset_left = 109.0 +offset_top = 34.0 +offset_right = 159.0 +offset_bottom = 184.0 +textures = Array[Texture]([]) +fname = "ЭМС-Г" +rname = "A26" +metadata/_edit_lock_ = true + +[node name="ref_A27" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +offset_left = 159.0 +offset_top = 34.0 +offset_right = 209.0 +offset_bottom = 184.0 +textures = Array[Texture]([]) +fname = "УГ" +rname = "A27" +metadata/_edit_lock_ = true + +[node name="ref_A28" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +offset_left = 209.0 +offset_top = 34.0 +offset_right = 259.0 +offset_bottom = 183.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 149) +fname = "УКП-1" +rname = "A28" +metadata/_edit_lock_ = true + +[node name="ref_A29" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +offset_left = 259.0 +offset_top = 34.0 +offset_right = 309.0 +offset_bottom = 184.0 +textures = Array[Texture]([]) +fname = "УКП-2" +rname = "A29" +metadata/_edit_lock_ = true + +[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_y5"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 309.0 +offset_bottom = 33.0 +text = "Кассета У5" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="soc_fs-nkvd" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")] +layout_mode = 0 +offset_left = 198.0 +offset_top = 311.0 +offset_right = 516.0 +offset_bottom = 538.0 +script = null + +[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_fs-nkvd"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 299.0 +offset_bottom = 33.0 +text = "Кассета ФС-НД" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_lock_ = true + +[node name="ref_A3" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +offset_left = 109.0 +offset_top = 68.0 +offset_right = 159.0 +offset_bottom = 218.0 +textures = Array[Texture]([]) +fname = "ФС-2" +rname = "A3" +metadata/_edit_lock_ = true + +[node name="ref_A1" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +offset_left = 159.0 +offset_top = 68.0 +offset_right = 209.0 +offset_bottom = 218.0 +textures = Array[Texture]([]) +fname = "Модуль" +rname = "A1" +metadata/_edit_lock_ = true + +[node name="ref_A2" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +offset_left = 209.0 +offset_top = 68.0 +offset_right = 259.0 +offset_bottom = 217.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 149) +fname = "Модуль" +rname = "A2" +metadata/_edit_lock_ = true + +[node name="ref_A4" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +offset_left = 259.0 +offset_top = 68.0 +offset_right = 309.0 +offset_bottom = 218.0 +textures = Array[Texture]([]) +fname = "ФС-3" +rname = "A4" +metadata/_edit_lock_ = true + +[node name="soc_P1" type="NinePatchRect" parent="TabContainer/ControlPanel"] +layout_mode = 0 +offset_left = 96.0 +offset_top = 560.0 +offset_right = 516.0 +offset_bottom = 776.0 +texture = ExtResource("9_0r2qk") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 + +[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_P1"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 409.0 +offset_bottom = 33.0 +text = "Кассета П-1" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_lock_ = true + +[node name="ref_A23" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 40.0 +offset_top = -206.0 +offset_right = 90.0 +offset_bottom = -32.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) + +[node name="ref_A24" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 40.0 +offset_top = -448.0 +offset_right = 90.0 +offset_bottom = -274.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) + +[node name="ref_A25" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 109.0 +offset_top = 34.0 +offset_right = 159.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +metadata/_edit_lock_ = true + +[node name="ref_A26" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 159.0 +offset_top = 34.0 +offset_right = 209.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +metadata/_edit_lock_ = true + +[node name="ref_A27" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 209.0 +offset_top = 34.0 +offset_right = 259.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +metadata/_edit_lock_ = true + +[node name="ref_A28" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +visible = false +offset_left = 259.0 +offset_top = 34.0 +offset_right = 309.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +metadata/_edit_lock_ = true + +[node name="ref_A29" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +visible = false +offset_left = 309.0 +offset_top = 34.0 +offset_right = 359.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +metadata/_edit_lock_ = true + +[node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"] +layout_mode = 0 +offset_left = 536.0 +offset_top = 550.0 +offset_right = 1055.0 +offset_bottom = 777.0 +texture = ExtResource("9_0r2qk") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 + +[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/Signal_EMS_G"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 508.0 +offset_bottom = 33.0 +text = "ЭМС-Г" +horizontal_alignment = 1 +vertical_alignment = 1 +metadata/_edit_lock_ = true + +[node name="ref_A22" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 9.0 +offset_top = 38.0 +offset_right = 59.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "A22" +metadata/_edit_lock_ = true + +[node name="ref_A23" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 59.0 +offset_top = 38.0 +offset_right = 109.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "A23" +metadata/_edit_lock_ = true + +[node name="ref_A26" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 109.0 +offset_top = 38.0 +offset_right = 159.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "A26" +metadata/_edit_lock_ = true + +[node name="ref_A27" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 159.0 +offset_top = 38.0 +offset_right = 209.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "A27" +metadata/_edit_lock_ = true + +[node name="ref_A28" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 209.0 +offset_top = 38.0 +offset_right = 259.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "A28" +metadata/_edit_lock_ = true + +[node name="ref_A29" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 259.0 +offset_top = 38.0 +offset_right = 309.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "A29" +metadata/_edit_lock_ = true + +[node name="ref_A31" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 309.0 +offset_top = 38.0 +offset_right = 359.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "УМ2" +metadata/_edit_lock_ = true + +[node name="ref_A32" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 359.0 +offset_top = 38.0 +offset_right = 409.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "УМ3" +metadata/_edit_lock_ = true + +[node name="ref_A33" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 409.0 +offset_top = 38.0 +offset_right = 459.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "A33" +metadata/_edit_lock_ = true + +[node name="ref_A34" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] +offset_left = 459.0 +offset_top = 38.0 +offset_right = 509.0 +offset_bottom = 216.0 +self_size = Vector2i(50, 178) +rname = "A33" +metadata/_edit_lock_ = true + +[node name="EMS_G" type="Panel" parent="TabContainer"] +visible = false +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_ooo4i") +script = ExtResource("9_g1wia") +metadata/_tab_index = 2 +metadata/_edit_lock_ = true + +[node name="table1" type="GridContainer" parent="TabContainer/EMS_G"] +layout_mode = 2 +offset_left = 35.0 +offset_top = 60.0 +offset_right = 35.0 +offset_bottom = 60.0 +script = ExtResource("2_vmbyo") + +[node name="load_boadr" type="ColorRect" parent="TabContainer/EMS_G"] +layout_mode = 0 +offset_left = 35.0 +offset_top = 58.0 +offset_right = 1604.0 +offset_bottom = 782.0 +color = Color(0, 0, 0, 0.596078) +metadata/_edit_lock_ = true + +[node name="load" type="Sprite2D" parent="TabContainer/EMS_G/load_boadr"] +material = SubResource("ShaderMaterial_slcfo") +position = Vector2(785.001, 361.5) +scale = Vector2(24.5313, 11.2656) +texture = SubResource("GradientTexture2D_0pk2o") +metadata/_edit_lock_ = true + +[node name="Load_text" type="Label" parent="TabContainer/EMS_G/load_boadr"] +layout_mode = 0 +offset_left = 693.0 +offset_top = 341.0 +offset_right = 849.0 +offset_bottom = 380.0 +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_colors/font_shadow_color = Color(0.427493, 0.427493, 0.427493, 1) +theme_override_font_sizes/font_size = 28 +text = "Загрузка ..." + +[node name="Modul_fs" type="Panel" parent="TabContainer"] +visible = false +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxTexture_ooo4i") +script = ExtResource("15_b4pr1") +metadata/_tab_index = 3 +metadata/_edit_lock_ = true + +[node name="set_space" type="GridContainer" parent="TabContainer/Modul_fs"] +layout_mode = 0 +offset_left = 211.0 +offset_top = 378.0 +offset_right = 854.0 +offset_bottom = 418.0 +columns = 2 + +[node name="set_ferq" type="Button" parent="TabContainer/Modul_fs/set_space"] +custom_minimum_size = Vector2(100, 0) +layout_mode = 2 +text = " Set н/ч" + +[node name="write_to_set_freq" type="LineEdit" parent="TabContainer/Modul_fs/set_space"] +custom_minimum_size = Vector2(300, 0) +layout_mode = 2 +text = "500" +placeholder_text = "Частота" + +[node name="measurement" type="Label" parent="TabContainer/Modul_fs/set_space/write_to_set_freq"] +layout_mode = 0 +offset_left = 313.0 +offset_top = 2.0 +offset_right = 365.0 +offset_bottom = 30.0 +text = "МГц" + +[node name="set_att2" type="Button" parent="TabContainer/Modul_fs/set_space"] +custom_minimum_size = Vector2(100, 0) +layout_mode = 2 +text = " Set att" + +[node name="write_to_set_att" type="LineEdit" parent="TabContainer/Modul_fs/set_space"] +custom_minimum_size = Vector2(300, 0) +layout_mode = 2 +text = "38.75" +placeholder_text = "-38.75 to 0" + +[node name="measurement" type="Label" parent="TabContainer/Modul_fs/set_space/write_to_set_att"] +layout_mode = 0 +offset_left = 313.0 +offset_top = 2.0 +offset_right = 351.0 +offset_bottom = 30.0 +text = "dB" + +[node name="manage_panel" type="GridContainer" parent="TabContainer/Modul_fs"] +layout_mode = 0 +offset_left = 200.0 +offset_top = 186.0 +offset_right = 805.0 +offset_bottom = 308.0 +columns = 5 +metadata/_edit_lock_ = true + +[node name="con" type="Button" parent="TabContainer/Modul_fs/manage_panel"] +layout_mode = 2 +text = " Подключение " + +[node name="ip_connect" type="Label" parent="TabContainer/Modul_fs/manage_panel/con"] +layout_mode = 0 +offset_top = 32.0 +offset_right = 118.0 +offset_bottom = 55.0 + +[node name="get_freq" type="Button" parent="TabContainer/Modul_fs/manage_panel"] +layout_mode = 2 +text = " Получить н/ч " + +[node name="freq_ind" type="Label" parent="TabContainer/Modul_fs/manage_panel/get_freq"] +layout_mode = 0 +offset_top = 32.0 +offset_right = 106.0 +offset_bottom = 55.0 + +[node name="get_att" type="Button" parent="TabContainer/Modul_fs/manage_panel"] +layout_mode = 2 +text = " Получить att " + +[node name="att_ind" type="Label" parent="TabContainer/Modul_fs/manage_panel/get_att"] +layout_mode = 0 +offset_top = 32.0 +offset_right = 105.0 +offset_bottom = 55.0 + +[node name="get_gen_status" type="Button" parent="TabContainer/Modul_fs/manage_panel"] +layout_mode = 2 +toggle_mode = true +text = "Переключатель генератора " + +[node name="status_ind" type="Label" parent="TabContainer/Modul_fs/manage_panel/get_gen_status"] +layout_mode = 0 +offset_top = 33.0 +offset_right = 84.0 +offset_bottom = 56.0 + +[node name="read" type="LineEdit" parent="TabContainer/Modul_fs"] +layout_mode = 0 +offset_left = 216.0 +offset_top = 818.0 +offset_right = 971.0 +offset_bottom = 849.0 +metadata/_edit_lock_ = true + +[node name="fs_connect" type="Label" parent="TabContainer/Modul_fs"] +layout_mode = 0 +offset_left = 206.0 +offset_top = 88.0 +offset_right = 377.0 +offset_bottom = 111.0 +text = "Связь с модулем ФС" + +[node name="temp_1" type="Label" parent="TabContainer/Modul_fs"] +layout_mode = 0 +offset_left = 1015.0 +offset_top = 119.0 +offset_right = 1102.0 +offset_bottom = 152.0 +text = "Темп" + +[node name="temp_2" type="Label" parent="TabContainer/Modul_fs"] +layout_mode = 0 +offset_left = 1016.0 +offset_top = 156.0 +offset_right = 1103.0 +offset_bottom = 189.0 +text = "Темп" + +[node name="temp_3" type="Label" parent="TabContainer/Modul_fs"] +layout_mode = 0 +offset_left = 1015.0 +offset_top = 193.0 +offset_right = 1102.0 +offset_bottom = 226.0 +text = "Темп" + +[node name="save_other" type="CheckBox" parent="."] +offset_left = 2.0 +offset_top = 799.0 +offset_right = 215.0 +offset_bottom = 827.0 +theme = SubResource("Theme_yblys") +text = "Сохранить все настройки" + +[connection signal="pressed" from="Background/side_panel/select_prd" to="." method="_on_prd_select"] +[connection signal="pressed" from="Background/side_panel/select_control" to="." method="_on_control_button"] +[connection signal="pressed" from="Background/side_panel/select_ems_g" to="." method="_on_emsg_select"] +[connection signal="pressed" from="Background/side_panel/select_fs" to="." method="_on_mfs_select"] +[connection signal="pressed" from="Background/side_panel/save_config" to="." method="_on_save_config"] +[connection signal="pressed" from="Background/side_panel/load_config" to="." method="_on_load_config"] +[connection signal="pressed" from="read_isa" to="." method="_on_read_isa_pressed"] +[connection signal="pressed" from="TabContainer/Modul_fs/set_space/set_ferq" to="TabContainer/Modul_fs" method="_on_set_ferq"] +[connection signal="pressed" from="TabContainer/Modul_fs/set_space/set_att2" to="TabContainer/Modul_fs" method="_on_set_att"] +[connection signal="pressed" from="TabContainer/Modul_fs/manage_panel/con" to="TabContainer/Modul_fs" method="_on_start"] +[connection signal="pressed" from="TabContainer/Modul_fs/manage_panel/get_freq" to="TabContainer/Modul_fs" method="_on_send_pressed"] +[connection signal="pressed" from="TabContainer/Modul_fs/manage_panel/get_att" to="TabContainer/Modul_fs" method="_on_get_att"] +[connection signal="toggled" from="TabContainer/Modul_fs/manage_panel/get_gen_status" to="TabContainer/Modul_fs" method="_on_get_status"] diff --git a/scripts/FS.gd b/scripts/FS.gd index c16846f..c5a583e 100644 --- a/scripts/FS.gd +++ b/scripts/FS.gd @@ -66,6 +66,7 @@ class FGOS: 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D] + const INDEX_SIZE: int = 0xC const GROUP_OFFSET: int = 0x0 const CMD_OFFSET: int = 0x1 @@ -76,7 +77,6 @@ class FGOS: signal line_changed(unit: FGOS) ## Вызывается когда меняется состояние связи с ячейкой - var counter: int = 0 var online: bool = false ## Состояние связи с ячейкой var status: = PackedByteArray() ## Поле "состояние прибора" #var fgos_data = {} ## Результат выполнения команды "читать порт" @@ -92,7 +92,7 @@ class FGOS: return final_crc - func _form_packet(group: int, cmd: int, index_size: int, data = null): + func _form_packet(group: int, cmd: int, index_size: int, counter: int, data = null): var packet = PackedByteArray() packet.resize(index_size) packet.encode_u8(GROUP_OFFSET, group) @@ -108,79 +108,80 @@ class FGOS: var crc = crc32(packet) packet.resize(packet.size() + 4) packet.encode_u32(packet.size() - 4, crc) - #Network.command_stack.append(packet) - Network.command_stack_2.append(packet) - - - func _parse(rx_data: PackedByteArray): - - if not online: - online = true - emit_signal('line_changed', self) - - - var status_len = rx_data.decode_u16(6) # Длина массива байтового "состояние прибора" - - var i: = 0 - var len_rx_data: = rx_data.size() - status.resize(status_len) - while i < status_len: - var byte_i = i + 8 - if byte_i < len_rx_data: - status[i] = rx_data[byte_i] # Массив байтовый "состояние прибора" - i += 1 - emit_signal('data_received', self) + Network.command_stack.append(packet) + + + func send_fs_data(data_to_sand: PackedByteArray, client_fs: StreamPeer, peerstream_fs: PacketPeer): + if client_fs.get_status() == 2: + var peer = peerstream_fs.get_stream_peer() + if peer: + peer.put_data(data_to_sand) + else: + print_debug('client_fs.get_status != 2 !!!') + + + #func _parse(rx_data: PackedByteArray): + #if not online: + #online = true + #emit_signal('line_changed', self) + # + #var status_len = rx_data.decode_u16(6) # Длина массива байтового "состояние прибора" +# + #var i: = 0 + #var len_rx_data: = rx_data.size() + #status.resize(status_len) + #while i < status_len: + #var byte_i = i + 8 + #if byte_i < len_rx_data: + #status[i] = rx_data[byte_i] # Массив байтовый "состояние прибора" + #i += 1 + #emit_signal('data_received', self) - func start_session(): - counter = 0 - var packet = _form_packet(GROUP.BASE, CmdCode.START_SESSION, 0xC) + func start_session(counter: int): + var packet = _form_packet(GROUP.BASE, CmdCode.START_SESSION, INDEX_SIZE, counter) _send_packet(packet) - get_gen_state() - get_att_batch() - get_carrier() - func set_gen_state(button_state: bool): + func set_gen_state(button_state: bool, counter: int): var index_size = 0x1C - var packet = _form_packet(GROUP.GENERATOR, CmdCode.SET_GEN_STATUS, index_size) + var packet = _form_packet(GROUP.GENERATOR, CmdCode.SET_GEN_STATUS, index_size, counter) packet.encode_u16(0x8, 0x0010) packet.encode_u32(0xC, button_state) ## MODE GEN STATUS _send_packet(packet) - get_gen_state() - func set_carrier(installation_frequency: int): + func set_carrier(installation_frequency: int, counter: int): var index_size = 0x1C - var packet = _form_packet(GROUP.BASE, CmdCode.SET_CARRIER, index_size) + var packet = _form_packet(GROUP.BASE, CmdCode.SET_CARRIER, index_size, counter) packet.encode_u16(0x8, 0x10) packet.encode_u64(0xC, installation_frequency) ## uint64_t freq low dword/high dword _send_packet(packet) - func set_att_batch(attenuation: float): + func set_att_batch(attenuation: float, counter: int): var index_size = 0x1C - var packet = _form_packet(GROUP.RF, CmdCode.SET_ATT, index_size) + var packet = _form_packet(GROUP.RF, CmdCode.SET_ATT, index_size, counter) packet.encode_u16(0x8, 0x10) packet.encode_float(0x18, attenuation) _send_packet(packet) - func get_carrier(): - var packet = _form_packet(GROUP.BASE, CmdCode.READ_CARRIER, INDEX_SIZE) + func get_carrier(counter: int): + var packet = _form_packet(GROUP.BASE, CmdCode.READ_CARRIER, INDEX_SIZE, counter) _send_packet(packet) - func get_att_batch(): - var packet = _form_packet(GROUP.RF, CmdCode.READ_ATT, INDEX_SIZE) + func get_att_batch(counter: int): + var packet = _form_packet(GROUP.RF, CmdCode.READ_ATT, INDEX_SIZE, counter) _send_packet(packet) - func get_gen_state(): - var packet = _form_packet(GROUP.GENERATOR, CmdCode.READ_GEN_STATUS, INDEX_SIZE) + func get_gen_state(counter: int): + var packet = _form_packet(GROUP.GENERATOR, CmdCode.READ_GEN_STATUS, INDEX_SIZE, counter) _send_packet(packet) - func base_get_current_temp(): - var packet = _form_packet(GROUP.BASE, CmdCode.BASE_GET_CURRENT_TEMP, INDEX_SIZE) + func base_get_current_temp(counter: int): + var packet = _form_packet(GROUP.BASE, CmdCode.BASE_GET_CURRENT_TEMP, INDEX_SIZE, counter) _send_packet(packet) diff --git a/scripts/PRD.gd b/scripts/PRD.gd index c27debc..a84bea2 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -420,8 +420,8 @@ func on_btn_select(intem_from_sector: int) -> void: Network.on_command_change_device(meta) flag_mode = meta[2] draw_control_panel_prd(flag_mode) - #_on_start_fs_1() - _on_start_fs_2() + _on_start_fs_1() + #_on_start_fs_2() func _on_zapret1(toggled_on: bool) -> void: diff --git a/scripts/modul_fs.gd b/scripts/modul_fs.gd index 61677ed..19dc73c 100644 --- a/scripts/modul_fs.gd +++ b/scripts/modul_fs.gd @@ -58,29 +58,29 @@ func _on_data_send(): func _on_send_pressed() -> void: - unit_fs.get_carrier() + unit_fs.get_carrier(counter) func _on_get_att() -> void: - unit_fs.get_att_batch() + unit_fs.get_att_batch(counter) func _on_start(): - unit_fs.start_session() - unit_fs.base_get_current_temp() + unit_fs.start_session(counter) + unit_fs.base_get_current_temp(counter) func _on_get_status(toggled_btn): var inverted_state = not toggled_btn - unit_fs.set_gen_state(inverted_state) - unit_fs.get_gen_state() + unit_fs.set_gen_state(inverted_state, counter) + unit_fs.get_gen_state(counter) func _on_set_ferq(): var freq = int($set_space/write_to_set_freq.get_text()) * 1_000_000 - unit_fs.set_carrier(freq) + unit_fs.set_carrier(freq, counter) func _on_set_att(): var att = float($set_space/write_to_set_att.get_text()) - unit_fs.set_att_batch(att) + unit_fs.set_att_batch(att, counter) diff --git a/scripts/network.gd b/scripts/network.gd index 69f7985..67f403f 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -2,8 +2,8 @@ extends Node # ЯУ-07 Блок var unit = Yau07.YaU07.new('ЯУ-07Б') -#var unit_fs_1 = Fs.FGOS.new() -var unit_fs_2 = Fs.FGOS.new() +var unit_fs_1 = Fs.FGOS.new() +#var unit_fs_2 = Fs.FGOS.new() var soc_unicast: Socket var soc_brodcast: Socket var ip_address_yau: String = Constants.ADDRESSES[0][1] @@ -21,6 +21,7 @@ var ip_fs_1: String = Constants.ADDRESSES[0][4] var peerstream_fs_1: PacketPeer var state_fs = Constants.STATE.IDLE var command_stack: Array +var counter_fs_1: int = 0 ## 2 ФС var client_fs_2: StreamPeer @@ -28,6 +29,7 @@ var ip_fs_2: String = Constants.ADDRESSES[0][5] var peerstream_fs_2: PacketPeer var state_fs_2 = Constants.STATE.IDLE var command_stack_2: Array +var counter_fs_2: int = 0 # Яу-07б signal yau_status_line(_status) ## Вызывается когда меняется состояние связи с ячейкой @@ -82,11 +84,16 @@ func poll_receive_fs(client: StreamPeerTCP, peerstream: PacketPeer, ip_fs: Strin if peer.get_available_bytes() > 0: var rx_data: PackedByteArray rx_data.append_array(peer.get_data(peer.get_available_bytes())[1]) - emit_signal("data_from_fs_1", rx_data) - #emit_signal("data_from_fs_2", rx_data) - emit_signal("port_fs_opened_1", ip_fs) - if state_fs == Constants.STATE.SEND: - state_fs = Constants.STATE.DONE + if client == client_fs_1: + emit_signal("data_from_fs_1", rx_data) + emit_signal("port_fs_opened_1", ip_fs) + if state_fs == Constants.STATE.SEND: + state_fs = Constants.STATE.DONE + elif client == client_fs_2: + emit_signal("data_from_fs_2", rx_data) + emit_signal("port_fs_opened_2", ip_fs) + if state_fs_2 == Constants.STATE.SEND: + state_fs_2 = Constants.STATE.DONE func _ready() -> void: @@ -103,7 +110,7 @@ func _ready() -> void: unit.connect('line_changed', Callable(self, 'on_line_changed')) unit.connect('command_fail', Callable(self, 'on_command_fail')) - #connect_fs_1() + connect_fs_1() connect_fs_2() read_port_isa([0x106, 0x108]) @@ -115,16 +122,16 @@ func _process(delta: float) -> void: if client_fs_1: poll_receive_fs(client_fs_1, peerstream_fs_1, ip_fs_1) + state_machine_fs() if client_fs_2: - poll_receive_fs_2(client_fs_2, peerstream_fs_2, ip_fs_2) + poll_receive_fs(client_fs_2, peerstream_fs_2, ip_fs_2) + state_machine_fs_2() poll_receive_yau07(soc_brodcast) poll_receive_yau07(soc_unicast) state_machine_yau07() - #state_machine_fs() - state_machine_fs_2() - + match unit.process(delta): Error.OK: soc_unicast.send_to(ip_address_yau, ip_port_yau, unit.tx_data.slice(0, unit.tx_len)) Error.FAILED: print_debug('Ошибка отправки данных') @@ -182,18 +189,24 @@ func on_command_change_device(meta_device): ip_fs_1 = meta_device[3] ip_fs_2 = meta_device[4] #ip_fs_3 = meta_device[5] - #connect_fs_1() - connect_fs_2() + connect_fs_1() + #connect_fs_2() func state_machine_fs(): + ## State fs machine if client_fs_1: - ## State fs machine if (state_fs == Constants.STATE.IDLE) or (state_fs == Constants.STATE.DONE): if command_stack: var pack: Array = command_stack.pop_front() - send_fs_data_1(pack) + unit_fs_1.send_fs_data(pack, client_fs_1, peerstream_fs_1) state_fs = Constants.STATE.SEND + if client_fs_2: + if (state_fs_2 == Constants.STATE.IDLE) or (state_fs_2 == Constants.STATE.DONE): + if command_stack_2: + var pack: Array = command_stack_2.pop_front() + unit_fs_1.send_fs_data(pack, client_fs_2, peerstream_fs_2) + state_fs_2 = Constants.STATE.SEND # Подключится к модулю ФС @@ -210,43 +223,52 @@ func connect_fs_1(): peerstream_fs_1.set_stream_peer(client_fs_1) -# Отправить команду для ФС -func send_fs_data_1(data_to_sand: PackedByteArray): - if client_fs_1.get_status() == 2: - var peer = peerstream_fs_1.get_stream_peer() - if peer: - peer.put_data(data_to_sand) - emit_signal("data_send") - - # Разорвать соединение с ФС func disconnect_fs(client_for_leave): client_for_leave.disconnect_from_host() state_fs = Constants.STATE.IDLE command_stack = [] -# -#func start_work_fs(): - #unit_fs_1.start_session() - #unit_fs_1.base_get_current_temp() -# -# -#func get_fs_gen_status(state_gen): - #unit_fs_1.set_gen_state(state_gen) - #unit_fs_1.get_gen_state() - #unit_fs_1.base_get_current_temp() -# -# -#func set_fs_ferq_carrier(freq: int): - #unit_fs_1.set_carrier(freq) - #unit_fs_1.base_get_current_temp() - #unit_fs_1.get_carrier() -# -# -#func set_fs_attenuation(attenuation: float): - #unit_fs_1.set_att_batch(attenuation) - #unit_fs_1.get_att_batch() - #unit_fs_1.base_get_current_temp() + +func start_work_fs(): + counter_fs_1 = 0 + unit_fs_1.start_session(counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.get_gen_state(counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.get_att_batch(counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.get_carrier(counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.base_get_current_temp(counter_fs_1) + counter_fs_1 += 1 + + +func get_fs_gen_status(state_gen): + unit_fs_1.set_gen_state(state_gen, counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.get_gen_state(counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.base_get_current_temp(counter_fs_1) + counter_fs_1 += 1 + + +func set_fs_ferq_carrier(freq: int): + unit_fs_1.set_carrier(freq, counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.base_get_current_temp(counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.get_carrier(counter_fs_1) + counter_fs_1 += 1 + + +func set_fs_attenuation(attenuation: float): + unit_fs_1.set_att_batch(attenuation, counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.get_att_batch(counter_fs_1) + counter_fs_1 += 1 + unit_fs_1.base_get_current_temp(counter_fs_1) + counter_fs_1 += 1 ## 2 ФС коннект @@ -289,45 +311,25 @@ func state_machine_fs_2(): state_fs_2 = Constants.STATE.SEND -func poll_receive_fs_2(client: StreamPeerTCP, peerstream: PacketPeer, ip_fs: String): - client.poll() - var peer = peerstream.get_stream_peer() - # Проверяем, существует ли соединение - if not peer: - emit_signal("port_error", ip_fs) - return - # Проверяем состояние подключения - if client.get_status() != StreamPeerTCP.STATUS_CONNECTED: - emit_signal("port_closed", ip_fs) - return - - if peer.get_available_bytes() > 0: - var rx_data: PackedByteArray - rx_data.append_array(peer.get_data(peer.get_available_bytes())[1]) - emit_signal("data_from_fs_2", rx_data) - emit_signal("port_fs_opened_2", ip_fs) - if state_fs_2 == Constants.STATE.SEND: - state_fs_2 = Constants.STATE.DONE - - -func start_work_fs_2(): - unit_fs_2.start_session() - unit_fs_2.base_get_current_temp() - - -func get_fs_gen_status_2(state_gen): - unit_fs_2.set_gen_state(state_gen) - unit_fs_2.get_gen_state() - unit_fs_2.base_get_current_temp() - - -func set_fs_ferq_carrier_2(freq: int): - unit_fs_2.set_carrier(freq) - unit_fs_2.base_get_current_temp() - unit_fs_2.get_carrier() - - -func set_fs_attenuation_2(attenuation: float): - unit_fs_2.set_att_batch(attenuation) - unit_fs_2.get_att_batch() - unit_fs_2.base_get_current_temp() +# +#func start_work_fs_2(): + #unit_fs_2.start_session() + #unit_fs_2.base_get_current_temp() +# +# +#func get_fs_gen_status_2(state_gen): + #unit_fs_2.set_gen_state(state_gen) + #unit_fs_2.get_gen_state() + #unit_fs_2.base_get_current_temp() +# +# +#func set_fs_ferq_carrier_2(freq: int): + #unit_fs_2.set_carrier(freq) + #unit_fs_2.base_get_current_temp() + #unit_fs_2.get_carrier() +# +# +#func set_fs_attenuation_2(attenuation: float): + #unit_fs_2.set_att_batch(attenuation) + #unit_fs_2.get_att_batch() + #unit_fs_2.base_get_current_temp() From 39c8a03821283216c79a9cfb0e58244d7036f7a7 Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 7 Feb 2025 05:18:50 +0300 Subject: [PATCH 10/15] module fs half-stable --- scripts/FS.gd | 39 ++++++++------- scripts/PRD.gd | 6 ++- scripts/modul_fs.gd | 16 +++---- scripts/network.gd | 114 ++++++++++++++++++++++---------------------- 4 files changed, 90 insertions(+), 85 deletions(-) diff --git a/scripts/FS.gd b/scripts/FS.gd index c5a583e..4fa8390 100644 --- a/scripts/FS.gd +++ b/scripts/FS.gd @@ -104,11 +104,14 @@ class FGOS: return packet - func _send_packet(packet: PackedByteArray): + func send_packet_to(packet: PackedByteArray, client: StreamPeer): var crc = crc32(packet) packet.resize(packet.size() + 4) packet.encode_u32(packet.size() - 4, crc) - Network.command_stack.append(packet) + if client == Network.client_fs_1: + Network.command_stack.append(packet) + else: + Network.command_stack_2.append(packet) func send_fs_data(data_to_sand: PackedByteArray, client_fs: StreamPeer, peerstream_fs: PacketPeer): @@ -138,50 +141,50 @@ class FGOS: #emit_signal('data_received', self) - func start_session(counter: int): + func start_session(counter: int, client: StreamPeer): var packet = _form_packet(GROUP.BASE, CmdCode.START_SESSION, INDEX_SIZE, counter) - _send_packet(packet) + send_packet_to(packet, client) - func set_gen_state(button_state: bool, counter: int): + func set_gen_state(button_state: bool, counter: int, client: StreamPeer): var index_size = 0x1C var packet = _form_packet(GROUP.GENERATOR, CmdCode.SET_GEN_STATUS, index_size, counter) packet.encode_u16(0x8, 0x0010) packet.encode_u32(0xC, button_state) ## MODE GEN STATUS - _send_packet(packet) + send_packet_to(packet, client) - func set_carrier(installation_frequency: int, counter: int): + func set_carrier(installation_frequency: int, counter: int, client: StreamPeer): var index_size = 0x1C var packet = _form_packet(GROUP.BASE, CmdCode.SET_CARRIER, index_size, counter) packet.encode_u16(0x8, 0x10) packet.encode_u64(0xC, installation_frequency) ## uint64_t freq low dword/high dword - _send_packet(packet) + send_packet_to(packet, client) - func set_att_batch(attenuation: float, counter: int): + func set_att_batch(attenuation: float, counter: int, client: StreamPeer): var index_size = 0x1C var packet = _form_packet(GROUP.RF, CmdCode.SET_ATT, index_size, counter) packet.encode_u16(0x8, 0x10) packet.encode_float(0x18, attenuation) - _send_packet(packet) + send_packet_to(packet, client) - func get_carrier(counter: int): + func get_carrier(counter: int, client: StreamPeer): var packet = _form_packet(GROUP.BASE, CmdCode.READ_CARRIER, INDEX_SIZE, counter) - _send_packet(packet) + send_packet_to(packet, client) - func get_att_batch(counter: int): + func get_att_batch(counter: int, client: StreamPeer): var packet = _form_packet(GROUP.RF, CmdCode.READ_ATT, INDEX_SIZE, counter) - _send_packet(packet) + send_packet_to(packet, client) - func get_gen_state(counter: int): + func get_gen_state(counter: int, client: StreamPeer): var packet = _form_packet(GROUP.GENERATOR, CmdCode.READ_GEN_STATUS, INDEX_SIZE, counter) - _send_packet(packet) + send_packet_to(packet, client) - func base_get_current_temp(counter: int): + func base_get_current_temp(counter: int, client: StreamPeer): var packet = _form_packet(GROUP.BASE, CmdCode.BASE_GET_CURRENT_TEMP, INDEX_SIZE, counter) - _send_packet(packet) + send_packet_to(packet, client) diff --git a/scripts/PRD.gd b/scripts/PRD.gd index a84bea2..75d86b9 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -202,9 +202,13 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void: $ISA.text = 'ISA: ' + str(len(Constants.EMS_G_PORT_DATA_HOLDER)) if isa_data.has(Constants.BASE_PORTS.UG+6): + $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 3).select(isa_data[0x106] & 0x7) + $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 4).select((isa_data[0x106] & 0x38)>> 3) $TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[0x106] & 0x7)) $TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/inner_radius', 0.8 - 0.01 * (isa_data[0x106] & 0x38)) if isa_data.has(Constants.BASE_PORTS.UG+8): + $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 3).select(isa_data[0x108] & 0x7) + $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 4).select((isa_data[0x108] & 0x38)>>3) $TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[0x108] & 0x7)) $TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/inner_radius', 0.8 - 0.01 * (isa_data[0x108] & 0x38)) @@ -421,7 +425,7 @@ func on_btn_select(intem_from_sector: int) -> void: flag_mode = meta[2] draw_control_panel_prd(flag_mode) _on_start_fs_1() - #_on_start_fs_2() + _on_start_fs_2() func _on_zapret1(toggled_on: bool) -> void: diff --git a/scripts/modul_fs.gd b/scripts/modul_fs.gd index 19dc73c..7bebe73 100644 --- a/scripts/modul_fs.gd +++ b/scripts/modul_fs.gd @@ -58,29 +58,29 @@ func _on_data_send(): func _on_send_pressed() -> void: - unit_fs.get_carrier(counter) + unit_fs.get_carrier(counter, Network.client_fs_1) func _on_get_att() -> void: - unit_fs.get_att_batch(counter) + unit_fs.get_att_batch(counter, Network.client_fs_1) func _on_start(): - unit_fs.start_session(counter) - unit_fs.base_get_current_temp(counter) + unit_fs.start_session(counter, Network.client_fs_1) + unit_fs.base_get_current_temp(counter, Network.client_fs_1) func _on_get_status(toggled_btn): var inverted_state = not toggled_btn - unit_fs.set_gen_state(inverted_state, counter) - unit_fs.get_gen_state(counter) + unit_fs.set_gen_state(inverted_state, counter, Network.client_fs_1) + unit_fs.get_gen_state(counter, Network.client_fs_1) func _on_set_ferq(): var freq = int($set_space/write_to_set_freq.get_text()) * 1_000_000 - unit_fs.set_carrier(freq, counter) + unit_fs.set_carrier(freq, counter, Network.client_fs_1) func _on_set_att(): var att = float($set_space/write_to_set_att.get_text()) - unit_fs.set_att_batch(att, counter) + unit_fs.set_att_batch(att, counter, Network.client_fs_1) diff --git a/scripts/network.gd b/scripts/network.gd index 67f403f..d90588b 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -122,10 +122,10 @@ func _process(delta: float) -> void: if client_fs_1: poll_receive_fs(client_fs_1, peerstream_fs_1, ip_fs_1) - state_machine_fs() + state_machine_fs(client_fs_1) if client_fs_2: poll_receive_fs(client_fs_2, peerstream_fs_2, ip_fs_2) - state_machine_fs_2() + state_machine_fs(client_fs_2) poll_receive_yau07(soc_brodcast) poll_receive_yau07(soc_unicast) @@ -190,18 +190,18 @@ func on_command_change_device(meta_device): ip_fs_2 = meta_device[4] #ip_fs_3 = meta_device[5] connect_fs_1() - #connect_fs_2() + connect_fs_2() -func state_machine_fs(): +func state_machine_fs(client_fs): ## State fs machine - if client_fs_1: + if client_fs == client_fs_1: if (state_fs == Constants.STATE.IDLE) or (state_fs == Constants.STATE.DONE): if command_stack: var pack: Array = command_stack.pop_front() unit_fs_1.send_fs_data(pack, client_fs_1, peerstream_fs_1) state_fs = Constants.STATE.SEND - if client_fs_2: + if client_fs == client_fs_2: if (state_fs_2 == Constants.STATE.IDLE) or (state_fs_2 == Constants.STATE.DONE): if command_stack_2: var pack: Array = command_stack_2.pop_front() @@ -232,42 +232,42 @@ func disconnect_fs(client_for_leave): func start_work_fs(): counter_fs_1 = 0 - unit_fs_1.start_session(counter_fs_1) + unit_fs_1.start_session(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_gen_state(counter_fs_1) + unit_fs_1.get_gen_state(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_att_batch(counter_fs_1) + unit_fs_1.get_att_batch(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_carrier(counter_fs_1) + unit_fs_1.get_carrier(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.base_get_current_temp(counter_fs_1) + unit_fs_1.base_get_current_temp(counter_fs_1, client_fs_1) counter_fs_1 += 1 func get_fs_gen_status(state_gen): - unit_fs_1.set_gen_state(state_gen, counter_fs_1) + unit_fs_1.set_gen_state(state_gen, counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_gen_state(counter_fs_1) + unit_fs_1.get_gen_state(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.base_get_current_temp(counter_fs_1) + unit_fs_1.base_get_current_temp(counter_fs_1, client_fs_1) counter_fs_1 += 1 func set_fs_ferq_carrier(freq: int): - unit_fs_1.set_carrier(freq, counter_fs_1) + unit_fs_1.set_carrier(freq, counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.base_get_current_temp(counter_fs_1) + unit_fs_1.base_get_current_temp(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_carrier(counter_fs_1) + unit_fs_1.get_carrier(counter_fs_1, client_fs_1) counter_fs_1 += 1 func set_fs_attenuation(attenuation: float): - unit_fs_1.set_att_batch(attenuation, counter_fs_1) + unit_fs_1.set_att_batch(attenuation, counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.get_att_batch(counter_fs_1) + unit_fs_1.get_att_batch(counter_fs_1, client_fs_1) counter_fs_1 += 1 - unit_fs_1.base_get_current_temp(counter_fs_1) + unit_fs_1.base_get_current_temp(counter_fs_1, client_fs_1) counter_fs_1 += 1 @@ -291,45 +291,43 @@ func disconnect_fs_2(client_for_leave): client_for_leave.disconnect_from_host() state_fs_2 = Constants.STATE.IDLE command_stack_2 = [] - - -# Отправить команду для ФС -func send_fs_data_2(data_to_sand: PackedByteArray): - if client_fs_2.get_status() == 2: - var peer = peerstream_fs_2.get_stream_peer() - if peer: - peer.put_data(data_to_sand) -func state_machine_fs_2(): - if client_fs_2: - ## State fs_2 machine - if (state_fs_2 == Constants.STATE.IDLE) or (state_fs_2 == Constants.STATE.DONE): - if command_stack_2: - var pack: Array = command_stack_2.pop_front() - send_fs_data_2(pack) - state_fs_2 = Constants.STATE.SEND +func start_work_fs_2(): + counter_fs_2 = 0 + unit_fs_1.start_session(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.get_gen_state(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.get_att_batch(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.get_carrier(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.base_get_current_temp(counter_fs_2, client_fs_2) + counter_fs_2 += 1 +# +func get_fs_gen_status_2(state_gen): + unit_fs_1.set_gen_state(state_gen, counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.get_gen_state(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.base_get_current_temp(counter_fs_2, client_fs_2) + counter_fs_2 += 1 -# -#func start_work_fs_2(): - #unit_fs_2.start_session() - #unit_fs_2.base_get_current_temp() -# -# -#func get_fs_gen_status_2(state_gen): - #unit_fs_2.set_gen_state(state_gen) - #unit_fs_2.get_gen_state() - #unit_fs_2.base_get_current_temp() -# -# -#func set_fs_ferq_carrier_2(freq: int): - #unit_fs_2.set_carrier(freq) - #unit_fs_2.base_get_current_temp() - #unit_fs_2.get_carrier() -# -# -#func set_fs_attenuation_2(attenuation: float): - #unit_fs_2.set_att_batch(attenuation) - #unit_fs_2.get_att_batch() - #unit_fs_2.base_get_current_temp() +func set_fs_ferq_carrier_2(freq: int): + unit_fs_1.set_carrier(freq, counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.base_get_current_temp(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.get_carrier(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + + +func set_fs_attenuation_2(attenuation: float): + unit_fs_1.set_att_batch(attenuation, counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.get_att_batch(counter_fs_2, client_fs_2) + counter_fs_2 += 1 + unit_fs_1.base_get_current_temp(counter_fs_2, client_fs_2) + counter_fs_2 += 1 From a3e03c7da1298907ea621a59b40e93110f6e80a2 Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 7 Feb 2025 06:39:02 +0300 Subject: [PATCH 11/15] module fs half-stable --- scripts/FS.gd | 2 -- scripts/PRD.gd | 13 +++++++++---- scripts/network.gd | 8 ++++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/scripts/FS.gd b/scripts/FS.gd index 4fa8390..dddf9a2 100644 --- a/scripts/FS.gd +++ b/scripts/FS.gd @@ -119,8 +119,6 @@ class FGOS: var peer = peerstream_fs.get_stream_peer() if peer: peer.put_data(data_to_sand) - else: - print_debug('client_fs.get_status != 2 !!!') #func _parse(rx_data: PackedByteArray): diff --git a/scripts/PRD.gd b/scripts/PRD.gd index 75d86b9..66df434 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -137,8 +137,10 @@ func _ready() -> void: Network.connect('yau_status_line', Callable(self, '_on_yau_status')) Network.connect('yau_receive', Callable(self, '_on_data_received')) Network.connect('yau_read_isa', Callable(self, '_on_read_isa')) - Network.connect('port_fs_opened_1', _on_port_changed_fs_1.bind(Color.GREEN)) - Network.connect('port_fs_opened_2', _on_port_changed_fs_2.bind(Color.GREEN)) + Network.connect('port_fs_opened_1', _on_port_changed_fs_1.bind(Color.AQUAMARINE)) + Network.connect('port_fs_closed_1', _on_port_changed_fs_1.bind(Color.CRIMSON)) + Network.connect('port_fs_opened_2', _on_port_changed_fs_2.bind(Color.AQUAMARINE)) + Network.connect('port_fs_closed_2', _on_port_changed_fs_2.bind(Color.CRIMSON)) Network.connect('data_from_fs_1', _on_data_fs_1) Network.connect('data_from_fs_2', _on_data_fs_2) @@ -528,8 +530,9 @@ func set_bits(v, a, m): ## 1 ФС -func _on_port_changed_fs_1(port_name: String, _color: Color) -> void: +func _on_port_changed_fs_1(port_name: String, color: Color) -> void: $TabContainer/PRD/body_grid/litera_2_4_6/fs_control.set_node_text(1, 1, port_name) + $TabContainer/PRD/body_grid/litera_2_4_6/fs_control.get_node2(1,1).modulate = color func _on_start_fs_1(): @@ -550,8 +553,10 @@ func _on_set_att_1(att: String): ## 2 ФС -func _on_port_changed_fs_2(port_name: String, _color: Color) -> void: +func _on_port_changed_fs_2(port_name: String, color: Color) -> void: $TabContainer/PRD/body_grid/litera_3_5_7/fs_control.set_node_text(1, 1, port_name) + $TabContainer/PRD/body_grid/litera_3_5_7/fs_control.get_node2(1, 1).modulate = color + func _on_start_fs_2(): Network.start_work_fs_2() diff --git a/scripts/network.gd b/scripts/network.gd index d90588b..69f5199 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -40,7 +40,8 @@ signal data_from_fs_1(data:PackedByteArray) signal data_from_fs_2(data:PackedByteArray) signal port_fs_opened_1(port_name: String) signal port_fs_opened_2(port_name: String) -signal port_closed(port_name: String) +signal port_fs_closed_1(port_name: String) +signal port_fs_closed_2(port_name: String) signal port_error(error_str: String) @@ -78,7 +79,10 @@ func poll_receive_fs(client: StreamPeerTCP, peerstream: PacketPeer, ip_fs: Strin return # Проверяем состояние подключения if client.get_status() != StreamPeerTCP.STATUS_CONNECTED: - emit_signal("port_closed", ip_fs) + if client == client_fs_1: + emit_signal("port_fs_closed_1", ip_fs) + elif client == client_fs_2: + emit_signal("port_fs_closed_2", ip_fs) return if peer.get_available_bytes() > 0: From 0f9c5abdc907dc01e1cf0b3c2e2af61f25904ba9 Mon Sep 17 00:00:00 2001 From: danil_tim Date: Fri, 7 Feb 2025 11:00:57 +0300 Subject: [PATCH 12/15] ems not work --- PRD_MP550.tscn | 261 +++++++++++++++++++++++---------------- scripts/PRD.gd | 139 ++++++++++++++++----- scripts/constants.gd | 34 ++--- scripts/control_panel.gd | 55 ++++----- 4 files changed, 295 insertions(+), 194 deletions(-) diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 0b919ea..eb1a1d3 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -217,6 +217,7 @@ toggle_mode = true text = "Модуль ФС" [node name="save_config" type="Button" parent="Background/side_panel"] +layout_mode = 0 offset_top = 832.0 offset_right = 216.0 offset_bottom = 868.0 @@ -227,6 +228,7 @@ theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") text = "Сохранить" [node name="load_config" type="Button" parent="Background/side_panel"] +layout_mode = 0 offset_top = 872.0 offset_right = 216.0 offset_bottom = 908.0 @@ -270,7 +272,7 @@ text = "Прочитать ISA" offset_left = 216.0 offset_top = 39.0 offset_right = 2420.0 -offset_bottom = 917.0 +offset_bottom = 940.0 theme = SubResource("Theme_k5ur4") theme_override_colors/font_unselected_color = Color(0, 0, 0, 0.0392157) theme_override_colors/font_selected_color = Color(0, 0, 0, 0) @@ -282,10 +284,11 @@ theme_override_styles/tab_selected = SubResource("StyleBoxTexture_k08q3") theme_override_styles/tab_hovered = SubResource("StyleBoxTexture_dklg6") theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6") tab_alignment = 2 -current_tab = 0 +current_tab = 1 tab_focus_mode = 0 [node name="PRD" type="Panel" parent="TabContainer"] +visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7") metadata/_tab_index = 0 @@ -569,19 +572,18 @@ script = ExtResource("2_vmbyo") node_gap = Vector2(100, 50) [node name="ControlPanel" type="Panel" parent="TabContainer"] -visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6") script = ExtResource("9_akagi") metadata/_tab_index = 1 metadata/_edit_lock_ = true -[node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"] +[node name="label_control_PRD" type="Label" parent="TabContainer/ControlPanel"] layout_mode = 0 offset_left = 4.0 -offset_top = 21.0 +offset_top = -44.0 offset_right = 624.0 -offset_bottom = 52.0 +offset_bottom = -13.0 theme_override_font_sizes/font_size = 22 text = "Контроль исправности прибора ПРД-Н" horizontal_alignment = 1 @@ -590,36 +592,36 @@ vertical_alignment = 1 [node name="soc_y5" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 offset_left = 199.0 -offset_top = 103.0 +offset_top = 8.0 offset_right = 516.0 -offset_bottom = 293.0 +offset_bottom = 198.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 patch_margin_right = 16 patch_margin_bottom = 16 -[node name="ref_A24" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="IP5_25" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 9.0 offset_top = 34.0 offset_right = 59.0 offset_bottom = 184.0 textures = Array[Texture]([]) -fname = "ИП-25" +fname = "ИП5-25" rname = "A24" metadata/_edit_lock_ = true -[node name="ref_A30" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ay07" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 59.0 offset_top = 34.0 offset_right = 109.0 offset_bottom = 184.0 textures = Array[Texture]([]) -fname = "ЯУ-07" +fname = "ЯУ-07Б" rname = "A30" metadata/_edit_lock_ = true -[node name="ref_A26" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ems_g" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 109.0 offset_top = 34.0 offset_right = 159.0 @@ -629,7 +631,7 @@ fname = "ЭМС-Г" rname = "A26" metadata/_edit_lock_ = true -[node name="ref_A27" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ug" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 159.0 offset_top = 34.0 offset_right = 209.0 @@ -639,7 +641,7 @@ fname = "УГ" rname = "A27" metadata/_edit_lock_ = true -[node name="ref_A28" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ukp_1" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 209.0 offset_top = 34.0 offset_right = 259.0 @@ -650,7 +652,7 @@ fname = "УКП-1" rname = "A28" metadata/_edit_lock_ = true -[node name="ref_A29" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ukp_2" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 259.0 offset_top = 34.0 offset_right = 309.0 @@ -660,7 +662,7 @@ fname = "УКП-2" rname = "A29" metadata/_edit_lock_ = true -[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_y5"] +[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_y5"] self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 offset_left = 7.0 @@ -671,15 +673,15 @@ text = "Кассета У5" horizontal_alignment = 1 vertical_alignment = 1 -[node name="soc_fs-nkvd" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")] +[node name="Kasseta_FS" parent="TabContainer/ControlPanel" instance=ExtResource("10_tdh2s")] layout_mode = 0 -offset_left = 198.0 -offset_top = 311.0 -offset_right = 516.0 -offset_bottom = 538.0 +offset_left = 200.0 +offset_top = 201.0 +offset_right = 518.0 +offset_bottom = 420.0 script = null -[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_fs-nkvd"] +[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/Kasseta_FS"] self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 offset_left = 7.0 @@ -691,150 +693,188 @@ horizontal_alignment = 1 vertical_alignment = 1 metadata/_edit_lock_ = true -[node name="ref_A3" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +[node name="ref_A3" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 109.0 -offset_top = 68.0 +offset_top = 41.0 offset_right = 159.0 -offset_bottom = 218.0 +offset_bottom = 211.0 textures = Array[Texture]([]) -fname = "ФС-2" +self_size = Vector2i(50, 170) +fname = "БЛОК ФС-2" rname = "A3" -metadata/_edit_lock_ = true -[node name="ref_A1" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +[node name="ref_A1" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 159.0 -offset_top = 68.0 +offset_top = 41.0 offset_right = 209.0 -offset_bottom = 218.0 +offset_bottom = 211.0 textures = Array[Texture]([]) -fname = "Модуль" +self_size = Vector2i(50, 170) +fname = "Модуль ФС" rname = "A1" -metadata/_edit_lock_ = true -[node name="ref_A2" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +[node name="ref_A2" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 209.0 -offset_top = 68.0 +offset_top = 41.0 offset_right = 259.0 -offset_bottom = 217.0 +offset_bottom = 211.0 textures = Array[Texture]([]) -self_size = Vector2i(50, 149) -fname = "Модуль" +self_size = Vector2i(50, 170) +fname = "Модуль ФС" rname = "A2" -metadata/_edit_lock_ = true -[node name="ref_A4" parent="TabContainer/ControlPanel/soc_fs-nkvd" instance=ExtResource("11_fg7ul")] +[node name="ref_A4" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 259.0 -offset_top = 68.0 +offset_top = 41.0 offset_right = 309.0 -offset_bottom = 218.0 +offset_bottom = 211.0 textures = Array[Texture]([]) -fname = "ФС-3" +self_size = Vector2i(50, 170) +fname = "БЛОК ФС-3" rname = "A4" -metadata/_edit_lock_ = true + +[node name="Block_FS_PRD_K" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] +offset_left = 12.0 +offset_top = 41.0 +offset_right = 62.0 +offset_bottom = 211.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 170) +fname = "БЛОК ФС-1" +rname = "A4" + +[node name="FS_PRD_K" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] +offset_left = 61.0 +offset_top = 41.0 +offset_right = 111.0 +offset_bottom = 211.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 170) +fname = "Модуль ФС" +rname = "A1" [node name="soc_P1" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 96.0 -offset_top = 560.0 -offset_right = 516.0 -offset_bottom = 776.0 +offset_left = 259.0 +offset_top = 427.0 +offset_right = 447.0 +offset_bottom = 643.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 patch_margin_right = 16 patch_margin_bottom = 16 -[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/soc_P1"] +[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_P1"] self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 offset_left = 7.0 offset_top = 8.0 -offset_right = 409.0 +offset_right = 181.0 offset_bottom = 33.0 text = "Кассета П-1" horizontal_alignment = 1 vertical_alignment = 1 -metadata/_edit_lock_ = true -[node name="ref_A23" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 9.0 -offset_top = 34.0 -offset_right = 59.0 -offset_bottom = 208.0 +[node name="MAA_1" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = -63.0 +offset_top = 36.0 +offset_right = -13.0 +offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "МАА2000" +rname = "А22" -[node name="ref_A24" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 59.0 -offset_top = 34.0 -offset_right = 109.0 -offset_bottom = 208.0 +[node name="MAA_2" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 199.0 +offset_top = 37.0 +offset_right = 249.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "МАА2000" +rname = "А23" -[node name="ref_A25" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 109.0 -offset_top = 34.0 -offset_right = 159.0 -offset_bottom = 208.0 +[node name="IP9_50_2" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 129.0 +offset_top = 37.0 +offset_right = 179.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "ИП9-50" +rname = "А19" -[node name="ref_A26" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 159.0 -offset_top = 34.0 -offset_right = 209.0 -offset_bottom = 208.0 +[node name="IP9_50_1" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 73.0 +offset_top = 37.0 +offset_right = 123.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "ИП9-50" +rname = "А20" -[node name="ref_A27" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 209.0 -offset_top = 34.0 -offset_right = 259.0 -offset_bottom = 208.0 +[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 16.0 +offset_top = 37.0 +offset_right = 66.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "ИП12-50" +rname = "A21" -[node name="ref_A28" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 259.0 -offset_top = 34.0 -offset_right = 309.0 -offset_bottom = 208.0 +[node name="soc_P2" type="NinePatchRect" parent="TabContainer/ControlPanel"] +layout_mode = 0 +offset_left = 258.0 +offset_top = 649.0 +offset_right = 446.0 +offset_bottom = 865.0 +texture = ExtResource("9_0r2qk") +patch_margin_left = 16 +patch_margin_top = 16 +patch_margin_right = 16 +patch_margin_bottom = 16 + +[node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_P2"] +self_modulate = Color(1, 1, 1, 0.62) +layout_mode = 0 +offset_left = 7.0 +offset_top = 8.0 +offset_right = 181.0 +offset_bottom = 33.0 +text = "Кассета П-2" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="IP9_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] +offset_left = 73.0 +offset_top = 36.0 +offset_right = 123.0 +offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true +fname = "ИП9-50" +rname = "А22" -[node name="ref_A29" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 309.0 -offset_top = 34.0 -offset_right = 359.0 -offset_bottom = 208.0 +[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] +offset_left = 128.0 +offset_top = 36.0 +offset_right = 178.0 +offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true - -[node name="ref_A30" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 359.0 -offset_top = 34.0 -offset_right = 409.0 -offset_bottom = 208.0 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) -rname = "A30" -metadata/_edit_lock_ = true +fname = "ИП12-50" +rname = "A25" [node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 536.0 -offset_top = 550.0 -offset_right = 1055.0 -offset_bottom = 777.0 +offset_left = 592.0 +offset_top = 193.0 +offset_right = 1111.0 +offset_bottom = 420.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 @@ -943,6 +983,13 @@ self_size = Vector2i(50, 178) rname = "A33" metadata/_edit_lock_ = true +[node name="device" type="Label" parent="TabContainer/ControlPanel"] +layout_mode = 0 +offset_left = 1451.0 +offset_top = 792.0 +offset_right = 1616.0 +offset_bottom = 847.0 + [node name="EMS_G" type="Panel" parent="TabContainer"] visible = false layout_mode = 2 diff --git a/scripts/PRD.gd b/scripts/PRD.gd index e7067b1..016a85a 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -3,7 +3,6 @@ extends Node2D signal read_ems_g_start() signal read_ems_g_finish() -var flag_mode = Constants.ADDRESSES[0][3] var broadcast_packet: PackedByteArray var node_select1: Node var node_select2: Node @@ -19,19 +18,19 @@ func _ready() -> void: node_select1.set_columns_min_size([120, 120]) node_select1.set_node_text(0, 0, 'Мощность') node_select1.set_node_text(1, 0, 'Температура') - + # Таблица УКП_2 node_select2 = $TabContainer/PRD/body_grid/litera_3_5_7/table_ukp_2 draw_tabl(node_select2, Constants.ROWS_UKP2_DATA, Constants.ROWS_UKP2_DATA.size()) node_select2.set_columns_min_size([120, 120]) node_select2.set_node_text(0, 0, 'Мощность') node_select2.set_node_text(1, 0, 'Температура') - + # Выбор прибора для подключения var node_select_device = $TabContainer/PRD/select_dev draw_tabl(node_select_device, Constants.SELECT_DEVICE, Constants.SELECT_DEVICE.size()) var get_select_device = node_select_device.get_node2(1, 0) - + # Заполнение адресов for i_addr in Constants.ADDRESSES.size(): get_select_device.add_item(Constants.ADDRESSES[i_addr][0]) @@ -39,34 +38,114 @@ func _ready() -> void: get_select_device.connect('item_selected', Callable(self, 'on_btn_select')) node_select_device.get_node2(0,0).text = 'ПРИБОР' node_select_device.set_columns_min_size([100, 100]) - + ## Заполненение списка направления луча for key in Constants.RAY_DICT: $TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Ray_set_1.add_item(key) $TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Ray_set_2.add_item(key) - + ## Заполненение списка аттенюатора for key in Constants.ATT_DICT: $TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/att_set_1.add_item(key) $TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/att_set_2.add_item(key) - - draw_control_panel_prd(Constants.ADDRESSES[0][3]) + Network.connect('yau_status_line', Callable(self, '_on_yau_status')) Network.connect('yau_receive', Callable(self, '_on_data_received')) Network.connect('yau_read_isa', Callable(self, '_on_read_isa')) -func draw_control_panel_prd(mode) -> void: - for node_path in Constants.NODE_MAP: - var index = Constants.NODE_MAP[node_path] - var node = get_node(node_path) - if node: - var value = node.get("text") - if value != null: - node.text = Constants.SIGNS_PRD[mode][index] - else: - node.fname = Constants.SIGNS_PRD[mode][index] +func draw_control_panel_prd(pribor) -> void: + if pribor == Constants.MODE.PRD_H: + # Кассета У5 + $TabContainer/ControlPanel/soc_y5/IP5_25.rname = 'А24' + $TabContainer/ControlPanel/soc_y5/ay07.rname = 'А30' + $TabContainer/ControlPanel/soc_y5/ems_g.rname = 'А26' + $TabContainer/ControlPanel/soc_y5/ug.rname = 'А27' + $TabContainer/ControlPanel/soc_y5/ukp_1.rname = 'А28' + $TabContainer/ControlPanel/soc_y5/ukp_2.rname = 'А29' + # Кассета ФС + $TabContainer/ControlPanel/Kasseta_FS/Kasseta.text = 'Кассета ФС-НД' + $TabContainer/ControlPanel/Kasseta_FS/Block_FS_PRD_K.visible = false + $TabContainer/ControlPanel/Kasseta_FS/FS_PRD_K.visible = false + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.rname = 'А1' + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.rname = 'А3' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.fname = 'БЛОК ФС-2' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.rname = 'А2' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.rname = 'А4' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.fname = 'БЛОК ФС-3' + # Кассета П-1 + $TabContainer/ControlPanel/soc_P1/IP12_50.rname = 'А21' + $TabContainer/ControlPanel/soc_P1/IP9_50_1.rname = 'А20' + $TabContainer/ControlPanel/soc_P1/IP9_50_2.rname = 'А19' + $TabContainer/ControlPanel/soc_P1/MAA_1.rname = 'А22' + $TabContainer/ControlPanel/soc_P1/MAA_2.rname = 'А23' + # Кассета П-2 + $TabContainer/ControlPanel/soc_P2.visible = false + + elif pribor == Constants.MODE.PRD_B: + # Кассета У5 + $TabContainer/ControlPanel/soc_y5/IP5_25.rname = 'А24' + $TabContainer/ControlPanel/soc_y5/ay07.rname = 'А30' + $TabContainer/ControlPanel/soc_y5/ems_g.rname = 'А26' + $TabContainer/ControlPanel/soc_y5/ug.rname = 'А27' + $TabContainer/ControlPanel/soc_y5/ukp_1.rname = 'А28' + $TabContainer/ControlPanel/soc_y5/ukp_2.rname = 'А29' + # Кассета ФС + $TabContainer/ControlPanel/Kasseta_FS/Kasseta.text = 'Кассета ФС-ВД' + $TabContainer/ControlPanel/Kasseta_FS/Block_FS_PRD_K.visible = false + $TabContainer/ControlPanel/Kasseta_FS/FS_PRD_K.visible = false + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.rname = 'А1' + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.rname = 'А3' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.fname = 'БЛОК ФС-4' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.rname = 'А2' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.rname = 'А4' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.fname = 'БЛОК ФС-5' + # Кассета П-1 + $TabContainer/ControlPanel/soc_P1/IP12_50.rname = 'А21' + $TabContainer/ControlPanel/soc_P1/IP9_50_1.rname = 'А20' + $TabContainer/ControlPanel/soc_P1/IP9_50_2.rname = 'А19' + $TabContainer/ControlPanel/soc_P1/MAA_1.rname = 'А22' + $TabContainer/ControlPanel/soc_P1/MAA_2.rname = 'А23' + # Кассета П-2 + $TabContainer/ControlPanel/soc_P2.visible = false + + elif pribor == Constants.MODE.PRD_K: + # Кассета У5 + $TabContainer/ControlPanel/soc_y5/IP5_25.rname = 'А31' + $TabContainer/ControlPanel/soc_y5/ay07.rname = 'А37' + $TabContainer/ControlPanel/soc_y5/ems_g.rname = 'А33' + $TabContainer/ControlPanel/soc_y5/ug.rname = 'А34' + $TabContainer/ControlPanel/soc_y5/ukp_1.rname = 'А35' + $TabContainer/ControlPanel/soc_y5/ukp_2.rname = 'А36' + # Кассета ФС + $TabContainer/ControlPanel/Kasseta_FS/Kasseta.text = 'Кассета ФС-КД' + $TabContainer/ControlPanel/Kasseta_FS/Block_FS_PRD_K.visible = true + $TabContainer/ControlPanel/Kasseta_FS/FS_PRD_K.visible = true + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.rname = 'А3' + $TabContainer/ControlPanel/Kasseta_FS/ref_A1.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.rname = 'А6' + $TabContainer/ControlPanel/Kasseta_FS/ref_A3.fname = 'БЛОК ФС-6' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.rname = 'А2' + $TabContainer/ControlPanel/Kasseta_FS/ref_A2.fname = 'Модуль ФС' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.rname = 'А5' + $TabContainer/ControlPanel/Kasseta_FS/ref_A4.fname = 'БЛОК ФС-7' + # Кассета П-1 + $TabContainer/ControlPanel/soc_P1/IP12_50.rname = 'А23' + $TabContainer/ControlPanel/soc_P1/IP12_50.fname = 'ИП9-50' + $TabContainer/ControlPanel/soc_P1/IP9_50_1.rname = 'А24' + $TabContainer/ControlPanel/soc_P1/IP9_50_1.fname = 'ИП9-50' + $TabContainer/ControlPanel/soc_P1/IP9_50_2.rname = 'А26' + $TabContainer/ControlPanel/soc_P1/IP9_50_2.fname = 'ИП12-50' + + $TabContainer/ControlPanel/soc_P1/MAA_1.rname = 'А27' + $TabContainer/ControlPanel/soc_P1/MAA_2.rname = 'А28' + # Кассета П-2 + $TabContainer/ControlPanel/soc_P2.visible = true ## From Network status about yau-07 @@ -79,7 +158,7 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void: var isa_data: Dictionary = {} for key in unit_isa_ports.keys(): isa_data[key] = unit_isa_ports[key] - + if isa_data.has(Constants.BASE_PORTS.EMS_G+2): var tmp = isa_data[Constants.BASE_PORTS.EMS_G+2] isa_data.erase(Constants.BASE_PORTS.EMS_G+2) @@ -95,7 +174,7 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void: if len(Constants.EMS_G_PORT_DATA_HOLDER) == 32: emit_signal('read_ems_g_finish') $ISA.text = 'ISA: ' + str(len(Constants.EMS_G_PORT_DATA_HOLDER)) - + if isa_data.has(Constants.BASE_PORTS.UG+6): $TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[0x106] & 0x7)) if isa_data.has(Constants.BASE_PORTS.UG+8): @@ -121,23 +200,23 @@ func _on_data_received(data_from_yau_07): var _DKM: int = data_from_yau_07.decode_u16(Constants.DataIndices.DKM) # ДКМ от УГ #node_select1.set_node_text(2, 0, '%d' % dry_contact) #node_select1.set_node_text(3, 0, '%d' % DKM) - - + + ## УКП for i in range(8): ## Мощность от УКП_1 var power_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_1 + 2 * i) node_select1.set_node_text(0, i+1, '%d' % power_ukp_1) - + for i in range(8): ## Температура от УКП_1 var temperature_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_1 + 2 * i) var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_1) * Constants.TEMP node_select1.set_node_text(1, i+1, '%d' % TMP) - + for i_pow in range(8): ## Мощность от УКП_2 if len(data_from_yau_07) > Constants.DataIndices.POWER_UKP_2 + 2 * i_pow: var power_ukp_2 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_2 + 2 * i_pow) node_select2.set_node_text(0, i_pow+1, '%d' % power_ukp_2) - + for row in range(8): ## Температура от УКП_2 if len(data_from_yau_07) > Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row: var temperature_ukp_2 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row) @@ -167,17 +246,17 @@ func _on_mfs_select() -> void: func _on_save_config(): print('Тебе сюда') - + func _on_load_config(): print('тебе сюда') - + func set_tab_and_buttons(tab_index: int, button_name: String) -> void: $TabContainer.current_tab = tab_index var side_panel = $Background/side_panel - + for button in side_panel.get_children(): if button is Button: button.button_pressed = (button.name == button_name) @@ -188,8 +267,8 @@ func on_btn_select(intem_from_sector: int) -> void: var get_select_device = node_select_device.get_node2(1, 0) var meta = get_select_device.get_item_metadata(intem_from_sector) Network.on_command_change_device(meta) - flag_mode = meta[2] - draw_control_panel_prd(flag_mode) + Constants.CURRENT_MODE = meta[2] + draw_control_panel_prd(Constants.CURRENT_MODE) func fill_item(node: Node, i_column: int, i_row: int, arr: Dictionary, select: int = 0) -> void: diff --git a/scripts/constants.gd b/scripts/constants.gd index f3ad916..e250744 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -46,6 +46,9 @@ const ADDRESSES: Array = [ ['ПРД-К2', '10.1.1.23', 50023, MODE.PRD_K, '10.1.2.38', '10.1.2.39', '10.1.2.33'], ['ПРД-К3', '10.1.1.33', 50033, MODE.PRD_K, '10.1.2.54', '10.1.2.55', '10.1.2.49'], ['ПРД-К4', '10.1.1.43', 50043, MODE.PRD_K, '10.1.2.70', '10.1.2.71', '10.1.2.65']] + +var CURRENT_MODE = ADDRESSES[0][3] + const INPUT_EMS_G: Array = [ '01 :34', '02 :35', @@ -157,7 +160,7 @@ const SIGNS_PRD: Array = [ '-', 'ИП5-25', ], - ## ПРК-Н + ## ПРД-Н [ ' Запрет СИ2', ' Запрет СИ3', @@ -184,37 +187,14 @@ const SIGNS_PRD: Array = [ 'ИП5-25', ], ] -var NODE_MAP = { - 'TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Zapret': 0, - 'TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Zapret2': 1, - 'TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/LABEL': 3, - 'TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/LABEL2': 4, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A22': 5, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A23': 6, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A26': 7, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A27': 8, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A28': 9, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A29': 10, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A31': 11, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A32': 12, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A33': 13, - 'TabContainer/ControlPanel/Signal_EMS_G/ref_A34': 14, - 'TabContainer/ControlPanel/soc_P1/ref_A23': 15, - 'TabContainer/ControlPanel/soc_P1/ref_A24': 16, - 'TabContainer/ControlPanel/soc_P1/ref_A25': 17, - 'TabContainer/ControlPanel/soc_P1/ref_A26': 18, - 'TabContainer/ControlPanel/soc_P1/ref_A27': 19, - 'TabContainer/ControlPanel/soc_P1/ref_A28': 20, - 'TabContainer/ControlPanel/soc_P1/ref_A29': 21, - 'TabContainer/ControlPanel/soc_P1/ref_A30': 22, - } + enum BASE_PORTS { UG = 0x100, EMS_G = 0x120, UKP_1 = 0x130, UKP_2 = 0x140, } - + enum MODE { PRD_K, PRD_B, @@ -246,7 +226,7 @@ enum STATE { DONE, IDLE, SEND, -} +} var EMS_G_PORT_DATA_HOLDER: Array = [] diff --git a/scripts/control_panel.gd b/scripts/control_panel.gd index 2f15fea..961f9cf 100644 --- a/scripts/control_panel.gd +++ b/scripts/control_panel.gd @@ -1,31 +1,36 @@ extends Panel var unit_yau07 = Yau07.YaU07.new('ЯУ07') +var sockets_ind: Array +var node_power_ind: Array func _ready() -> void: Network.connect('yau_receive', Callable(self, '_on_data_received')) Network.connect('yau_status_line', Callable(self, '_on_yau_status')) + sockets_ind = [ + $soc_y5/ems_g/light_ind, + $soc_y5/ug/light_ind, + $soc_y5/ukp_1/light_ind, + $soc_y5/ukp_2/light_ind] + + node_power_ind = [ + $soc_P1/MAA_1/light_ind, + $soc_P1/MAA_2/light_ind, + $soc_P1/IP9_50_2/light_ind, + $soc_P1/IP9_50_1/light_ind, + $soc_P1/IP12_50/light_ind, + $soc_P2/IP9_50/light_ind, + $soc_P2/IP12_50/light_ind, + $soc_y5/IP5_25/light_ind] + func lose_connect_yau(): for i in 4: - var sockets_ind = [$soc_y5/ref_A26/light_ind, - $soc_y5/ref_A27/light_ind, - $soc_y5/ref_A28/light_ind, - $soc_y5/ref_A29/light_ind] sockets_ind[i].button_pressed = false sockets_ind[i].disabled = true - for i in 8: - var node_power_ind = [$soc_P1/ref_A23/light_ind, - $soc_P1/ref_A24/light_ind, - $soc_P1/ref_A25/light_ind, - $soc_P1/ref_A26/light_ind, - $soc_P1/ref_A27/light_ind, - $soc_P1/ref_A28/light_ind, - $soc_P1/ref_A29/light_ind, - $soc_y5/ref_A24/light_ind] node_power_ind[i].button_pressed = false node_power_ind[i].disabled = true @@ -33,13 +38,9 @@ func lose_connect_yau(): func _on_data_received(data_from_yau_07): var status_board = data_from_yau_07.decode_u8(Constants.DataIndices.STATUS_BOARD) var dry_contact: int = data_from_yau_07.decode_u16(Constants.DataIndices.DRY_CONTACT) # Контроль сухих контактов (УГ) - + ## SOCKETS BOARDS for i in 4: - var sockets_ind = [$soc_y5/ref_A26/light_ind, - $soc_y5/ref_A27/light_ind, - $soc_y5/ref_A28/light_ind, - $soc_y5/ref_A29/light_ind] var j = int(status_board & (1 << i) == 0) if j == 0: sockets_ind[i].button_pressed = true @@ -47,27 +48,21 @@ func _on_data_received(data_from_yau_07): else: sockets_ind[i].button_pressed = false sockets_ind[i].disabled = true - + ## Блок ИП for i in 8: - var node_power_ind = [$soc_P1/ref_A23/light_ind, - $soc_P1/ref_A24/light_ind, - $soc_P1/ref_A25/light_ind, - $soc_P1/ref_A26/light_ind, - $soc_P1/ref_A27/light_ind, - $soc_P1/ref_A28/light_ind, - $soc_P1/ref_A29/light_ind, - $soc_y5/ref_A24/light_ind] var j = int(not(dry_contact & (1 << i) == 0)) + var a = node_power_ind[i] if j == 0: node_power_ind[i].button_pressed = true node_power_ind[i].disabled = false else: node_power_ind[i].button_pressed = false - node_power_ind[i].disabled = true + node_power_ind[i].disabled = true ## From Network status about yau-07 func _on_yau_status(yau_status:bool) -> void: - $soc_y5/ref_A30/light_ind.button_pressed = yau_status - $soc_y5/ref_A30/light_ind.disabled = not yau_status + $device.text = str(Constants.CURRENT_MODE) + $soc_y5/ay07/light_ind.button_pressed = yau_status + $soc_y5/ay07/light_ind.disabled = not yau_status From 3524937a90d277e889e5cf71a4258a414070619f Mon Sep 17 00:00:00 2001 From: danil_tim Date: Fri, 7 Feb 2025 13:16:46 +0300 Subject: [PATCH 13/15] =?UTF-8?q?=D0=BC=D0=BE=D1=80=D0=B4=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D1=8F=20=D0=BD=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D1=81=D0=BE=D0=B2=D0=B0=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PRD_MP550.tscn | 237 +++++++++++-------------------------------- scripts/PRD.gd | 12 +-- scripts/constants.gd | 71 +------------ scripts/ems_g.gd | 50 ++++----- 4 files changed, 93 insertions(+), 277 deletions(-) diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 31c8c9c..9ca0a5c 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=50 format=3 uid="uid://cvor2jm4xk3ha"] +[gd_scene load_steps=49 format=3 uid="uid://cvor2jm4xk3ha"] [ext_resource type="Script" path="res://scripts/PRD.gd" id="1_v273n"] [ext_resource type="Texture2D" uid="uid://cdxdluvyb5uei" path="res://table/on.png" id="2_dv7xx"] @@ -13,7 +13,6 @@ [ext_resource type="Script" path="res://scripts/ems_g.gd" id="9_g1wia"] [ext_resource type="Shader" path="res://load.gdshader" id="10_lf1xh"] [ext_resource type="PackedScene" uid="uid://bdb0bhfu7366l" path="res://kasseta-fs-kd.tscn" id="10_tdh2s"] -[ext_resource type="PackedScene" uid="uid://bnlkbbn7b4a3k" path="res://table/элемент-эмс.tscn" id="11_d60jk"] [ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://table/элемент-в.tscn" id="11_fg7ul"] [ext_resource type="Script" path="res://scripts/modul_fs.gd" id="15_b4pr1"] @@ -267,7 +266,7 @@ text = "Прочитать ISA" offset_left = 216.0 offset_top = 39.0 offset_right = 2420.0 -offset_bottom = 917.0 +offset_bottom = 936.0 theme = SubResource("Theme_k5ur4") theme_override_colors/font_unselected_color = Color(0, 0, 0, 0.0392157) theme_override_colors/font_selected_color = Color(0, 0, 0, 0) @@ -279,10 +278,11 @@ theme_override_styles/tab_selected = SubResource("StyleBoxTexture_k08q3") theme_override_styles/tab_hovered = SubResource("StyleBoxTexture_dklg6") theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6") tab_alignment = 2 -current_tab = 0 +current_tab = 1 tab_focus_mode = 0 [node name="PRD" type="Panel" parent="TabContainer"] +visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7") metadata/_tab_index = 0 @@ -424,7 +424,6 @@ script = ExtResource("2_vmbyo") node_gap = Vector2(100, 50) [node name="ControlPanel" type="Panel" parent="TabContainer"] -visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6") script = ExtResource("9_akagi") @@ -433,10 +432,10 @@ metadata/_edit_lock_ = true [node name="lbl_control" type="Label" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 4.0 -offset_top = 21.0 -offset_right = 624.0 -offset_bottom = 52.0 +offset_left = 45.0 +offset_top = -37.0 +offset_right = 665.0 +offset_bottom = -6.0 theme_override_font_sizes/font_size = 22 text = "Контроль исправности прибора ПРД-Н" horizontal_alignment = 1 @@ -445,16 +444,16 @@ vertical_alignment = 1 [node name="soc_y5" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 offset_left = 199.0 -offset_top = 103.0 +offset_top = 10.0 offset_right = 516.0 -offset_bottom = 293.0 +offset_bottom = 200.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 patch_margin_right = 16 patch_margin_bottom = 16 -[node name="ref_A24" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="IP5_25" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 9.0 offset_top = 34.0 offset_right = 59.0 @@ -474,7 +473,7 @@ fname = "ЯУ-07" rname = "A30" metadata/_edit_lock_ = true -[node name="ref_A26" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ems_g" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 109.0 offset_top = 34.0 offset_right = 159.0 @@ -484,7 +483,7 @@ fname = "ЭМС-Г" rname = "A26" metadata/_edit_lock_ = true -[node name="ref_A27" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ug" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 159.0 offset_top = 34.0 offset_right = 209.0 @@ -494,7 +493,7 @@ fname = "УГ" rname = "A27" metadata/_edit_lock_ = true -[node name="ref_A28" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ukp_1" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 209.0 offset_top = 34.0 offset_right = 259.0 @@ -505,7 +504,7 @@ fname = "УКП-1" rname = "A28" metadata/_edit_lock_ = true -[node name="ref_A29" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +[node name="ukp_2" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 259.0 offset_top = 34.0 offset_right = 309.0 @@ -630,30 +629,20 @@ horizontal_alignment = 1 vertical_alignment = 1 [node name="MAA_1" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = -63.0 -offset_top = 36.0 -offset_right = -13.0 -offset_bottom = 210.0 -[node name="ref_A23" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 40.0 -offset_top = -206.0 -offset_right = 90.0 -offset_bottom = -32.0 +offset_left = -64.0 +offset_top = 37.0 +offset_right = -14.0 +offset_bottom = 211.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "МАА2000" rname = "А22" [node name="MAA_2" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 199.0 -offset_top = 37.0 -offset_right = 249.0 -offset_bottom = 211.0 -[node name="ref_A24" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 40.0 -offset_top = -448.0 -offset_right = 90.0 -offset_bottom = -274.0 +offset_left = 203.0 +offset_top = 36.0 +offset_right = 253.0 +offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "МАА2000" @@ -679,11 +668,6 @@ self_size = Vector2i(50, 174) fname = "ИП9-50" rname = "А20" -[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -offset_left = 16.0 -offset_top = 37.0 -offset_right = 66.0 -offset_bottom = 211.0 [node name="ref_A28" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] visible = false offset_left = 259.0 @@ -695,12 +679,34 @@ self_size = Vector2i(50, 174) fname = "ИП12-50" rname = "A21" +[node name="ref_A29" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +visible = false +offset_left = 309.0 +offset_top = 34.0 +offset_right = 359.0 +offset_bottom = 208.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП9-50" +rname = "А22" +metadata/_edit_lock_ = true + +[node name="IP12_50" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] +offset_left = 16.0 +offset_top = 36.0 +offset_right = 66.0 +offset_bottom = 210.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП12-50" +rname = "А21" + [node name="soc_P2" type="NinePatchRect" parent="TabContainer/ControlPanel"] layout_mode = 0 -offset_left = 258.0 -offset_top = 649.0 -offset_right = 446.0 -offset_bottom = 865.0 +offset_left = 278.0 +offset_top = 645.0 +offset_right = 432.0 +offset_bottom = 861.0 texture = ExtResource("9_0r2qk") patch_margin_left = 16 patch_margin_top = 16 @@ -710,154 +716,33 @@ patch_margin_bottom = 16 [node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_P2"] self_modulate = Color(1, 1, 1, 0.62) layout_mode = 0 -offset_left = 7.0 +offset_left = 8.0 offset_top = 8.0 -offset_right = 181.0 +offset_right = 142.0 offset_bottom = 33.0 text = "Кассета П-2" horizontal_alignment = 1 vertical_alignment = 1 -[node name="IP9_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] -offset_left = 73.0 -offset_top = 36.0 -offset_right = 123.0 -offset_bottom = 210.0 -[node name="ref_A29" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")] -visible = false -offset_left = 309.0 -offset_top = 34.0 -offset_right = 359.0 -offset_bottom = 208.0 -textures = Array[Texture]([]) -self_size = Vector2i(50, 174) -metadata/_edit_lock_ = true -fname = "ИП9-50" -rname = "А22" - [node name="IP12_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] -offset_left = 128.0 +offset_left = 81.0 offset_top = 36.0 -offset_right = 178.0 +offset_right = 131.0 offset_bottom = 210.0 textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП12-50" rname = "A25" -[node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"] -layout_mode = 0 -offset_left = 536.0 -offset_top = 550.0 -offset_right = 1055.0 -offset_bottom = 777.0 -texture = ExtResource("9_0r2qk") -patch_margin_left = 16 -patch_margin_top = 16 -patch_margin_right = 16 -patch_margin_bottom = 16 - -[node name="lbl_fname" type="Label" parent="TabContainer/ControlPanel/Signal_EMS_G"] -self_modulate = Color(1, 1, 1, 0.62) -layout_mode = 0 -offset_left = 7.0 -offset_top = 8.0 -offset_right = 508.0 -offset_bottom = 33.0 -text = "ЭМС-Г" -horizontal_alignment = 1 -vertical_alignment = 1 -metadata/_edit_lock_ = true - -[node name="ref_A22" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 9.0 -offset_top = 38.0 -offset_right = 59.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) +[node name="IP9_50" parent="TabContainer/ControlPanel/soc_P2" instance=ExtResource("11_fg7ul")] +offset_left = 24.0 +offset_top = 36.0 +offset_right = 74.0 +offset_bottom = 210.0 +textures = Array[Texture]([]) +self_size = Vector2i(50, 174) +fname = "ИП9-50" rname = "A22" -metadata/_edit_lock_ = true - -[node name="ref_A23" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 59.0 -offset_top = 38.0 -offset_right = 109.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A23" -metadata/_edit_lock_ = true - -[node name="ref_A26" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 109.0 -offset_top = 38.0 -offset_right = 159.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A26" -metadata/_edit_lock_ = true - -[node name="ref_A27" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 159.0 -offset_top = 38.0 -offset_right = 209.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A27" -metadata/_edit_lock_ = true - -[node name="ref_A28" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 209.0 -offset_top = 38.0 -offset_right = 259.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A28" -metadata/_edit_lock_ = true - -[node name="ref_A29" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 259.0 -offset_top = 38.0 -offset_right = 309.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A29" -metadata/_edit_lock_ = true - -[node name="ref_A31" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 309.0 -offset_top = 38.0 -offset_right = 359.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "УМ2" -metadata/_edit_lock_ = true - -[node name="ref_A32" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 359.0 -offset_top = 38.0 -offset_right = 409.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "УМ3" -metadata/_edit_lock_ = true - -[node name="ref_A33" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 409.0 -offset_top = 38.0 -offset_right = 459.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A33" -metadata/_edit_lock_ = true - -[node name="ref_A34" parent="TabContainer/ControlPanel/Signal_EMS_G" instance=ExtResource("11_d60jk")] -offset_left = 459.0 -offset_top = 38.0 -offset_right = 509.0 -offset_bottom = 216.0 -self_size = Vector2i(50, 178) -rname = "A33" -metadata/_edit_lock_ = true [node name="device" type="Label" parent="TabContainer/ControlPanel"] layout_mode = 0 diff --git a/scripts/PRD.gd b/scripts/PRD.gd index ce784db..a86b892 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -125,7 +125,7 @@ func _ready() -> void: for key in Constants.RAY_DICT: node_select_yau_07b.get_node2(1, 3).add_item(key) node_select_yau_07b_2.get_node2(1, 3).add_item(key) - + ## Заполненение списка аттенюатора for key in Constants.ATT_DICT: node_select_yau_07b.get_node2(1, 4).add_item(key) @@ -348,13 +348,13 @@ func _on_data_received(data_from_yau_07): var _DKM: int = data_from_yau_07.decode_u16(Constants.DataIndices.DKM) # ДКМ от УГ #node_select1.set_node_text(2, 0, '%d' % dry_contact) #node_select1.set_node_text(3, 0, '%d' % DKM) - - + + ## УКП for i in range(6): ## Мощность от УКП_1 var power_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_1 + 2 * i) node_select1.set_node_text(0, i+1, '%d' % power_ukp_1) - + for i in range(6): ## Температура от УКП_1 var temperature_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_1 + 2 * i) var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_1) * Constants.TEMP @@ -364,7 +364,7 @@ func _on_data_received(data_from_yau_07): if len(data_from_yau_07) > Constants.DataIndices.POWER_UKP_2 + 2 * i_pow: var power_ukp_2 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_2 + 2 * i_pow) node_select2.set_node_text(0, i_pow+1, '%d' % power_ukp_2) - + for row in range(6): ## Температура от УКП_2 if len(data_from_yau_07) > Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row: var temperature_ukp_2 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row) @@ -479,7 +479,7 @@ func _on_load_config(): func set_tab_and_buttons(tab_index: int, button_name: String) -> void: $TabContainer.current_tab = tab_index var side_panel = $Background/side_panel - + for button in side_panel.get_children(): if button is Button: button.button_pressed = (button.name == button_name) diff --git a/scripts/constants.gd b/scripts/constants.gd index 6d2c3fe..4eb493b 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -6,7 +6,7 @@ const DEFAULT_ADDRESS: String = '10.1.1.11' const DEFAULT_PORT: String = '50011' const CONST_MIN_TEMP: int = -25 const MAXIMUM_CODE_ADC: int = 3796 -const MINIMUM_CODE_AD: int = 2660 +const MINIMUM_CODE_AD: int = 2660 const TEMP: float = 115.0 / (MAXIMUM_CODE_ADC - MINIMUM_CODE_AD) const TableNode = preload("res://table/node.tscn") const TableList = preload("res://table/node_list.tscn") @@ -121,75 +121,6 @@ const ATT_DICT: Array = [ ' 10 dB', ' 10.5 dB', ] -const SIGNS_PRD: Array = [ - ## ПРК-К - [ - ' Запрет СИ7', - ' Запрет СИ1', - 'ЛИТЕРА 7! ПРД-К', - 'СЗИ6 от УФ', - 'СЗИ7 от УФ', - 'СИ6 от ФС', - 'СИ7 от ФС', - 'СИ6 в УФ', - 'СИ7 в УФ', - 'Мод. УМ 6', - 'Мод. УМ 7', - 'ФГОЗ 6', - 'Мод. УМ 1', - 'МАА №1', - 'МАА №2', - 'ИП9-50 №1', - 'ИП9-50 №2', - 'ИП9-50 №3', - 'ИП5-25', - ], - ## ПРК-В - [ - ' Запрет СИ4', - ' Запрет СИ5', - '', - 'ЛИТЕРА 5! ПРД-В', - 'СЗИ4 от УФ', - 'СЗИ5 от УФ', - 'СИ4 от ФС', - 'СИ5 от ФС', - 'СИ4 в УФ', - 'СИ5 в УФ', - 'Мод. УМ 4', - 'Мод. УМ 5', - 'ФГОЗ 4', - 'ФГОЗ 5', - 'МАА №1', - 'МАА №2', - 'ИП9-50 №1', - 'ИП9-50 №2', - '-', - '-', - 'ИП5-25', - ], - ## ПРД-Н - [ - ' Запрет СИ3', - '', - 'ЛИТЕРА 3! ПРД-Н', - 'СИ3 от ФС', - 'СИ2 в УФ', - 'СИ3 в УФ', - 'Мод. УМ 2', - 'Мод. УМ 3', - 'ФГОЗ 3', - '-', - 'МАА №1', - 'МАА №2', - 'ИП9-50 №1', - 'ИП9-50 №2', - '-', - '-', - 'ИП5-25', - '--', - ], -] enum BASE_PORTS { UG = 0x100, diff --git a/scripts/ems_g.gd b/scripts/ems_g.gd index 0821155..760296d 100644 --- a/scripts/ems_g.gd +++ b/scripts/ems_g.gd @@ -10,7 +10,7 @@ func _on_read_ems_g(): for i_input in 16: Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_input) Network.read_port_isa([Constants.BASE_PORTS.EMS_G+0xA]) - + for i_output in range(46, 62): Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 1+i_output) Network.read_port_isa([Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+8]) @@ -27,7 +27,7 @@ func _on_sync(): port0x124 = Constants.EMS_G_PORT_DATA_HOLDER[index][1][key] for row in 16: if (port0x124 & (1 << row)) != 0: - var chk_btn = node_select1.get_node2(tmp_device_mode-45, row+3).get_child(1, false) + var chk_btn = node_select1.get_node2(tmp_device_mode-45, row+3).get_child(1, false) chk_btn.button_pressed =true if key == 0x128: port0x128 = Constants.EMS_G_PORT_DATA_HOLDER[index][1][key] @@ -52,24 +52,24 @@ func _ready() -> void: else: column.append(Constants.TableNode) EMS_G_TABLE.append(column) - + draw_tabl(node_select1, EMS_G_TABLE, EMS_G_TABLE.size()) - + node_select1.get_node2(1, 1).text = 'x3_ВЫХ:GND' node_select1.get_node2(0, 2).text = 'x3_ВХ :GND' for i in Constants.INPUT_EMS_G.size(): node_select1.get_node2(0, i+shift+1).text = Constants.INPUT_EMS_G[i] - + for i in Constants.OUT_EMS_G.size(): node_select1.get_node2(i+shift, 1).text = Constants.OUT_EMS_G[i][1] - + for i in EMS_G_TABLE[0].size()-shift: var list = node_select1.get_node2(i+shift, 0) list.set_meta('device', Constants.OUT_EMS_G[i][0]) list.connect('item_selected', Callable(self, 'on_mode_link').bind(list)) for k in Constants.OUT_x128.size(): - list.add_item(Constants.OUT_x128[k]) - + list.add_item(Constants.OUT_x128[k]) + var columns_min_size: Array for i in EMS_G_TABLE[0].size(): if i < 2: @@ -77,13 +77,13 @@ func _ready() -> void: else: columns_min_size.append(80) node_select1.set_columns_min_size(columns_min_size) - + 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) - + func draw_tabl(tbl, row: Array, count_row: int): for i_row in count_row: @@ -96,23 +96,23 @@ func _on_data_received(data_from_yau_07): 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, parent_node2) + #process_sockets_horizon(out_blank, out_imp, 16, 2, parent_node2) + + func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_node2: Node): for i in count: var socket_status = node_select1.get_node2(col+i, shift).get_child(1, false) var frame_type = Constants.Frame.WORK - + if (blank & (1 << i)) != 0: frame_type = Constants.Frame.CONSTANT elif (imp & (1 << i)) != 0: frame_type = Constants.Frame.VARIABLE - + set_frame(socket_status, frame_type) - + if i == 1: set_frame(get_specific_node(parent_node2, 5), frame_type) if i == 2: @@ -129,14 +129,14 @@ func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_nod 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 - + if (blank & (1 << i)) != 0: frame_type = Constants.Frame.CONSTANT elif (imp & (1 << i)) != 0: frame_type = Constants.Frame.VARIABLE - + set_frame(socket_status, frame_type) - + if i == 1: set_frame(get_specific_node(parent_node2, 1), frame_type) 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) @@ -170,7 +170,7 @@ func create_link_button(node, count_rows_sart: int, count_rows_end: int, coln_st for i_colum in 16: META_EMS_G.append([INPUT+i_row, OUTPUT+i_colum]) button_link_meta[OUTPUT+i_colum] = 0 - + var count_register = 0 for i_row in range(count_rows_sart, count_rows_end): for i_col in range (coln_start, coln_end): @@ -188,7 +188,7 @@ func on_mouse_entered(meta_area): var device = meta_area.get_meta('device') var y = device[0] + 1 var x = device[1] - 45 - + for i_y in 18: for i_x in 18: if i_y <= y and i_x <= x and i_y == y: @@ -207,9 +207,9 @@ func on_mode_link(mode, list): var meta = list.get_meta('device') var address_port_wr = Constants.BASE_PORTS.EMS_G+2 Network.write_port_isa(address_port_wr, meta) # Отправка команды - + ## Формирование команды для отправкы команды на устройство - address_port_wr = Constants.BASE_PORTS.EMS_G+8 + 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 Network.write_port_isa(address_port_wr, set_mode) From 2e8082a26a93e203860619a2cd86ec378a434506 Mon Sep 17 00:00:00 2001 From: danil_tim Date: Mon, 10 Feb 2025 13:02:26 +0300 Subject: [PATCH 14/15] =?UTF-8?q?=D0=BC=D0=BE=D1=80=D0=B4=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PRD_MP550.tscn | 47 ++++------------ scripts/PRD.gd | 4 +- scripts/constants.gd | 9 ++- scripts/control_panel.gd | 52 +++++------------ scripts/network.gd | 24 ++++---- scripts/nine-patch-button.gd | 86 +++++++++++++++++++++++++++++ table/элемент-в.tscn | 59 +++++--------------- состояние-исправности-0.png | Bin 0 -> 4148 bytes состояние-исправности-0.png.import | 34 ++++++++++++ состояние-исправности-1.png | Bin 0 -> 2606 bytes состояние-исправности-1.png.import | 34 ++++++++++++ состояние-исправности-2.png | Bin 0 -> 2275 bytes состояние-исправности-2.png.import | 34 ++++++++++++ 13 files changed, 245 insertions(+), 138 deletions(-) create mode 100644 scripts/nine-patch-button.gd create mode 100644 состояние-исправности-0.png create mode 100644 состояние-исправности-0.png.import create mode 100644 состояние-исправности-1.png create mode 100644 состояние-исправности-1.png.import create mode 100644 состояние-исправности-2.png create mode 100644 состояние-исправности-2.png.import diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 9ca0a5c..810dd1a 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -458,61 +458,48 @@ offset_left = 9.0 offset_top = 34.0 offset_right = 59.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "ИП5-25" rname = "A24" -metadata/_edit_lock_ = true [node name="ay07" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 59.0 offset_top = 34.0 offset_right = 109.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "ЯУ-07" rname = "A30" -metadata/_edit_lock_ = true [node name="ems_g" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 109.0 offset_top = 34.0 offset_right = 159.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "ЭМС-Г" rname = "A26" -metadata/_edit_lock_ = true [node name="ug" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 159.0 offset_top = 34.0 offset_right = 209.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "УГ" rname = "A27" -metadata/_edit_lock_ = true - -[node name="ukp_1" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] -offset_left = 209.0 -offset_top = 34.0 -offset_right = 259.0 -offset_bottom = 183.0 -textures = Array[Texture]([]) -self_size = Vector2i(50, 149) -fname = "УКП-1" -rname = "A28" -metadata/_edit_lock_ = true [node name="ukp_2" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] offset_left = 259.0 offset_top = 34.0 offset_right = 309.0 offset_bottom = 184.0 -textures = Array[Texture]([]) fname = "УКП-2" rname = "A29" -metadata/_edit_lock_ = true + +[node name="ukp_1" parent="TabContainer/ControlPanel/soc_y5" instance=ExtResource("11_fg7ul")] +offset_left = 210.0 +offset_top = 35.0 +offset_right = 260.0 +offset_bottom = 185.0 +fname = "УКП-1" +rname = "A28" [node name="Kasseta" type="Label" parent="TabContainer/ControlPanel/soc_y5"] self_modulate = Color(1, 1, 1, 0.62) @@ -543,14 +530,12 @@ offset_bottom = 33.0 text = "Кассета ФС-НД" horizontal_alignment = 1 vertical_alignment = 1 -metadata/_edit_lock_ = true [node name="ref_A3" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 109.0 offset_top = 41.0 offset_right = 159.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "БЛОК ФС-2" rname = "A3" @@ -560,7 +545,6 @@ offset_left = 159.0 offset_top = 41.0 offset_right = 209.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "Модуль ФС" rname = "A1" @@ -570,7 +554,6 @@ offset_left = 209.0 offset_top = 41.0 offset_right = 259.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "Модуль ФС" rname = "A2" @@ -580,17 +563,15 @@ offset_left = 259.0 offset_top = 41.0 offset_right = 309.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "БЛОК ФС-3" rname = "A4" [node name="Block_FS_PRD_K" parent="TabContainer/ControlPanel/Kasseta_FS" instance=ExtResource("11_fg7ul")] offset_left = 12.0 -offset_top = 41.0 +offset_top = 40.0 offset_right = 62.0 -offset_bottom = 211.0 -textures = Array[Texture]([]) +offset_bottom = 210.0 self_size = Vector2i(50, 170) fname = "БЛОК ФС-1" rname = "A4" @@ -600,7 +581,6 @@ offset_left = 61.0 offset_top = 41.0 offset_right = 111.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 170) fname = "Модуль ФС" rname = "A1" @@ -633,7 +613,6 @@ offset_left = -64.0 offset_top = 37.0 offset_right = -14.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "МАА2000" rname = "А22" @@ -643,7 +622,6 @@ offset_left = 203.0 offset_top = 36.0 offset_right = 253.0 offset_bottom = 210.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "МАА2000" rname = "А23" @@ -653,7 +631,6 @@ offset_left = 129.0 offset_top = 37.0 offset_right = 179.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП9-50" rname = "А19" @@ -663,7 +640,6 @@ offset_left = 73.0 offset_top = 37.0 offset_right = 123.0 offset_bottom = 211.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП9-50" rname = "А20" @@ -696,7 +672,6 @@ offset_left = 16.0 offset_top = 36.0 offset_right = 66.0 offset_bottom = 210.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП12-50" rname = "А21" @@ -729,7 +704,6 @@ offset_left = 81.0 offset_top = 36.0 offset_right = 131.0 offset_bottom = 210.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП12-50" rname = "A25" @@ -739,7 +713,6 @@ offset_left = 24.0 offset_top = 36.0 offset_right = 74.0 offset_bottom = 210.0 -textures = Array[Texture]([]) self_size = Vector2i(50, 174) fname = "ИП9-50" rname = "A22" diff --git a/scripts/PRD.gd b/scripts/PRD.gd index a86b892..46bed50 100644 --- a/scripts/PRD.gd +++ b/scripts/PRD.gd @@ -131,7 +131,7 @@ func _ready() -> void: node_select_yau_07b.get_node2(1, 4).add_item(key) node_select_yau_07b_2.get_node2(1, 4).add_item(key) - draw_control_panel_prd(Constants.ADDRESSES[0][3]) + #draw_control_panel_prd(Constants.ADDRESSES[0][3]) Network.connect('yau_status_line', Callable(self, '_on_yau_status')) Network.connect('yau_receive', Callable(self, '_on_data_received')) @@ -490,8 +490,6 @@ func on_btn_select(intem_from_sector: int) -> void: var get_select_device = node_select_device.get_node2(1, 0) var meta = get_select_device.get_item_metadata(intem_from_sector) Network.on_command_change_device(meta) - flag_mode = meta[2] - draw_control_panel_prd(flag_mode) _on_start_fs_1() Constants.CURRENT_MODE = meta[2] draw_control_panel_prd(Constants.CURRENT_MODE) diff --git a/scripts/constants.gd b/scripts/constants.gd index 4eb493b..3db2a63 100644 --- a/scripts/constants.gd +++ b/scripts/constants.gd @@ -1,6 +1,6 @@ extends Node -const UNICAST_PORT: int = 50003 -const UNICAST_ADDRESS: String = '10.1.1.3' +const UNICAST_PORT: int = 50014 +const UNICAST_ADDRESS: String = '10.1.1.14' const BROADCAST_PORT: int = 50000 const DEFAULT_ADDRESS: String = '10.1.1.11' const DEFAULT_PORT: String = '50011' @@ -162,6 +162,11 @@ enum STATE { SEND, } +enum STATE_VAL { + NONE = 0, + GOOD = 1, + ERROR = 2 } + var EMS_G_PORT_DATA_HOLDER: Array = [] # Таблица CRC-32 для модуля ФС diff --git a/scripts/control_panel.gd b/scripts/control_panel.gd index 961f9cf..0bf2e4b 100644 --- a/scripts/control_panel.gd +++ b/scripts/control_panel.gd @@ -1,15 +1,18 @@ extends Panel var unit_yau07 = Yau07.YaU07.new('ЯУ07') -var sockets_ind: Array -var node_power_ind: Array func _ready() -> void: Network.connect('yau_receive', Callable(self, '_on_data_received')) - Network.connect('yau_status_line', Callable(self, '_on_yau_status')) + Network.connect('yau_status_line', Callable(self, '_control_pribor')) - sockets_ind = [ + var timer = Timer.new() + self.add_child(timer) + timer.connect('timeout', Callable(self, 'on_timer')) + timer.start(1) + + '''sockets_ind = [ $soc_y5/ems_g/light_ind, $soc_y5/ug/light_ind, $soc_y5/ukp_1/light_ind, @@ -23,46 +26,17 @@ func _ready() -> void: $soc_P1/IP12_50/light_ind, $soc_P2/IP9_50/light_ind, $soc_P2/IP12_50/light_ind, - $soc_y5/IP5_25/light_ind] - - -func lose_connect_yau(): - for i in 4: - sockets_ind[i].button_pressed = false - sockets_ind[i].disabled = true - for i in 8: - node_power_ind[i].button_pressed = false - node_power_ind[i].disabled = true + $soc_y5/IP5_25/light_ind]''' +func on_timer(unit): + print(unit) func _on_data_received(data_from_yau_07): var status_board = data_from_yau_07.decode_u8(Constants.DataIndices.STATUS_BOARD) var dry_contact: int = data_from_yau_07.decode_u16(Constants.DataIndices.DRY_CONTACT) # Контроль сухих контактов (УГ) - ## SOCKETS BOARDS - for i in 4: - var j = int(status_board & (1 << i) == 0) - if j == 0: - sockets_ind[i].button_pressed = true - sockets_ind[i].disabled = false - else: - sockets_ind[i].button_pressed = false - sockets_ind[i].disabled = true - - ## Блок ИП - for i in 8: - var j = int(not(dry_contact & (1 << i) == 0)) - var a = node_power_ind[i] - if j == 0: - node_power_ind[i].button_pressed = true - node_power_ind[i].disabled = false - else: - node_power_ind[i].button_pressed = false - node_power_ind[i].disabled = true - ## From Network status about yau-07 -func _on_yau_status(yau_status:bool) -> void: - $device.text = str(Constants.CURRENT_MODE) - $soc_y5/ay07/light_ind.button_pressed = yau_status - $soc_y5/ay07/light_ind.disabled = not yau_status +func _control_pribor(yau_status:bool) -> void: + #$device.text = str(Constants.CURRENT_MODE) + $soc_y5/ay07.state = Constants.STATE_VAL.GOOD diff --git a/scripts/network.gd b/scripts/network.gd index cf8ad61..0cf50e3 100644 --- a/scripts/network.gd +++ b/scripts/network.gd @@ -46,7 +46,7 @@ func poll_receive_yau07(sock: Socket) -> bool: ## Приёмник broadcast_packet = sock.get_packet() var addr_receive = sock.get_packet_ip() var port_receive = sock.get_packet_port() - + if (ip_address_yau == addr_receive) and (ip_port_yau == port_receive): last_update_time_yau07 = 0.0 unit.parse(broadcast_packet) @@ -69,7 +69,7 @@ func poll_receive_fs(client: StreamPeerTCP): if client.get_status() != StreamPeerTCP.STATUS_CONNECTED: emit_signal("port_closed", ip_fs_1) return - + if peer.get_available_bytes() > 0: var rx_data: PackedByteArray rx_data.append_array(peer.get_data(peer.get_available_bytes())[1]) @@ -85,11 +85,11 @@ func _ready() -> void: var rc = soc_brodcast.bind(Constants.BROADCAST_PORT, '*') if rc != OK: print_debug('Ошибка: Неудачная привязка широковещательного адреса') - + soc_unicast = Socket.new() rc = soc_unicast.bind(Constants.UNICAST_PORT, Constants.UNICAST_ADDRESS) if rc != OK: - print_debug('Ошибка: неудачная привязка адреса: ', ip_address_yau) + print_debug('Ошибка: неудачная привязка адреса: ', ip_address_yau) unit.connect('line_changed', Callable(self, 'on_line_changed')) unit.connect('command_fail', Callable(self, 'on_command_fail')) @@ -101,16 +101,16 @@ func _process(delta: float) -> void: last_update_time_yau07 += delta last_update_time_fs += delta - + if client_fs_1: poll_receive_fs(client_fs_1) - + poll_receive_yau07(soc_brodcast) poll_receive_yau07(soc_unicast) - + state_machine_yau07() state_machine_fs() - + match unit.process(delta): Error.OK: soc_unicast.send_to(ip_address_yau, ip_port_yau, unit.tx_data.slice(0, unit.tx_len)) Error.FAILED: print_debug('Ошибка отправки данных') @@ -142,12 +142,12 @@ func state_machine_yau07(): state = Constants.STATE.WAIT -# Записать команду в ИСА +# Записать команду в ИСА func read_port_isa(read_ports: Array) -> void: send_array.append(['rd', read_ports]) -# Прочитать данные из порта от ИСА +# Прочитать данные из порта от ИСА func write_port_isa(port_isa: int, data_isa: int) -> void: var write_data: Dictionary = {port_isa: data_isa} send_array.append(['wr', write_data]) @@ -185,7 +185,7 @@ func state_machine_fs(): func connect_fs(): if client_fs_1: disconnect_fs(client_fs_1) - + client_fs_1 = StreamPeerTCP.new() peerstream_fs_1 = PacketPeerStream.new() var rc = client_fs_1.connect_to_host(ip_fs_1, Constants.PORT_FS) @@ -201,7 +201,7 @@ func send_data(data_to_sand: PackedByteArray): var peer = peerstream_fs_1.get_stream_peer() if peer: peer.put_data(data_to_sand) - emit_signal("data_send") + emit_signal("data_send") # Разорвать соединение с ФС diff --git a/scripts/nine-patch-button.gd b/scripts/nine-patch-button.gd new file mode 100644 index 0000000..a03ad20 --- /dev/null +++ b/scripts/nine-patch-button.gd @@ -0,0 +1,86 @@ +@tool + +extends PanelContainer + +func set_text(val: String): $button.set_text(val) +func set_pressed(val: bool): $button.set_pressed(val) +func set_disabled(val: bool): disabled = val +func get_text(): return $button.get_text() +func is_pressed(): return $button.is_pressed() +func is_toggle_mode(): return $button.is_toggle_mode() + + +@export var texture_state0: Texture2D = preload('res://table/элемент-в.tscn::GradientTexture2D_d3qtt'): + set(val): $state.set_texture(val) + + +@export var texture_state1: Texture2D = preload('res://table/элемент-в.tscn::GradientTexture2D_k8o6s'): + set(val): $state.set_texture(val) + + +@export var strips_rotation: float = 0.0: + set(val): + strips_rotation = val + $back.strips_rotation = deg_to_rad(val) + get: return strips_rotation + + +@export var text: String = '': + set(val): $button.set_text(val) + get: return $button.get_text() + + +@export var disabled: bool = false: + set(val): + disabled = val + $button.set_disabled(val) + $back.disabled = val + $state.modulate.a = 0.5 if val else 1.0 + get: return disabled + + +@export var pressed: bool = false: + set(val): + pressed = val + $button.set_pressed(val) + get: + return pressed + + +@export var toggle_mode: bool = false: + set(val): + toggle_mode = val + $button.set_toggle_mode(val) + get: + return toggle_mode + + +func button_connect(button_signal: String, proc: Callable): + var rc = $button.connect(button_signal, proc) + if rc != Error.OK: + push_error('возникла ошибка \"%s\" при подключении сигнала \"%s\" к обработчику \"%s\"' % [error_string(rc), button_signal, proc]) + + +func _on_resized() -> void: + $back.scale = size + $back.material.set('shader_parameter/scale', size / Vector2(20.0, 20.0)) + + +func _enter_tree() -> void: + $back.scale = size + $back.material.set('shader_parameter/scale', size / Vector2(20.0, 20.0)) + $button.set_toggle_mode(true) + $button.connect('toggled', _on_button_toggled) + + +func _exit_tree() -> void: + $button.disconnect('toggled', _on_button_toggled) + + +func set_toggle_mode(val: bool): + $button.set_toggle_mode(val) + + +func _on_button_toggled(val: bool): + if val: $state.set_texture(texture_state1) + else: $state.set_texture(texture_state0) diff --git a/table/элемент-в.tscn b/table/элемент-в.tscn index 7449675..b2ea5f0 100644 --- a/table/элемент-в.tscn +++ b/table/элемент-в.tscn @@ -1,8 +1,11 @@ -[gd_scene load_steps=15 format=3 uid="uid://p2suppildvq0"] +[gd_scene load_steps=12 format=3 uid="uid://p2suppildvq0"] +[ext_resource type="Texture2D" uid="uid://ce3qpf070wgd2" path="res://состояние-исправности-0.png" id="1_2n7he"] [ext_resource type="Texture2D" uid="uid://cgtg4gbqnuxrc" path="res://nine-patch-round.png" id="2_4b43i"] +[ext_resource type="Texture2D" uid="uid://byweg7pgt8o4h" path="res://состояние-исправности-1.png" id="2_38t58"] [ext_resource type="Shader" path="res://opt_btn.gdshader" id="2_ecsml"] [ext_resource type="Texture2D" uid="uid://dkef6xwxwdxi8" path="res://эмс-бланк.png" id="3_4kmgr"] +[ext_resource type="Texture2D" uid="uid://bvikuv0lbvou8" path="res://состояние-исправности-2.png" id="3_i2t3v"] [ext_resource type="Texture2D" uid="uid://b15flrfytxkop" path="res://эмс-бланк-пост.png" id="4_omove"] [ext_resource type="Texture2D" uid="uid://ijdfo2mml54" path="res://эмс-бланк-перем.png" id="5_jia67"] @@ -44,8 +47,8 @@ func _resize_children() -> void: $lbl_rname.position.y = margins[0] $lbl_fname.size.y = size.x $lbl_fname.position.y = size.y / 2 + $lbl_fname.size.x / 2 - $light_ind.position.x = size.x / 2 - ($light_ind.size.x * $light_ind.scale.x) / 2 - $light_ind.position.y = size.y - $light_ind.size.y * $light_ind.scale.x - margins[2] + $txr_state.position.x = size.x / 2 - ($txr_state.size.x * $txr_state.scale.x) / 2 + $txr_state.position.y = size.y - $txr_state.size.y * $txr_state.scale.x - margins[2] func _on_nine_patch_rect_resized() -> void: @@ -75,37 +78,6 @@ shader = ExtResource("2_ecsml") shader_parameter/range = 0.4 shader_parameter/color = Color(0.764706, 0.764706, 0.764706, 1) -[sub_resource type="Gradient" id="Gradient_x8k3w"] -colors = PackedColorArray(1, 1, 1, 1, 0.393086, 0.393086, 0.393085, 1) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_cgu2r"] -gradient = SubResource("Gradient_x8k3w") -width = 25 -height = 25 -fill = 1 -fill_from = Vector2(0.5, 0.5) -fill_to = Vector2(1.125, 0) - -[sub_resource type="Gradient" id="Gradient_1tk1g"] -colors = PackedColorArray(0.1, 1, 0.1, 1, 0.124744, 0.328804, 0.202483, 1) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_d3qtt"] -gradient = SubResource("Gradient_1tk1g") -width = 25 -height = 25 -fill = 1 -fill_from = Vector2(0.5, 0.5) - -[sub_resource type="Gradient" id="Gradient_6e32x"] -colors = PackedColorArray(1, 0.1, 0.1, 1, 0.329, 0.125, 0.202, 1) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_k8o6s"] -gradient = SubResource("Gradient_6e32x") -width = 25 -height = 25 -fill = 1 -fill_from = Vector2(0.5, 0.5) - [sub_resource type="SpriteFrames" id="SpriteFrames_nofpw"] animations = [{ "frames": [{ @@ -133,7 +105,7 @@ anchors_preset = 0 offset_right = 50.0 offset_bottom = 150.0 script = SubResource("GDScript_fbktk") -textures = Array[Texture]([ExtResource("2_4b43i"), ExtResource("2_4b43i"), ExtResource("2_4b43i")]) +textures = Array[Texture]([ExtResource("1_2n7he"), ExtResource("2_38t58"), ExtResource("3_i2t3v")]) metadata/ref_des = "" metadata/dec_num = "" @@ -160,19 +132,16 @@ text = "Ячейка" horizontal_alignment = 1 vertical_alignment = 1 -[node name="light_ind" type="TextureButton" parent="."] +[node name="txr_state" type="TextureRect" parent="."] material = SubResource("ShaderMaterial_45ast") layout_mode = 0 -offset_left = 13.0 -offset_top = 114.0 -offset_right = 38.0 -offset_bottom = 139.0 +offset_left = 14.0 +offset_top = 116.0 +offset_right = 238.0 +offset_bottom = 340.0 +scale = Vector2(0.1, 0.1) size_flags_vertical = 6 -toggle_mode = true -button_mask = 0 -texture_normal = SubResource("GradientTexture2D_cgu2r") -texture_pressed = SubResource("GradientTexture2D_d3qtt") -texture_disabled = SubResource("GradientTexture2D_k8o6s") +texture = ExtResource("1_2n7he") [node name="np_rect" type="NinePatchRect" parent="."] layout_mode = 0 diff --git a/состояние-исправности-0.png b/состояние-исправности-0.png new file mode 100644 index 0000000000000000000000000000000000000000..33966d1ec3af8bef1ca840fc33cf3c0883d6ab5e GIT binary patch literal 4148 zcma)AcQhQz+g@Z7onWI!3Bl@%u(JBDSiSCQtG6J6)olB6^Dr600W? zQKK$`xHmfA-gE!|&hL+zIqy5~nK@_XeV^xkUaW`aUP)MjsBrW;Y)%%LXEOgKjZDkcQ{%euWR&Z~89_S?5U5{YEmGd()WKqL}n zcoDCr;?kNd&~s6i(}5 z+8i!#)L!Zvny$dbAfIa>&-IBRftfO6_?l*7oBu5~Ncus#MH(d+W_O)NL=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G=1Oins6?(*_uOSE4WX)wchqD}LU1X#K1+LNC}NKa(0 zMMd4kcDUeT+xy$iUz=n+(%h+BtlxNwL(Hg=pNQoY3rOU&aar_b#*(;#xURR%xA)f1 z$Nw-u3hb$0NmrTdVa?b|{WZH9FmszKJaUJlamtvrxc+z<`X-&!5~7(_@V8IwOY83* zSJ3ICed0;yS7x_7f-l$oJR9P2-~@LhBLhuHIIgJikSk+Fi` gn-7oyqHku^b%PwdpS;Nr9$o<2p`e2`)YCct0tN>Xxc~qF literal 0 HcmV?d00001 diff --git a/состояние-исправности-2.png.import b/состояние-исправности-2.png.import new file mode 100644 index 0000000..aa075f9 --- /dev/null +++ b/состояние-исправности-2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvikuv0lbvou8" +path="res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://состояние-исправности-2.png" +dest_files=["res://.godot/imported/состояние-исправности-2.png-deccaddb215e53d76d5a2f5971888569.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 From a84ed1d3a21f1061a8f6b69bcf03910fab58bcc0 Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 7 Feb 2025 06:55:00 +0300 Subject: [PATCH 15/15] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BC=D0=BE=D1=80=D0=B4=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PRD_MP550.tscn | 20 ++------------------ scripts/control_panel.gd | 11 +++-------- scripts/ems_g.gd | 40 ++++++++++++++++------------------------ 3 files changed, 21 insertions(+), 50 deletions(-) diff --git a/PRD_MP550.tscn b/PRD_MP550.tscn index 8b4f25f..3860e19 100644 --- a/PRD_MP550.tscn +++ b/PRD_MP550.tscn @@ -232,22 +232,6 @@ theme_override_font_sizes/font_size = 14 theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y") text = "Загрузить" -[node name="Litera_3_5_7" type="ColorRect" parent="Background"] -visible = false -layout_mode = 0 -offset_top = 48.0 -offset_right = 1941.0 -offset_bottom = 352.0 -color = Color(0.669446, 0.567301, 0.66881, 1) - -[node name="Litera_1" type="ColorRect" parent="Background"] -visible = false -layout_mode = 0 -offset_top = 359.0 -offset_right = 2182.0 -offset_bottom = 638.0 -color = Color(0.669446, 0.567301, 0.66881, 1) - [node name="ISA" type="Label" parent="."] offset_left = 225.0 offset_top = 11.0 @@ -280,12 +264,11 @@ theme_override_styles/tab_selected = SubResource("StyleBoxTexture_k08q3") theme_override_styles/tab_hovered = SubResource("StyleBoxTexture_dklg6") theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6") tab_alignment = 2 -current_tab = 1 +current_tab = 0 tab_focus_mode = 0 metadata/_edit_lock_ = true [node name="PRD" type="Panel" parent="TabContainer"] -visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7") metadata/_tab_index = 0 @@ -429,6 +412,7 @@ script = ExtResource("2_vmbyo") node_gap = Vector2(100, 50) [node name="ControlPanel" type="Panel" parent="TabContainer"] +visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6") script = ExtResource("9_akagi") diff --git a/scripts/control_panel.gd b/scripts/control_panel.gd index 0bf2e4b..36e72bb 100644 --- a/scripts/control_panel.gd +++ b/scripts/control_panel.gd @@ -7,11 +7,6 @@ func _ready() -> void: Network.connect('yau_receive', Callable(self, '_on_data_received')) Network.connect('yau_status_line', Callable(self, '_control_pribor')) - var timer = Timer.new() - self.add_child(timer) - timer.connect('timeout', Callable(self, 'on_timer')) - timer.start(1) - '''sockets_ind = [ $soc_y5/ems_g/light_ind, $soc_y5/ug/light_ind, @@ -32,11 +27,11 @@ func on_timer(unit): print(unit) func _on_data_received(data_from_yau_07): - var status_board = data_from_yau_07.decode_u8(Constants.DataIndices.STATUS_BOARD) - var dry_contact: int = data_from_yau_07.decode_u16(Constants.DataIndices.DRY_CONTACT) # Контроль сухих контактов (УГ) + var _status_board = data_from_yau_07.decode_u8(Constants.DataIndices.STATUS_BOARD) + var _dry_contact: int = data_from_yau_07.decode_u16(Constants.DataIndices.DRY_CONTACT) # Контроль сухих контактов (УГ) ## From Network status about yau-07 -func _control_pribor(yau_status:bool) -> void: +func _control_pribor(_yau_status:bool) -> void: #$device.text = str(Constants.CURRENT_MODE) $soc_y5/ay07.state = Constants.STATE_VAL.GOOD diff --git a/scripts/ems_g.gd b/scripts/ems_g.gd index 2634ad0..6985a88 100644 --- a/scripts/ems_g.gd +++ b/scripts/ems_g.gd @@ -97,8 +97,8 @@ func _on_data_received(data_from_yau_07): 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, parent_node2) + process_sockets_horizon(out_blank, out_imp, 16, 2, parent_node2) func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_node2: Node): @@ -113,20 +113,18 @@ func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_ set_frame(socket_status, frame_type) - if i == 1: - set_frame(get_specific_node(parent_node2, 5), 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) set_frame(CI_2_UF, frame_type) - if i == 2: - set_frame(get_specific_node(parent_node2, 6), 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) set_frame(CI_3_UF, frame_type) - if i == 4: - set_frame(get_specific_node(parent_node2, 7), frame_type) - if i == 5: - set_frame(get_specific_node(parent_node2, 8), frame_type) - if i == 9: - set_frame(get_specific_node(parent_node2, 9), frame_type) + if i == 4: # Модуляция_УМ_2 + pass + if i == 5: # Модуляция_УМ_3 + pass + if i == 9: # ФГОЗ_3 + pass func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_node2: Node): @@ -141,24 +139,18 @@ func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_nod set_frame(socket_status, frame_type) - if i == 1: - set_frame(get_specific_node(parent_node2, 1), frame_type) - if i == 2: - set_frame(get_specific_node(parent_node2, 2), frame_type) - if i == 9: - set_frame(get_specific_node(parent_node2, 3), frame_type) + if i == 1: # СЗИ_2_от_УФ + pass + if i == 2: # СЗИ_3_от_УФ + pass + 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 i == 10: - set_frame(get_specific_node(parent_node2, 4), 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) -func get_specific_node(parent_node2: Node, child_index: int)-> Node: - return parent_node2.get_child(3, false).get_child(1).get_child(4).get_child(child_index).get_child(3) - - func set_frame(node: Node, val: int): node.set_frame(val)