настройка мимикрии
This commit is contained in:
@@ -39,7 +39,7 @@ func _ready() -> void:
|
||||
|
||||
# Таблица ЯУ-07б-1
|
||||
node_select_yau_07b = $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control
|
||||
draw_tabl(node_select_yau_07b, Constants.ROWS_YAU_07B_1, Constants.ROWS_YAU_07B_1.size())
|
||||
draw_tabl(node_select_yau_07b, Constants.ROWS_YAU_07B_2, Constants.ROWS_YAU_07B_2.size())
|
||||
node_select_yau_07b.set_columns_min_size([160, 120])
|
||||
|
||||
# Таблица ЯУ-07б-2
|
||||
@@ -95,6 +95,7 @@ func _ready() -> void:
|
||||
node_select_yau_07b.get_node2(1, 2).connect('item_selected', Callable(self, '_on_modul_um_2'))
|
||||
node_select_yau_07b.get_node2(1, 3).connect('item_selected', Callable(self, '_on_btn_ray_1'))
|
||||
node_select_yau_07b.get_node2(1, 4).connect('item_selected', Callable(self, '_on_attenuator_1'))
|
||||
node_select_yau_07b.get_node2(1, 5).get_child(1, false).connect('toggled', Callable(self, '_on_fgos_1'))
|
||||
## Yau-07b 2
|
||||
node_select_yau_07b_2.get_node2(1, 1).get_child(1, false).connect('toggled', Callable(self, '_on_zapret_3'))
|
||||
node_select_yau_07b_2.get_node2(1, 2).connect('item_selected', Callable(self, '_on_modul_um_3'))
|
||||
@@ -135,7 +136,10 @@ func add_signs_scene():
|
||||
# Таблица УКП-2
|
||||
node_select2.set_node_text(0, 0, 'Мощность')
|
||||
node_select2.set_node_text(1, 0, 'Температура')
|
||||
|
||||
|
||||
var item_place_yau_07: int = 9
|
||||
var item_place_fs_1: int = 18
|
||||
var item_place_fs_2: int = 28
|
||||
# Таблица ЯУ-07б-1
|
||||
node_select_yau_07b.set_node_text(0, 0, Constants.SIGNS[Constants.CURRENT_MODE][0]) # 'ПРД-Н'
|
||||
node_select_yau_07b.set_node_text(1, 0, Constants.SIGNS[Constants.CURRENT_MODE][1]) # 'Литера 2'
|
||||
@@ -143,59 +147,63 @@ func add_signs_scene():
|
||||
node_select_yau_07b.set_node_text(0, 2, Constants.SIGNS[Constants.CURRENT_MODE][3]) # 'Модуляция УМ'
|
||||
node_select_yau_07b.set_node_text(0, 3, Constants.SIGNS[Constants.CURRENT_MODE][4]) # 'Положение луча'
|
||||
node_select_yau_07b.set_node_text(0, 4, Constants.SIGNS[Constants.CURRENT_MODE][5]) # 'Аттенюатор УМ'
|
||||
node_select_yau_07b.set_node_text(0, 6, Constants.SIGNS[Constants.CURRENT_MODE][6]) # 'СИ 2 в УФ'
|
||||
node_select_yau_07b.set_node_text(0, 7, Constants.SIGNS[Constants.CURRENT_MODE][7]) # 'СЗИ 2 от УФ'
|
||||
node_select_yau_07b.get_node2(1, 5).get_child(1).visible = Constants.CURRENT_MODE != Constants.MODE.PRD_H
|
||||
node_select_yau_07b.set_node_text(0, 5, Constants.SIGNS[Constants.CURRENT_MODE][6])# 'ФГОЗ'
|
||||
node_select_yau_07b.set_node_text(0, 6, Constants.SIGNS[Constants.CURRENT_MODE][7]) # 'СИ 2 в УФ'
|
||||
node_select_yau_07b.set_node_text(0, 7, Constants.SIGNS[Constants.CURRENT_MODE][8]) # 'СЗИ 2 от УФ'
|
||||
|
||||
# Таблица ЯУ-07б-2
|
||||
node_select_yau_07b_2.set_node_text(0, 0, Constants.SIGNS[Constants.CURRENT_MODE][8]) # 'ПРД-Н'
|
||||
node_select_yau_07b_2.set_node_text(1, 0, Constants.SIGNS[Constants.CURRENT_MODE][9]) # 'Литера 3',
|
||||
node_select_yau_07b_2.set_node_text(0, 1, Constants.SIGNS[Constants.CURRENT_MODE][10]) # 'Запрет СИ 3'
|
||||
node_select_yau_07b_2.set_node_text(0, 2, Constants.SIGNS[Constants.CURRENT_MODE][11]) # 'Модуляция УМ'
|
||||
node_select_yau_07b_2.set_node_text(0, 3, Constants.SIGNS[Constants.CURRENT_MODE][12]) # 'Положение луча'
|
||||
node_select_yau_07b_2.set_node_text(0, 4, Constants.SIGNS[Constants.CURRENT_MODE][13]) # 'Аттенюатор УМ'
|
||||
node_select_yau_07b_2.set_node_text(0, 5, Constants.SIGNS[Constants.CURRENT_MODE][14]) # 'ФГОЗ 3'
|
||||
node_select_yau_07b_2.set_node_text(0, 6, Constants.SIGNS[Constants.CURRENT_MODE][15]) # 'СИ 3 в УФ'
|
||||
node_select_yau_07b_2.set_node_text(0, 7, Constants.SIGNS[Constants.CURRENT_MODE][16]) # 'СЗИ 3 от УФ'
|
||||
node_select_yau_07b_2.set_node_text(0, 0, Constants.SIGNS[Constants.CURRENT_MODE][item_place_yau_07+0]) # 'ПРД-Н'
|
||||
node_select_yau_07b_2.set_node_text(1, 0, Constants.SIGNS[Constants.CURRENT_MODE][item_place_yau_07+1]) # 'Литера 3',
|
||||
node_select_yau_07b_2.set_node_text(0, 1, Constants.SIGNS[Constants.CURRENT_MODE][item_place_yau_07+2]) # 'Запрет СИ 3'
|
||||
node_select_yau_07b_2.set_node_text(0, 2, Constants.SIGNS[Constants.CURRENT_MODE][item_place_yau_07+3]) # 'Модуляция УМ'
|
||||
node_select_yau_07b_2.set_node_text(0, 3, Constants.SIGNS[Constants.CURRENT_MODE][item_place_yau_07+4]) # 'Положение луча'
|
||||
node_select_yau_07b_2.set_node_text(0, 4, Constants.SIGNS[Constants.CURRENT_MODE][item_place_yau_07+5]) # 'Аттенюатор УМ'
|
||||
node_select_yau_07b_2.get_node2(1, 5).get_child(1).visible = Constants.CURRENT_MODE != Constants.MODE.PRD_K
|
||||
node_select_yau_07b_2.set_node_text(0, 5, Constants.SIGNS[Constants.CURRENT_MODE][item_place_yau_07+6]) # 'ФГОЗ 3'
|
||||
node_select_yau_07b_2.set_node_text(0, 6, Constants.SIGNS[Constants.CURRENT_MODE][item_place_yau_07+7]) # 'СИ 3 в УФ'
|
||||
node_select_yau_07b_2.set_node_text(0, 7, Constants.SIGNS[Constants.CURRENT_MODE][item_place_yau_07+8]) # 'СЗИ 3 от УФ'
|
||||
|
||||
#Таблица ФС-1
|
||||
node_select_fs_1.set_node_text(0, 0, Constants.SIGNS[Constants.CURRENT_MODE][17]) # 'Модуль ФС'
|
||||
node_select_fs_1.set_node_text(1, 0, Constants.SIGNS[Constants.CURRENT_MODE][18]) # 'Литера 2'
|
||||
node_select_fs_1.set_node_text(0, 1, Constants.SIGNS[Constants.CURRENT_MODE][19]) # 'Состояние'
|
||||
node_select_fs_1.set_node_text(0, 2, Constants.SIGNS[Constants.CURRENT_MODE][20]) # 'Частота'
|
||||
node_select_fs_1.set_node_text(0, 0, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+0]) # 'Модуль ФС'
|
||||
node_select_fs_1.set_node_text(1, 0, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+1]) # 'Литера 2'
|
||||
|
||||
node_select_fs_1.set_node_text(0, 1, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+2]) # 'Состояние'
|
||||
node_select_fs_1.set_node_text(0, 2, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+3]) # 'Частота'
|
||||
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, Constants.SIGNS[Constants.CURRENT_MODE][21]) # 'Аттенюатор'
|
||||
node_select_fs_1.set_node_text(0, 3, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+4]) # 'Аттенюатор'
|
||||
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, Constants.SIGNS[Constants.CURRENT_MODE][22]) # 'Модуляция'
|
||||
node_select_fs_1.set_node_text(0, 4, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+5]) # 'Модуляция'
|
||||
node_select_fs_1.get_node2(1, 4).add_item('Const')
|
||||
node_select_fs_1.get_node2(1, 4).add_item('MSK')
|
||||
node_select_fs_1.set_node_text(0, 5, Constants.SIGNS[Constants.CURRENT_MODE][23]) # 'Генератор ФС'
|
||||
node_select_fs_1.set_node_text(0, 6, Constants.SIGNS[Constants.CURRENT_MODE][24]) # 'СИ 2 от ФС'
|
||||
node_select_fs_1.set_node_text(0, 7, Constants.SIGNS[Constants.CURRENT_MODE][25]) # 'Фильтр CAN'
|
||||
node_select_fs_1.set_node_text(0, 5, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+6]) # 'Генератор ФС'
|
||||
node_select_fs_1.set_node_text(0, 6, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+7]) # 'СИ 2 от ФС'
|
||||
node_select_fs_1.set_node_text(0, 7, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+8]) # 'Фильтр CAN'
|
||||
node_select_fs_1.get_node2(1, 7).placeholder_text = 'в МГц'
|
||||
node_select_fs_1.get_node2(1, 7).editable = true
|
||||
node_select_fs_1.set_node_text(0, 8, Constants.SIGNS[Constants.CURRENT_MODE][26]) # 'Статус CAN'
|
||||
node_select_fs_1.set_node_text(0, 8, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_1+9]) # 'Статус CAN'
|
||||
|
||||
#Таблица ФС-2
|
||||
node_select_fs_2.set_node_text(0, 0, Constants.SIGNS[Constants.CURRENT_MODE][27]) # 'Модуль ФС'
|
||||
node_select_fs_2.set_node_text(1, 0, Constants.SIGNS[Constants.CURRENT_MODE][28]) # 'Литера 3'
|
||||
node_select_fs_2.set_node_text(0, 1, Constants.SIGNS[Constants.CURRENT_MODE][29]) # 'Состояние'
|
||||
node_select_fs_2.set_node_text(0, 2, Constants.SIGNS[Constants.CURRENT_MODE][30]) # 'Частота ФС'
|
||||
node_select_fs_2.set_node_text(0, 0, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+0]) # 'Модуль ФС'
|
||||
node_select_fs_2.set_node_text(1, 0, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+1]) # 'Литера ФС'
|
||||
node_select_fs_2.set_node_text(0, 1, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+2]) # 'Состояние'
|
||||
node_select_fs_2.set_node_text(0, 2, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+3]) # 'Частота'
|
||||
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, Constants.SIGNS[Constants.CURRENT_MODE][31]) # 'Аттенюатор ФС'
|
||||
node_select_fs_2.set_node_text(0, 3, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+4]) # 'Аттенюатор ФС'
|
||||
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, Constants.SIGNS[Constants.CURRENT_MODE][32]) # 'Модуляция'
|
||||
node_select_fs_2.set_node_text(0, 4, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+5]) # 'Модуляция'
|
||||
node_select_fs_2.get_node2(1, 4).add_item('Const')
|
||||
node_select_fs_2.get_node2(1, 4).add_item('MSK')
|
||||
node_select_fs_2.set_node_text(0, 5, Constants.SIGNS[Constants.CURRENT_MODE][33]) # 'Генератор ФС'
|
||||
node_select_fs_2.set_node_text(0, 6, Constants.SIGNS[Constants.CURRENT_MODE][34]) # 'СИ 3 от ФС'
|
||||
node_select_fs_2.set_node_text(0, 7, Constants.SIGNS[Constants.CURRENT_MODE][35]) # 'Фильтр CAN'
|
||||
node_select_fs_2.set_node_text(0, 5, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+6]) # 'Генератор ФС'
|
||||
node_select_fs_2.set_node_text(0, 6, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+7]) # 'СИ 3 от ФС'
|
||||
node_select_fs_2.set_node_text(0, 7, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+8]) # 'Фильтр CAN'
|
||||
node_select_fs_2.get_node2(1, 7).placeholder_text = 'в МГц'
|
||||
node_select_fs_2.get_node2(1, 7).editable = true
|
||||
node_select_fs_2.set_node_text(0, 8, Constants.SIGNS[Constants.CURRENT_MODE][36]) # 'Статус CAN')
|
||||
node_select_fs_2.set_node_text(0, 8, Constants.SIGNS[Constants.CURRENT_MODE][item_place_fs_2+9]) # 'Статус CAN')
|
||||
|
||||
|
||||
func _on_read_isa(unit_isa_ports: Dictionary) -> void:
|
||||
@@ -579,13 +587,21 @@ func _on_modul_um_3(item_from_ray_1: int):
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, modul_um)
|
||||
|
||||
|
||||
## Включение/отключение сигнала ФГОЗ
|
||||
func _on_fgos_1(toggled_on: bool):
|
||||
var meta = Constants.META.FGOZ_4
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, meta)
|
||||
var modul_um = 0x2000 if toggled_on else 0x0
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, modul_um)
|
||||
|
||||
|
||||
## Включение/отключение сигнала ФГОЗ
|
||||
func _on_fgos_2(toggled_on: bool):
|
||||
var meta = Constants.META.FGOZ_3
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, meta)
|
||||
var modul_um = 0x2000 if toggled_on else 0x0
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, modul_um)
|
||||
|
||||
|
||||
|
||||
## Регулировка положением луча 1
|
||||
func _on_btn_ray_1(item_from_ray_1: int) -> void:
|
||||
|
||||
@@ -135,6 +135,7 @@ const SIGNS: Dictionary = {
|
||||
'Модуляция УМ',
|
||||
'Положение луча',
|
||||
'Аттенюатор УМ',
|
||||
'',
|
||||
'СИ 2 в УФ',
|
||||
'СЗИ 2 от УФ',
|
||||
|
||||
@@ -165,8 +166,8 @@ const SIGNS: Dictionary = {
|
||||
'Модуль ФС',
|
||||
'Литера 3',
|
||||
'Состояние',
|
||||
'Частота ФС',
|
||||
'Аттенюатор ФС',
|
||||
'Частота',
|
||||
'Аттенюатор',
|
||||
'Модуляция',
|
||||
'Генератор ФС',
|
||||
'СИ 3 от ФС',
|
||||
@@ -181,6 +182,7 @@ const SIGNS: Dictionary = {
|
||||
'Модуляция УМ',
|
||||
'Положение луча',
|
||||
'Аттенюатор УМ',
|
||||
'ФГОЗ 4',
|
||||
'СИ 4 в УФ',
|
||||
'СЗИ 4 от УФ',
|
||||
|
||||
@@ -211,8 +213,8 @@ const SIGNS: Dictionary = {
|
||||
'Модуль ФС',
|
||||
'Литера 5',
|
||||
'Состояние',
|
||||
'Частота ФС',
|
||||
'Аттенюатор ФС',
|
||||
'Частота',
|
||||
'Аттенюатор',
|
||||
'Модуляция',
|
||||
'Генератор ФС',
|
||||
'СИ 5 от ФС',
|
||||
@@ -227,6 +229,7 @@ const SIGNS: Dictionary = {
|
||||
'Модуляция УМ',
|
||||
'Положение луча',
|
||||
'Аттенюатор УМ',
|
||||
'ФГОЗ 6',
|
||||
'СИ 6 в УФ',
|
||||
'СЗИ 6 от УФ',
|
||||
|
||||
@@ -237,7 +240,7 @@ const SIGNS: Dictionary = {
|
||||
'Модуляция УМ',
|
||||
'Положение луча',
|
||||
'Аттенюатор УМ',
|
||||
'ФГОЗ 7',
|
||||
'',
|
||||
'СИ 7 в УФ',
|
||||
'СЗИ 7 от УФ',
|
||||
|
||||
@@ -257,8 +260,8 @@ const SIGNS: Dictionary = {
|
||||
'Модуль ФС',
|
||||
'Литера 7',
|
||||
'Состояние',
|
||||
'Частота ФС',
|
||||
'Аттенюатор ФС',
|
||||
'Частота',
|
||||
'Аттенюатор',
|
||||
'Модуляция',
|
||||
'Генератор ФС',
|
||||
'СИ 7 от ФС',
|
||||
|
||||
@@ -160,7 +160,6 @@ func _on_yau_received(status_yau):
|
||||
func _status_prd():
|
||||
var status: int = 0
|
||||
for i in range(10):
|
||||
print([node_cell_ind[i].state, i])
|
||||
status += 1 if (node_cell_ind[i].state == Constants.STATE_VAL.GOOD) else 0
|
||||
for i in range(12, count_cell-2):
|
||||
status += 1 if (node_cell_ind[i].state == Constants.STATE_VAL.GOOD) else 0
|
||||
@@ -173,7 +172,6 @@ func _status_prd():
|
||||
status += 1 if (node_cell_ind[18].state == Constants.STATE_VAL.GOOD) else 0
|
||||
|
||||
if (status == count_cell-7):
|
||||
print(status)
|
||||
#$lbl_control.text = 'Прибор исправен'
|
||||
#$lbl_control.modulate = Color.AQUAMARINE
|
||||
emit_signal('signal_on_start_timer_03')
|
||||
|
||||
Reference in New Issue
Block a user