Work fs 3
This commit is contained in:
@@ -214,21 +214,17 @@ func _ready() -> void:
|
||||
node_select_fs_2.get_node2(1, 7).connect('text_submitted', Callable(self, '_on_set_base_can_macro').bind(Network.unit_fs_2))
|
||||
node_select_fs_2.get_node2(1, 8).get_child(1, false).connect('toggled', Callable(self, '_on_status_can_macro').bind(Network.unit_fs_2))
|
||||
## FS 3
|
||||
node_select_fs_3.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq_3'))
|
||||
node_select_fs_3.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att_3'))
|
||||
node_select_fs_3.get_node2(1, 4).connect('item_selected', Callable(self, '_on_modul_fs_3'))
|
||||
node_select_fs_3.get_node2(1, 2).connect('text_submitted', Callable(self, '_on_set_ferq').bind(Network.unit_fs_3))
|
||||
node_select_fs_3.get_node2(1, 3).connect('text_submitted', Callable(self, '_on_set_att').bind(Network.unit_fs_3))
|
||||
node_select_fs_3.get_node2(1, 4).connect('item_selected', Callable(self, '_on_modul_fs').bind(Network.unit_fs_3))
|
||||
$TabContainer/PRD/body_grid/litera_1/fs_control.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_get_status').bind(Network.unit_fs_3))
|
||||
node_select_fs_3.get_node2(1, 7).connect('text_submitted', Callable(self, '_on_set_base_can_macro_3'))
|
||||
node_select_fs_3.get_node2(1, 8).get_child(1, false).connect('toggled', Callable(self, '_on_status_can_macro_3'))
|
||||
node_select_fs_3.get_node2(1, 7).connect('text_submitted', Callable(self, '_on_set_base_can_macro').bind(Network.unit_fs_3))
|
||||
node_select_fs_3.get_node2(1, 8).get_child(1, false).connect('toggled', Callable(self, '_on_status_can_macro').bind(Network.unit_fs_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'))
|
||||
#Network.connect('port_fs_opened', _on_port_changed.bind(Color.AQUAMARINE))
|
||||
#Network.connect('port_fs_closed', _on_port_changed.bind(Color.DARK_GRAY))
|
||||
#Network.connect('data_from_fs_1', _on_data_fs_1)
|
||||
#Network.connect('data_from_fs_2', _on_data_fs_2)
|
||||
#Network.connect('data_from_fs_3', _on_data_fs_3)
|
||||
|
||||
Network.unit_fs_1.connect("connected", Callable(self, "_on_port_changed").bind(Network.unit_fs_1, Constants.STATE_VAL.GOOD))
|
||||
Network.unit_fs_1.connect("disconnected", Callable(self, "_on_port_changed").bind(Network.unit_fs_1, Constants.STATE_VAL.NONE))
|
||||
Network.unit_fs_1.connect("error_connect", Callable(self, "_on_port_changed").bind(Network.unit_fs_1, Constants.STATE_VAL.ERROR))
|
||||
@@ -238,6 +234,11 @@ func _ready() -> void:
|
||||
Network.unit_fs_2.connect("disconnected", Callable(self, "_on_port_changed").bind(Network.unit_fs_2, Constants.STATE_VAL.NONE))
|
||||
Network.unit_fs_2.connect("error_connect", Callable(self, "_on_port_changed").bind(Network.unit_fs_2, Constants.STATE_VAL.ERROR))
|
||||
Network.unit_fs_2.connect("data_fs", Callable(self, "_on_data_fs").bind(Network.unit_fs_2))
|
||||
|
||||
Network.unit_fs_3.connect("connected", Callable(self, "_on_port_changed").bind(Network.unit_fs_3, Constants.STATE_VAL.GOOD))
|
||||
Network.unit_fs_3.connect("disconnected", Callable(self, "_on_port_changed").bind(Network.unit_fs_3, Constants.STATE_VAL.NONE))
|
||||
Network.unit_fs_3.connect("error_connect", Callable(self, "_on_port_changed").bind(Network.unit_fs_3, Constants.STATE_VAL.ERROR))
|
||||
Network.unit_fs_3.connect("data_fs", Callable(self, "_on_data_fs").bind(Network.unit_fs_3))
|
||||
|
||||
self.add_child(timer_modul_um)
|
||||
timer_modul_um.connect('timeout', Callable(self, '_on_timer_modul_um'))
|
||||
@@ -475,7 +476,9 @@ func _on_data_fs(fs_data: PackedByteArray, unit_fs_client: Node):
|
||||
ray_node_path = $TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2
|
||||
fs_control_node_path = $TabContainer/PRD/body_grid/litera_3_5_7/fs_control
|
||||
3:
|
||||
pass
|
||||
node_select = node_select_fs_3
|
||||
ray_node_path = $TabContainer/PRD/body_grid/litera_1/PSK3/ray_litera_1
|
||||
fs_control_node_path = $TabContainer/PRD/body_grid/litera_1/fs_control
|
||||
match CMD:
|
||||
Constants.CMD.READ_CARRIER:
|
||||
if GRP == Constants.GROUP.BASE:
|
||||
@@ -561,6 +564,7 @@ func draw_tabl(tbl: Node, row: Array, count_row: int):
|
||||
|
||||
|
||||
func _on_data_received(data_from_yau_07):
|
||||
$TabContainer/PRD/Label_dkm.text = 'DKM: ' + str(Network.unit.status.decode_u8(Constants.DataIndices.DKM))
|
||||
## УКП
|
||||
for i in range(6): ## Мощность от УКП_1
|
||||
var power_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.POWER_UKP_1 + 2 * i)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
extends Node
|
||||
var UNICAST_PORT: int = 50100
|
||||
var UNICAST_ADDRESS: String = '10.1.1.100'
|
||||
var UNICAST_PORT: int = 50002
|
||||
var UNICAST_ADDRESS: String = '10.1.1.2'
|
||||
const BROADCAST_PORT: int = 50000
|
||||
const DEFAULT_ADDRESS: String = '10.1.1.11'
|
||||
const DEFAULT_PORT: String = '50011'
|
||||
@@ -62,10 +62,10 @@ const ADDRESSES: Array = [
|
||||
['ПРД-В2', '10.1.1.22', 50022, MODE.PRD_B, '10.1.2.24', '10.1.2.25', ''],
|
||||
['ПРД-В3', '10.1.1.32', 50032, MODE.PRD_B, '10.1.2.34', '10.1.2.35', ''],
|
||||
['ПРД-В4', '10.1.1.42', 50042, MODE.PRD_B, '10.1.2.44', '10.1.2.45', ''],
|
||||
['ПРД-К1', '10.1.1.13', 50013, MODE.PRD_K, '10.1.2.26', '10.1.2.17', '10.1.2.11'],
|
||||
['ПРД-К2', '10.1.1.23', 50023, MODE.PRD_K, '10.1.2.36', '10.1.2.27', '10.1.2.21'],
|
||||
['ПРД-К3', '10.1.1.33', 50033, MODE.PRD_K, '10.1.2.56', '10.1.2.37', '10.1.2.31'],
|
||||
['ПРД-К4', '10.1.1.43', 50043, MODE.PRD_K, '10.1.2.76', '10.1.2.47', '10.1.2.41']]
|
||||
['ПРД-К1', '10.1.1.13', 50013, MODE.PRD_K, '10.1.2.16', '10.1.2.17', '10.1.2.11'],
|
||||
['ПРД-К2', '10.1.1.23', 50023, MODE.PRD_K, '10.1.2.26', '10.1.2.27', '10.1.2.21'],
|
||||
['ПРД-К3', '10.1.1.33', 50033, MODE.PRD_K, '10.1.2.36', '10.1.2.37', '10.1.2.31'],
|
||||
['ПРД-К4', '10.1.1.43', 50043, MODE.PRD_K, '10.1.2.46', '10.1.2.47', '10.1.2.41']]
|
||||
const INPUT_EMS_G: Array = [
|
||||
'01 :34',
|
||||
'02 :35',
|
||||
|
||||
@@ -78,6 +78,7 @@ func _ready() -> void:
|
||||
unit.connect('line_changed', Callable(self, '_on_connect_change'))
|
||||
add_child(unit_fs_1)
|
||||
add_child(unit_fs_2)
|
||||
add_child(unit_fs_3)
|
||||
## Настройка при старте программы
|
||||
set_config()
|
||||
|
||||
@@ -163,11 +164,18 @@ func on_command_change_device(meta_device: Array):
|
||||
if unit_fs_2._stream:
|
||||
unit_fs_2.disconnect_fs()
|
||||
unit_fs_2.connect_to_host(meta_device[4], Constants.PORT_FS)
|
||||
|
||||
|
||||
if meta_device[5] != '':
|
||||
if unit_fs_3._stream:
|
||||
unit_fs_3.disconnect_fs()
|
||||
unit_fs_3.connect_to_host(meta_device[5], Constants.PORT_FS)
|
||||
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
setup_fs(unit_fs_1, meta_device)
|
||||
setup_fs(unit_fs_2, meta_device)
|
||||
#ip_fs_3 = meta_device[5]
|
||||
if meta_device[5] != '':
|
||||
setup_fs(unit_fs_3, meta_device)
|
||||
|
||||
|
||||
|
||||
func setup_fs(unit_fs: Node, meta_device: Array) -> void:
|
||||
|
||||
Reference in New Issue
Block a user