отладка дкм 1
This commit is contained in:
@@ -160,6 +160,22 @@ func _ready() -> void:
|
||||
for key in Constants.ATT_DICT_correct:
|
||||
node_select_yau_07b_3.get_node2(1, 4).add_item(key)
|
||||
|
||||
## EMS статус сокета
|
||||
$TabContainer/EMS_G.CI_1_UF = $TabContainer/PRD/body_grid/litera_1/yau07b_control.get_node2(1, 6).get_child(1)
|
||||
$TabContainer/EMS_G.CI_2_UF = $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 6).get_child(1)
|
||||
$TabContainer/EMS_G.CI_3_UF = $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 6).get_child(1)
|
||||
$TabContainer/EMS_G.CZI_2_FS = $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 7).get_child(1)
|
||||
$TabContainer/EMS_G.CZI_3_FS = $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 7).get_child(1)
|
||||
$TabContainer/EMS_G.CZI_4_FS = $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control.get_node2(1, 7).get_child(1)
|
||||
$TabContainer/EMS_G.CZI_5_FS = $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control.get_node2(1, 7).get_child(1)
|
||||
$TabContainer/EMS_G.CI_2_FS = $TabContainer/PRD/body_grid/litera_2_4_6/fs_control.get_node2(1, 6).get_child(1)
|
||||
$TabContainer/EMS_G.CI_3_FS = $TabContainer/PRD/body_grid/litera_3_5_7/fs_control.get_node2(1, 6).get_child(1)
|
||||
$TabContainer/EMS_G.CI_4_FS = $TabContainer/PRD/body_grid/litera_2_4_6/fs_control.get_node2(1, 6).get_child(1)
|
||||
$TabContainer/EMS_G.CI_5_FS = $TabContainer/PRD/body_grid/litera_3_5_7/fs_control.get_node2(1, 6).get_child(1)
|
||||
$TabContainer/EMS_G.CI_1_FS = $TabContainer/PRD/body_grid/litera_1/fs_control.get_node2(1, 6).get_child(1)
|
||||
$TabContainer/EMS_G.CI_6_FS = $TabContainer/PRD/body_grid/litera_2_4_6/fs_control.get_node2(1, 6).get_child(1)
|
||||
$TabContainer/EMS_G.CI_7_FS = $TabContainer/PRD/body_grid/litera_3_5_7/fs_control.get_node2(1, 6).get_child(1)
|
||||
|
||||
get_select_device.connect('item_selected', Callable(self, 'on_mode_select'))
|
||||
|
||||
## Yau-07b 1
|
||||
@@ -345,6 +361,10 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void:
|
||||
|
||||
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 == Constants.META.CI_1_B_UF:
|
||||
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_1/yau07b_control.get_node2(1,1).get_child(1).button_pressed = data_dict[Constants.BASE_PORTS.EMS_G+8] >> 14
|
||||
if tmp_device_mode == Constants.META.CI_2_B_UF:
|
||||
var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1]
|
||||
if Constants.BASE_PORTS.EMS_G+8 in data_dict:
|
||||
@@ -353,6 +373,10 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void:
|
||||
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 == Constants.META.CI_3_B_UF:
|
||||
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] >> 13
|
||||
if tmp_device_mode == Constants.META.MODUL_UM_1:
|
||||
var data_dict = Constants.EMS_G_PORT_DATA_HOLDER[index][1]
|
||||
if Constants.BASE_PORTS.EMS_G+8 in data_dict:
|
||||
@@ -647,6 +671,8 @@ func on_mode_select(intem_from_sector: int) -> void:
|
||||
Network.start_work_fs_2()
|
||||
if meta[2] == Constants.MODE.PRD_K:
|
||||
Network.start_work_fs_3()
|
||||
emit_signal('read_ems_g_start')
|
||||
#_on_read_isa(Network.unit.isa_ports)
|
||||
|
||||
|
||||
func _on_zapret_1(toggled_on: bool) -> void:
|
||||
@@ -693,7 +719,7 @@ func _on_modul_um(item_from_ray_1: int, node: Node):
|
||||
else:
|
||||
return
|
||||
|
||||
if modul_um.has(0x8000):
|
||||
if modul_um.has(0x2000):
|
||||
timer_modul_um.wait_time = 2.3
|
||||
timer_modul_um.start()
|
||||
|
||||
@@ -701,9 +727,9 @@ func _on_modul_um(item_from_ray_1: int, node: Node):
|
||||
## Таймер для модуляции УМ
|
||||
func _on_timer_modul_um():
|
||||
print('Модуляция вызывается')
|
||||
if modul_um.has(0x8000):
|
||||
if modul_um.has(0x2000):
|
||||
for i in range(3):
|
||||
if modul_um[i] == 0x8000:
|
||||
if modul_um[i] == 0x2000:
|
||||
print('Модуляция есть ', modul_um)
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G + 2, current_meta[i])
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G + 8, modul_um[i])
|
||||
@@ -1005,3 +1031,28 @@ func set_tab_and_buttons(tab_index: int, button_name: String, txt_button_name: S
|
||||
|
||||
func _on_connect_prd_pressed() -> void:
|
||||
on_mode_select($TabContainer/PRD/select_dev.get_node2(1, 0).get_selected_id())
|
||||
|
||||
|
||||
func save_settings():
|
||||
var settings = {
|
||||
"test": 1,
|
||||
"test2": 2,
|
||||
"test3": 303,
|
||||
}
|
||||
var file = FileAccess.open("res://saves/fs_setting.txt", FileAccess.WRITE)
|
||||
if file:
|
||||
file.store_var(settings)
|
||||
file.close()
|
||||
|
||||
|
||||
func read_file():
|
||||
var file = FileAccess.open("res://saves/fs_setting.txt", FileAccess.READ)
|
||||
if file:
|
||||
var settings = file.get_var()
|
||||
file.close()
|
||||
|
||||
if 'test3' in settings:
|
||||
var read_test = settings['test3']
|
||||
print(read_test)
|
||||
else:
|
||||
print('var not found in file')
|
||||
|
||||
Reference in New Issue
Block a user