Корректировка PRD панели
This commit is contained in:
@@ -13,7 +13,6 @@ var isa_from_yau07b: Dictionary = {}
|
||||
var JSOON = JSON.new()
|
||||
var status_pribor = null
|
||||
var save_path = "D://PRD-TU-MP550//"
|
||||
|
||||
var need_port: Array = [
|
||||
0x122,
|
||||
0x124,
|
||||
@@ -45,7 +44,7 @@ func _ready() -> void:
|
||||
|
||||
# Таблица ЯУ-07б
|
||||
var node_select_yau_07b = $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control
|
||||
draw_tabl(node_select_yau_07b, Constants.ROWS_YAU_07B, Constants.ROWS_YAU_07B.size())
|
||||
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')
|
||||
@@ -53,9 +52,10 @@ func _ready() -> void:
|
||||
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 в УФ')
|
||||
|
||||
var node_select_yau_07b_2 = $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control
|
||||
draw_tabl(node_select_yau_07b_2, Constants.ROWS_YAU_07B, Constants.ROWS_YAU_07B.size())
|
||||
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')
|
||||
@@ -64,12 +64,13 @@ func _ready() -> void:
|
||||
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')
|
||||
node_select_yau_07b_2.set_node_text(0, 6, 'СИ 3 в УФ')
|
||||
|
||||
#Таблица ФС
|
||||
var node_select_fs_1 = $TabContainer/PRD/body_grid/litera_2_4_6/fs_control
|
||||
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(0, 0, 'Модуль ФС')
|
||||
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, 'Частота')
|
||||
@@ -78,12 +79,12 @@ func _ready() -> void:
|
||||
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 ОТ ФС')
|
||||
node_select_fs_1.set_node_text(0, 6, 'СИ 2 от ФС')
|
||||
|
||||
var node_select_fs_2 = $TabContainer/PRD/body_grid/litera_3_5_7/fs_control
|
||||
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(0, 0, 'Модуль ФС')
|
||||
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, 'Частота')
|
||||
@@ -92,7 +93,7 @@ func _ready() -> void:
|
||||
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 ОТ ФС')
|
||||
node_select_fs_2.set_node_text(0, 6, 'СИ 3 от ФС')
|
||||
|
||||
# Выбор прибора для подключения
|
||||
var node_select_device = $TabContainer/PRD/select_dev
|
||||
@@ -308,6 +309,7 @@ func _on_emsg_select() -> void:
|
||||
func _on_mfs_select() -> void:
|
||||
set_tab_and_buttons(3, 'select_fs')
|
||||
|
||||
|
||||
func _on_save_config():
|
||||
var da = DirAccess.open(save_path)
|
||||
var base_path = save_path + "save//"
|
||||
@@ -341,10 +343,8 @@ func _save_selected_file(file_path: String):
|
||||
else:
|
||||
other_data[key] = item[1]
|
||||
param_ems_g[item[0]] = regist
|
||||
var item_id = item[0]
|
||||
# Переменные для сохранения
|
||||
var ems_g_file = file_path
|
||||
var ems_g_path = save_path + ems_g_file
|
||||
var other_name = "others" + "-" + status_pribor
|
||||
var other_path = save_path + other_name
|
||||
var other_names = other_name
|
||||
@@ -414,15 +414,6 @@ func on_btn_select(intem_from_sector: int) -> void:
|
||||
_on_start_fs_2()
|
||||
|
||||
|
||||
func fill_item(node: Node, i_column: int, i_row: int, arr: Dictionary, select: int = 0) -> void:
|
||||
var optionbutton = node.get_node2(i_column, i_row) as OptionButton
|
||||
for key in arr.keys():
|
||||
var item_text = key + " - " + str(arr[key])
|
||||
optionbutton.add_item(item_text)
|
||||
if select < arr.size():
|
||||
optionbutton.select(select)
|
||||
|
||||
|
||||
func _on_zapret1(toggled_on: bool) -> void:
|
||||
var meta = 48
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, meta)
|
||||
@@ -458,10 +449,10 @@ func _on_modul_um_2(item_from_ray_1: int):
|
||||
2: 0x4000,
|
||||
3: 0x8000,
|
||||
}
|
||||
|
||||
var modul_um = modul_um_values.get(item_from_ray_1, 0)
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, modul_um)
|
||||
|
||||
|
||||
## Включение/отключение сигнала ФГОЗ
|
||||
func _on_fgos_2(toggled_on: bool):
|
||||
var meta = 56
|
||||
@@ -475,7 +466,11 @@ func _on_btn_ray_1(item_from_ray_1: int) -> void:
|
||||
if isa_from_yau07b.has(Constants.BASE_PORTS.UG+6):
|
||||
var mask = 0x7
|
||||
Network.write_port_isa(Constants.BASE_PORTS.UG+6, set_bits(isa_from_yau07b[Constants.BASE_PORTS.UG+6], item_from_ray_1, mask))
|
||||
|
||||
Network.read_port_isa([Constants.BASE_PORTS.UG+6])
|
||||
else:
|
||||
print_debug('В ISA отсутствует данные в \"%x\" порту' % (Constants.BASE_PORTS.UG+0x6))
|
||||
|
||||
|
||||
## Регулировка положением луча 2
|
||||
func _on_btn_ray_2(item_from_ray_2: int) -> void:
|
||||
if isa_from_yau07b.has(Constants.BASE_PORTS.UG+8):
|
||||
|
||||
@@ -21,14 +21,22 @@ const ROWS_REGS_DATA: Array = [
|
||||
[TableNode, TableNode],
|
||||
[TableNode, TableNode],
|
||||
[TableNode, TableNode]]
|
||||
const ROWS_YAU_07B: Array = [
|
||||
const ROWS_YAU_07B_1: Array = [
|
||||
[TableNode, TableNode],
|
||||
[TableNode, Switch],
|
||||
[TableNode, TableList],
|
||||
[TableNode, TableList],
|
||||
[TableNode, TableList],
|
||||
[TableNode, TableNode],
|
||||
[TableNode, SocketStatus]]
|
||||
const ROWS_YAU_07B_2: Array = [
|
||||
[TableNode, TableNode],
|
||||
[TableNode, Switch],
|
||||
[TableNode, TableList],
|
||||
[TableNode, TableList],
|
||||
[TableNode, TableList],
|
||||
[TableNode, Switch],
|
||||
[TableNode, TableNode]]
|
||||
[TableNode, SocketStatus]]
|
||||
const ROWS_FS: Array = [
|
||||
[TableNode, TableNode, TableNode],
|
||||
[TableNode, TableNode, TableNode],
|
||||
@@ -178,7 +186,6 @@ const SIGNS_PRD: Array = [
|
||||
],
|
||||
]
|
||||
var NODE_MAP = {
|
||||
'TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Zapret2': 0,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A22': 1,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A23': 2,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A26': 3,
|
||||
|
||||
@@ -139,12 +139,16 @@ 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 = 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, 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)
|
||||
set_frame(CI_2_FS, frame_type)
|
||||
if i == 10:
|
||||
set_frame(get_specific_node(parent_node2, 4), frame_type)
|
||||
|
||||
|
||||
@@ -132,8 +132,8 @@ 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)
|
||||
#if client_fs_2:
|
||||
#poll_receive_fs_2(client_fs_2)
|
||||
|
||||
poll_receive_yau07(soc_brodcast)
|
||||
poll_receive_yau07(soc_unicast)
|
||||
|
||||
Reference in New Issue
Block a user