|
|
|
|
@@ -140,6 +140,16 @@ 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)
|
|
|
|
|
|
|
|
|
|
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 48)
|
|
|
|
|
Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8])
|
|
|
|
|
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 49)
|
|
|
|
|
Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8])
|
|
|
|
|
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 51)
|
|
|
|
|
Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8])
|
|
|
|
|
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 52)
|
|
|
|
|
Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8])
|
|
|
|
|
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, 56)
|
|
|
|
|
Network.read_port_isa([Constants.BASE_PORTS.EMS_G+8])
|
|
|
|
|
|
|
|
|
|
Network.connect('yau_status_line', Callable(self, '_on_yau_status'))
|
|
|
|
|
Network.connect('yau_receive', Callable(self, '_on_data_received'))
|
|
|
|
|
@@ -207,24 +217,42 @@ 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):
|
|
|
|
|
if (isa_data[Constants.BASE_PORTS.UG+6] & 0x7) < 7:
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 3).select(isa_data[Constants.BASE_PORTS.UG+6] & 0x7)
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 4).select((isa_data[Constants.BASE_PORTS.UG+6] & 0x38)>> 3)
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[Constants.BASE_PORTS.UG+6] & 0x7))
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/inner_radius', 0.8 - 0.01 * (isa_data[Constants.BASE_PORTS.UG+6] & 0x38))
|
|
|
|
|
if isa_data.has(Constants.BASE_PORTS.UG+8):
|
|
|
|
|
if (isa_data[Constants.BASE_PORTS.UG+8] & 0x7) < 7:
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 3).select(isa_data[Constants.BASE_PORTS.UG+8] & 0x7)
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 4).select((isa_data[Constants.BASE_PORTS.UG+8] & 0x38)>>3)
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[Constants.BASE_PORTS.UG+8] & 0x7))
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/inner_radius', 0.8 - 0.01 * (isa_data[Constants.BASE_PORTS.UG+8] & 0x38))
|
|
|
|
|
|
|
|
|
|
if isa_data.has(Constants.BASE_PORTS.EMS_G+2):
|
|
|
|
|
print(isa_data[Constants.BASE_PORTS.EMS_G+2])
|
|
|
|
|
if (isa_data[Constants.BASE_PORTS.EMS_G+2]== 48):
|
|
|
|
|
if (isa_data[Constants.BASE_PORTS.EMS_G+8]>>14):
|
|
|
|
|
print(isa_data)
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1,1).get_child(1).button_pressed = true
|
|
|
|
|
else:
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1,1).get_child(1).button_pressed = false
|
|
|
|
|
for index in Constants.EMS_G_PORT_DATA_HOLDER.size():
|
|
|
|
|
var tmp_device_mode = Constants.EMS_G_PORT_DATA_HOLDER[index][0]
|
|
|
|
|
if tmp_device_mode == 48:
|
|
|
|
|
var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1]
|
|
|
|
|
if Constants.BASE_PORTS.EMS_G+8 in data_dict:
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1,1).get_child(1).button_pressed = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 14
|
|
|
|
|
if tmp_device_mode == 49:
|
|
|
|
|
var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1]
|
|
|
|
|
if Constants.BASE_PORTS.EMS_G+8 in data_dict:
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1,1).get_child(1).button_pressed = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 14
|
|
|
|
|
if tmp_device_mode == 51:
|
|
|
|
|
var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1]
|
|
|
|
|
if Constants.BASE_PORTS.EMS_G+8 in data_dict:
|
|
|
|
|
var select = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13 if data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13 < 3 else 3
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1,2).select(select)
|
|
|
|
|
if tmp_device_mode == 52:
|
|
|
|
|
var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1]
|
|
|
|
|
if Constants.BASE_PORTS.EMS_G+8 in data_dict:
|
|
|
|
|
var select = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13 if data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13 < 3 else 3
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1,2).select(select)
|
|
|
|
|
if tmp_device_mode == 56:
|
|
|
|
|
var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1]
|
|
|
|
|
if Constants.BASE_PORTS.EMS_G+8 in data_dict:
|
|
|
|
|
$TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1,5).get_child(1).button_pressed = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_data_fs_1(fs_1_data):
|
|
|
|
|
@@ -252,8 +280,6 @@ func _on_data_fs_1(fs_1_data):
|
|
|
|
|
Constants.CMD.BASE_CAN_MACRO_READ:
|
|
|
|
|
if GRP == Constants.GROUP.BASE:
|
|
|
|
|
node_select_fs_1.set_node_text(2, 7, str(fs_1_data.decode_u16(0x20)) + ' МГц')
|
|
|
|
|
$can.text = str(fs_1_data)
|
|
|
|
|
$can_macro.text = str(fs_1_data.decode_u32(0x04))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _on_data_fs_2(fs_2_data):
|
|
|
|
|
|