отладка отказоустойчивости контроля
This commit is contained in:
@@ -387,6 +387,7 @@ offset_left = -159.0
|
|||||||
offset_top = 122.0
|
offset_top = 122.0
|
||||||
offset_right = -118.0
|
offset_right = -118.0
|
||||||
offset_bottom = 162.0
|
offset_bottom = 162.0
|
||||||
|
tooltip_text = "Регулировка УМ и ФС"
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
button_pressed = true
|
button_pressed = true
|
||||||
@@ -402,7 +403,7 @@ offset_left = -155.0
|
|||||||
offset_top = 184.0
|
offset_top = 184.0
|
||||||
offset_right = -115.0
|
offset_right = -115.0
|
||||||
offset_bottom = 224.0
|
offset_bottom = 224.0
|
||||||
tooltip_text = "Старт контроля прибора"
|
tooltip_text = "Запуск контроль прибора"
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
texture_normal = ExtResource("8_qqoau")
|
texture_normal = ExtResource("8_qqoau")
|
||||||
@@ -411,6 +412,7 @@ ignore_texture_size = true
|
|||||||
stretch_mode = 0
|
stretch_mode = 0
|
||||||
|
|
||||||
[node name="texture_ems_g" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]]
|
[node name="texture_ems_g" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]]
|
||||||
|
visible = false
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = -155.0
|
offset_left = -155.0
|
||||||
offset_top = 240.0
|
offset_top = 240.0
|
||||||
@@ -424,6 +426,7 @@ ignore_texture_size = true
|
|||||||
stretch_mode = 0
|
stretch_mode = 0
|
||||||
|
|
||||||
[node name="texture_fs" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]]
|
[node name="texture_fs" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]]
|
||||||
|
visible = false
|
||||||
self_modulate = Color(1, 1, 0.941, 0.85)
|
self_modulate = Color(1, 1, 0.941, 0.85)
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = -155.0
|
offset_left = -155.0
|
||||||
@@ -438,6 +441,7 @@ ignore_texture_size = true
|
|||||||
stretch_mode = 0
|
stretch_mode = 0
|
||||||
|
|
||||||
[node name="texture_save_config" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]]
|
[node name="texture_save_config" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]]
|
||||||
|
visible = false
|
||||||
self_modulate = Color(1, 1, 0.941, 0.85)
|
self_modulate = Color(1, 1, 0.941, 0.85)
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = -155.0
|
offset_left = -155.0
|
||||||
@@ -452,6 +456,7 @@ ignore_texture_size = true
|
|||||||
stretch_mode = 0
|
stretch_mode = 0
|
||||||
|
|
||||||
[node name="texture_load_config" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]]
|
[node name="texture_load_config" type="TextureButton" parent="Background/switch_panel" groups=["burger_gr"]]
|
||||||
|
visible = false
|
||||||
self_modulate = Color(1, 1, 0.941, 0.85)
|
self_modulate = Color(1, 1, 0.941, 0.85)
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = -155.0
|
offset_left = -155.0
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ func _ready() -> void:
|
|||||||
self.add_child(timer_modul_um)
|
self.add_child(timer_modul_um)
|
||||||
timer_modul_um.connect('timeout', Callable(self, '_on_timer_modul_um'))
|
timer_modul_um.connect('timeout', Callable(self, '_on_timer_modul_um'))
|
||||||
self.connect('write_ems_g_start', _on_write_ems_g)
|
self.connect('write_ems_g_start', _on_write_ems_g)
|
||||||
|
$Background/switch_panel/burgerButton.button_pressed = true
|
||||||
|
|
||||||
|
|
||||||
func add_signs_scene():
|
func add_signs_scene():
|
||||||
@@ -683,7 +684,6 @@ func _on_write_ems_g(data_to_ems_g: Dictionary):
|
|||||||
|
|
||||||
func on_mode_select(intem_from_sector: int) -> void:
|
func on_mode_select(intem_from_sector: int) -> void:
|
||||||
var pribor_selec: String = Constants.ADDRESSES[intem_from_sector][0]
|
var pribor_selec: String = Constants.ADDRESSES[intem_from_sector][0]
|
||||||
_load_selected_file('user://saves/' + pribor_selec)
|
|
||||||
var node_select_device: GDTable = $TabContainer/PRD/select_dev
|
var node_select_device: GDTable = $TabContainer/PRD/select_dev
|
||||||
var get_select_device: Node = node_select_device.get_node2(1, 0)
|
var get_select_device: Node = node_select_device.get_node2(1, 0)
|
||||||
var meta: Array = get_select_device.get_item_metadata(intem_from_sector)
|
var meta: Array = get_select_device.get_item_metadata(intem_from_sector)
|
||||||
@@ -698,6 +698,7 @@ func on_mode_select(intem_from_sector: int) -> void:
|
|||||||
$load_status_yau.value = 0
|
$load_status_yau.value = 0
|
||||||
emit_signal('read_ems_g_start')
|
emit_signal('read_ems_g_start')
|
||||||
$load_status_yau.visible = true
|
$load_status_yau.visible = true
|
||||||
|
_load_selected_file('user://saves/' + pribor_selec)
|
||||||
|
|
||||||
|
|
||||||
func _on_zapret_1(toggled_on: bool) -> void:
|
func _on_zapret_1(toggled_on: bool) -> void:
|
||||||
@@ -1068,7 +1069,6 @@ func set_tab_and_buttons(tab_index: int, button_name: String, txt_button_name: S
|
|||||||
|
|
||||||
func _on_connect_prd_pressed() -> void:
|
func _on_connect_prd_pressed() -> void:
|
||||||
var pribor_selec: int = $TabContainer/PRD/select_dev.get_node2(1, 0).get_selected_id()
|
var pribor_selec: int = $TabContainer/PRD/select_dev.get_node2(1, 0).get_selected_id()
|
||||||
_load_selected_file('user://saves/' + Constants.ADDRESSES[pribor_selec][0])
|
|
||||||
on_mode_select(pribor_selec)
|
on_mode_select(pribor_selec)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ const ATT_DICT_correct: Array = [
|
|||||||
' 16 dB',
|
' 16 dB',
|
||||||
' 17 dB',
|
' 17 dB',
|
||||||
' 20 dB',
|
' 20 dB',
|
||||||
' 21 dB',
|
' 21.5 dB',
|
||||||
]
|
]
|
||||||
|
|
||||||
const SIGNS: Dictionary = {
|
const SIGNS: Dictionary = {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ var flag_fs_2_ready: bool = false
|
|||||||
var flag_fs_3_ready: bool = false
|
var flag_fs_3_ready: bool = false
|
||||||
var flag_dkm: bool = false
|
var flag_dkm: bool = false
|
||||||
var flag_ug: bool = false
|
var flag_ug: bool = false
|
||||||
|
var flag_yau: bool = false
|
||||||
var flag_modul_on_1: bool = false
|
var flag_modul_on_1: bool = false
|
||||||
var flag_modul_on_2: bool = false
|
var flag_modul_on_2: bool = false
|
||||||
var flag_modul_litera_1: bool = false
|
var flag_modul_litera_1: bool = false
|
||||||
@@ -167,7 +168,21 @@ func _draw_control_panel_prd(pribor):
|
|||||||
$soc_DKM/DKM_3.fname = 'ДКМ-3'
|
$soc_DKM/DKM_3.fname = 'ДКМ-3'
|
||||||
# УМ УМ
|
# УМ УМ
|
||||||
$socket_ym_lb/blok_ym_litera_1.visible = false
|
$socket_ym_lb/blok_ym_litera_1.visible = false
|
||||||
|
|
||||||
|
$socket_ym_lb/blok_ym_1.rname = 'A7'
|
||||||
|
$socket_ym_lb/blok_ym_2.rname = 'A8'
|
||||||
|
$socket_ym_lb/blok_ym_3.rname = 'A9'
|
||||||
|
$socket_ym_lb/blok_ym_4.rname = 'A10'
|
||||||
|
$socket_ym_lb/blok_ym_5.rname = 'A11'
|
||||||
|
$socket_ym_lb/blok_ym_6.rname = 'A12'
|
||||||
|
|
||||||
|
$socket_ym_pb/blok_ym_1.rname = 'A13'
|
||||||
|
$socket_ym_pb/blok_ym_2.rname = 'A14'
|
||||||
|
$socket_ym_pb/blok_ym_3.rname = 'A15'
|
||||||
|
$socket_ym_pb/blok_ym_4.rname = 'A16'
|
||||||
|
$socket_ym_pb/blok_ym_5.rname = 'A17'
|
||||||
|
$socket_ym_pb/blok_ym_6.rname = 'A18'
|
||||||
|
|
||||||
elif pribor == Constants.MODE.PRD_B:
|
elif pribor == Constants.MODE.PRD_B:
|
||||||
# Кассета У5
|
# Кассета У5
|
||||||
$soc_y5/IP5_25.rname = 'А24'
|
$soc_y5/IP5_25.rname = 'А24'
|
||||||
@@ -202,6 +217,20 @@ func _draw_control_panel_prd(pribor):
|
|||||||
$soc_DKM/DKM_3.fname = 'ДКМ-5'
|
$soc_DKM/DKM_3.fname = 'ДКМ-5'
|
||||||
# УМ УМ
|
# УМ УМ
|
||||||
$socket_ym_lb/blok_ym_litera_1.visible = false
|
$socket_ym_lb/blok_ym_litera_1.visible = false
|
||||||
|
|
||||||
|
$socket_ym_lb/blok_ym_1.rname = 'A7'
|
||||||
|
$socket_ym_lb/blok_ym_2.rname = 'A8'
|
||||||
|
$socket_ym_lb/blok_ym_3.rname = 'A9'
|
||||||
|
$socket_ym_lb/blok_ym_4.rname = 'A10'
|
||||||
|
$socket_ym_lb/blok_ym_5.rname = 'A11'
|
||||||
|
$socket_ym_lb/blok_ym_6.rname = 'A12'
|
||||||
|
|
||||||
|
$socket_ym_pb/blok_ym_1.rname = 'A13'
|
||||||
|
$socket_ym_pb/blok_ym_2.rname = 'A14'
|
||||||
|
$socket_ym_pb/blok_ym_3.rname = 'A15'
|
||||||
|
$socket_ym_pb/blok_ym_4.rname = 'A16'
|
||||||
|
$socket_ym_pb/blok_ym_5.rname = 'A17'
|
||||||
|
$socket_ym_pb/blok_ym_6.rname = 'A18'
|
||||||
|
|
||||||
elif pribor == Constants.MODE.PRD_K:
|
elif pribor == Constants.MODE.PRD_K:
|
||||||
# Кассета У5
|
# Кассета У5
|
||||||
@@ -239,7 +268,23 @@ func _draw_control_panel_prd(pribor):
|
|||||||
$soc_DKM/DKM_1.visible = true
|
$soc_DKM/DKM_1.visible = true
|
||||||
$soc_DKM/DKM_2.fname = 'ДКМ-6'
|
$soc_DKM/DKM_2.fname = 'ДКМ-6'
|
||||||
$soc_DKM/DKM_3.fname = 'ДКМ-7'
|
$soc_DKM/DKM_3.fname = 'ДКМ-7'
|
||||||
|
|
||||||
|
$socket_ym_lb/blok_ym_1.rname = 'A16'
|
||||||
|
$socket_ym_lb/blok_ym_2.rname = 'A17'
|
||||||
|
$socket_ym_lb/blok_ym_3.rname = 'A18'
|
||||||
|
$socket_ym_lb/blok_ym_4.rname = 'A19'
|
||||||
|
$socket_ym_lb/blok_ym_5.rname = 'A20'
|
||||||
|
$socket_ym_lb/blok_ym_6.rname = 'A21'
|
||||||
|
|
||||||
|
$socket_ym_pb/blok_ym_1.rname = 'A10'
|
||||||
|
$socket_ym_pb/blok_ym_2.rname = 'A11'
|
||||||
|
$socket_ym_pb/blok_ym_3.rname = 'A12'
|
||||||
|
$socket_ym_pb/blok_ym_4.rname = 'A13'
|
||||||
|
$socket_ym_pb/blok_ym_5.rname = 'A14'
|
||||||
|
$socket_ym_pb/blok_ym_6.rname = 'A15'
|
||||||
|
|
||||||
# УМ УМ
|
# УМ УМ
|
||||||
|
$socket_ym_lb/blok_ym_litera_1.rname = 'A9'
|
||||||
$socket_ym_lb/blok_ym_litera_1.visible = true
|
$socket_ym_lb/blok_ym_litera_1.visible = true
|
||||||
|
|
||||||
|
|
||||||
@@ -330,10 +375,16 @@ func _on_data_fs(fs_data:PackedByteArray, fs_name: String):
|
|||||||
if fs_data.decode_u32(0xC) == 0:
|
if fs_data.decode_u32(0xC) == 0:
|
||||||
if fs_name == 'ФС-1':
|
if fs_name == 'ФС-1':
|
||||||
$Kasseta_FS/ref_A1.state = Constants.STATE_VAL.GOOD
|
$Kasseta_FS/ref_A1.state = Constants.STATE_VAL.GOOD
|
||||||
|
flag_fs_1_ready = true
|
||||||
|
logger.info('✅ Состояние генератора ФС-1: Включен')
|
||||||
elif fs_name == 'ФС-2':
|
elif fs_name == 'ФС-2':
|
||||||
$Kasseta_FS/ref_A2.state = Constants.STATE_VAL.GOOD
|
$Kasseta_FS/ref_A2.state = Constants.STATE_VAL.GOOD
|
||||||
|
logger.info('✅ Состояние генератора ФС-1: Включен')
|
||||||
|
flag_fs_2_ready = true
|
||||||
elif fs_name == 'ФС-3':
|
elif fs_name == 'ФС-3':
|
||||||
$Kasseta_FS/FS_PRD_K.state = Constants.STATE_VAL.GOOD
|
$Kasseta_FS/FS_PRD_K.state = Constants.STATE_VAL.GOOD
|
||||||
|
logger.info('✅ Состояние генератора ФС-1: Включен')
|
||||||
|
flag_fs_3_ready = true
|
||||||
else:
|
else:
|
||||||
if fs_name == 'ФС-1':
|
if fs_name == 'ФС-1':
|
||||||
flag_fs_1_ready = false
|
flag_fs_1_ready = false
|
||||||
@@ -388,10 +439,13 @@ func _on_yau_feedback_receive(_status_yau):
|
|||||||
if Constants.CURRENT_MODE == Constants.MODE.PRD_K:
|
if Constants.CURRENT_MODE == Constants.MODE.PRD_K:
|
||||||
if Network.unit.isa_ports[Constants.BASE_PORTS.UG+0xA] == (prep_set_ug & 0x38)>>3:
|
if Network.unit.isa_ports[Constants.BASE_PORTS.UG+0xA] == (prep_set_ug & 0x38)>>3:
|
||||||
flag_ug = true
|
flag_ug = true
|
||||||
|
$soc_y5/ug.state = Constants.STATE_VAL.GOOD
|
||||||
else:
|
else:
|
||||||
flag_ug = true
|
flag_ug = true
|
||||||
|
$soc_y5/ug.state = Constants.STATE_VAL.GOOD
|
||||||
else:
|
else:
|
||||||
flag_ug = false
|
flag_ug = false
|
||||||
|
$soc_y5/ug.state = Constants.STATE_VAL.ERROR
|
||||||
## Флаг для проверки модуяции на высоком
|
## Флаг для проверки модуяции на высоком
|
||||||
if Network.unit.isa_ports.has(Constants.BASE_PORTS.EMS_G+8) and Network.unit.isa_ports.has(Constants.BASE_PORTS.EMS_G+2):
|
if Network.unit.isa_ports.has(Constants.BASE_PORTS.EMS_G+8) and Network.unit.isa_ports.has(Constants.BASE_PORTS.EMS_G+2):
|
||||||
if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+2] == Constants.META.MODUL_UM_2:
|
if Network.unit.isa_ports[Constants.BASE_PORTS.EMS_G+2] == Constants.META.MODUL_UM_2:
|
||||||
@@ -434,6 +488,7 @@ func _on_start_super_control():
|
|||||||
node_cell_ind[i].state = Constants.STATE_VAL.NONE
|
node_cell_ind[i].state = Constants.STATE_VAL.NONE
|
||||||
flag_dkm = false
|
flag_dkm = false
|
||||||
flag_ug = false
|
flag_ug = false
|
||||||
|
flag_yau = false
|
||||||
for node in um_cell_ind:
|
for node in um_cell_ind:
|
||||||
node.value0 = 0
|
node.value0 = 0
|
||||||
node.value1 = 0
|
node.value1 = 0
|
||||||
@@ -471,16 +526,13 @@ func _on_start_super_control():
|
|||||||
if (Network.unit.online):
|
if (Network.unit.online):
|
||||||
$soc_y5/yau_07b.state = Constants.STATE_VAL.GOOD
|
$soc_y5/yau_07b.state = Constants.STATE_VAL.GOOD
|
||||||
logger.info("✅ ЯУ-07Б: Есть связь")
|
logger.info("✅ ЯУ-07Б: Есть связь")
|
||||||
|
flag_yau = true
|
||||||
_status_cell(Network.unit.status)
|
_status_cell(Network.unit.status)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
for i in range(1, count_cell):
|
for i in range(1, count_cell):
|
||||||
node_cell_ind[i].state = Constants.STATE_VAL.NONE
|
node_cell_ind[i].state = Constants.STATE_VAL.NONE
|
||||||
|
|
||||||
$soc_y5/yau_07b.state = Constants.STATE_VAL.ERROR
|
$soc_y5/yau_07b.state = Constants.STATE_VAL.ERROR
|
||||||
logger.error("❌ ЯУ-07Б: Нет связи")
|
logger.error("❌ ЯУ-07Б: Нет связи")
|
||||||
_on_contol_err()
|
|
||||||
return
|
|
||||||
|
|
||||||
if flag_continue_control:
|
if flag_continue_control:
|
||||||
if Network.unit_fs.online:
|
if Network.unit_fs.online:
|
||||||
@@ -509,10 +561,13 @@ func _on_start_super_control():
|
|||||||
logger.info('🛈 Настройка модулей ФС %s Гц, [%s / %s / %s] АТТ' % [str(fs_freq), str(fs_att_1), str(fs_att_2), str(fs_att_3)])
|
logger.info('🛈 Настройка модулей ФС %s Гц, [%s / %s / %s] АТТ' % [str(fs_freq), str(fs_att_1), str(fs_att_2), str(fs_att_3)])
|
||||||
fs_1_setup(fs_freq[0], fs_att_1) # Гц
|
fs_1_setup(fs_freq[0], fs_att_1) # Гц
|
||||||
fs_2_setup(fs_freq[1], fs_att_2) # Гц
|
fs_2_setup(fs_freq[1], fs_att_2) # Гц
|
||||||
|
|
||||||
else:
|
else:
|
||||||
logger.info('❌ Настройка модулей ФС')
|
logger.info('❌ Настройка модулей ФС')
|
||||||
_on_contol_err()
|
_on_contol_err()
|
||||||
|
|
||||||
|
timer.set_one_shot(true)
|
||||||
|
timer.set_wait_time(10)
|
||||||
|
timer.start()
|
||||||
|
|
||||||
|
|
||||||
func _status_cell(status):
|
func _status_cell(status):
|
||||||
@@ -544,7 +599,6 @@ func _status_cell(status):
|
|||||||
else:
|
else:
|
||||||
node_cell_ind[i_node].state = Constants.STATE_VAL.ERROR
|
node_cell_ind[i_node].state = Constants.STATE_VAL.ERROR
|
||||||
logger.error("❌ %s : Нет связи" % node_cell_ind[i_node].get('fname'))
|
logger.error("❌ %s : Нет связи" % node_cell_ind[i_node].get('fname'))
|
||||||
_on_contol_err()
|
|
||||||
|
|
||||||
if node_cell_ind[3].state == Constants.STATE_VAL.GOOD:
|
if node_cell_ind[3].state == Constants.STATE_VAL.GOOD:
|
||||||
var mask: int = 0x7
|
var mask: int = 0x7
|
||||||
@@ -577,27 +631,17 @@ func set_bits(v, a, m):
|
|||||||
return (~m) & v | a & m
|
return (~m) & v | a & m
|
||||||
|
|
||||||
|
|
||||||
func _on_timer():
|
|
||||||
var control_button: Node = self.get_parent().get_parent().get_child(0).get_child(1).get_child(1)
|
|
||||||
var texture_control_button: Node = self.get_parent().get_parent().get_child(0).get_child(1).get_child(8)
|
|
||||||
if control_button.button_pressed or texture_control_button.button_pressed:
|
|
||||||
_on_start_super_control()
|
|
||||||
|
|
||||||
|
|
||||||
func _on_fs_status(META:int):
|
func _on_fs_status(META:int):
|
||||||
var control_button: Node = self.get_parent().get_parent().get_child(0).get_child(1).get_child(1)
|
var control_button: Node = self.get_parent().get_parent().get_child(0).get_child(1).get_child(1)
|
||||||
var texture_control_button: Node = self.get_parent().get_parent().get_child(0).get_child(1).get_child(8)
|
var texture_control_button: Node = self.get_parent().get_parent().get_child(0).get_child(1).get_child(8)
|
||||||
if control_button.button_pressed or texture_control_button.button_pressed:
|
if control_button.button_pressed or texture_control_button.button_pressed:
|
||||||
if logger and flag_continue_control:
|
if logger and flag_continue_control:
|
||||||
if META == Constants.META.CI_2_OT_FS or META == Constants.META.CI_4_OT_FS or META == Constants.META.CI_6_OT_FS:
|
if META == Constants.META.CI_2_OT_FS or META == Constants.META.CI_4_OT_FS or META == Constants.META.CI_6_OT_FS:
|
||||||
flag_fs_1_ready = true
|
logger.info('✅ СИ от ФС-1: Включен')
|
||||||
logger.info('✅ Состояние генератора ФС-1: Включен')
|
|
||||||
elif META == Constants.META.CI_3_OT_FS or META == Constants.META.CI_5_OT_FS or META == Constants.META.CI_7_OT_FS:
|
elif META == Constants.META.CI_3_OT_FS or META == Constants.META.CI_5_OT_FS or META == Constants.META.CI_7_OT_FS:
|
||||||
flag_fs_2_ready = true
|
logger.info('✅ СИ от ФС-2: Включен')
|
||||||
logger.info('✅ Состояние генератора ФС-2: Включен')
|
|
||||||
elif META == Constants.META.CI_1_OT_FS:
|
elif META == Constants.META.CI_1_OT_FS:
|
||||||
flag_fs_3_ready = true
|
logger.info('✅ СИ от ФС-3: Включен')
|
||||||
logger.info('✅ Состояние генератора ФС-3: Включен')
|
|
||||||
|
|
||||||
|
|
||||||
if flag_fs_1_ready and flag_fs_2_ready:
|
if flag_fs_1_ready and flag_fs_2_ready:
|
||||||
@@ -690,6 +734,7 @@ func _on_fs_status(META:int):
|
|||||||
|
|
||||||
if (dkm >> 5) & 0x1 and (dkm >> 6) & 0x1 and (dkm >> 0) & 0x1: # Следующий шаг ->
|
if (dkm >> 5) & 0x1 and (dkm >> 6) & 0x1 and (dkm >> 0) & 0x1: # Следующий шаг ->
|
||||||
flag_dkm = true
|
flag_dkm = true
|
||||||
|
timer.stop()
|
||||||
else:
|
else:
|
||||||
Network.set_fs_gen_status(true) ## отключен = true
|
Network.set_fs_gen_status(true) ## отключен = true
|
||||||
Network.get_gen_state_1()
|
Network.get_gen_state_1()
|
||||||
@@ -713,7 +758,6 @@ func _on_modul_um():
|
|||||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, 0x2000)
|
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, 0x2000)
|
||||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, Constants.META.MODUL_UM_28)
|
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, Constants.META.MODUL_UM_28)
|
||||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, 0x2000)
|
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, 0x2000)
|
||||||
flag_ug = false
|
|
||||||
flag_dkm = false
|
flag_dkm = false
|
||||||
flag_start = true
|
flag_start = true
|
||||||
|
|
||||||
@@ -757,9 +801,35 @@ func _on_contol_err():
|
|||||||
logger.warning('❌❌❌')
|
logger.warning('❌❌❌')
|
||||||
flag_continue_control = false
|
flag_continue_control = false
|
||||||
_status_prd()
|
_status_prd()
|
||||||
timer.wait_time = 15.0
|
|
||||||
timer.one_shot = true
|
|
||||||
timer.start()
|
func _on_timer():
|
||||||
|
var control_button: Node = self.get_parent().get_parent().get_child(0).get_child(1).get_child(1)
|
||||||
|
var texture_control_button: Node = self.get_parent().get_parent().get_child(0).get_child(1).get_child(8)
|
||||||
|
if control_button.button_pressed or texture_control_button.button_pressed:
|
||||||
|
if not flag_fs_1_ready:
|
||||||
|
$Kasseta_FS/ref_A1.state = Constants.STATE_VAL.ERROR
|
||||||
|
logger.warning('❌ Модуль ФС-1: нет связи')
|
||||||
|
if not flag_fs_2_ready:
|
||||||
|
$Kasseta_FS/ref_A2.state = Constants.STATE_VAL.ERROR
|
||||||
|
logger.warning('❌ Модуль ФС-2: нет связи')
|
||||||
|
if not flag_fs_3_ready:
|
||||||
|
$Kasseta_FS/FS_PRD_K.state = Constants.STATE_VAL.ERROR
|
||||||
|
logger.warning('❌ Модуль ФС-3: нет связи')
|
||||||
|
if not flag_fs_1_ready or not flag_fs_2_ready:
|
||||||
|
_on_contol_err()
|
||||||
|
elif (Constants.CURRENT_MODE == Constants.MODE.PRD_K):
|
||||||
|
if not flag_fs_3_ready:
|
||||||
|
_on_contol_err()
|
||||||
|
else:
|
||||||
|
if flag_yau:
|
||||||
|
$soc_y5/ems_g.state = Constants.STATE_VAL.ERROR
|
||||||
|
logger.warning('❌ Разьем ЭМС-Г: нет связи')
|
||||||
|
if not flag_ug:
|
||||||
|
$soc_y5/ug.state = Constants.STATE_VAL.ERROR
|
||||||
|
logger.warning('❌ Разьем УГ: нет связи')
|
||||||
|
_on_contol_err()
|
||||||
|
_on_timer_03()
|
||||||
|
|
||||||
|
|
||||||
func _status_prd():
|
func _status_prd():
|
||||||
@@ -821,3 +891,4 @@ func _status_prd():
|
|||||||
$lbl_control.text = 'Прибор %s неисправен' % Constants.ADDRESSES[self.get_parent().get_child(0).get_child(1).get_node2(1, 0).get_selected_id()][0]
|
$lbl_control.text = 'Прибор %s неисправен' % Constants.ADDRESSES[self.get_parent().get_child(0).get_child(1).get_node2(1, 0).get_selected_id()][0]
|
||||||
$lbl_control.modulate = Color.CRIMSON
|
$lbl_control.modulate = Color.CRIMSON
|
||||||
$log_array/await.visible = false
|
$log_array/await.visible = false
|
||||||
|
timer.stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user