отладка контроля
This commit is contained in:
@@ -59,12 +59,16 @@ func _ready() -> void:
|
||||
node_select_yau_07b = $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control
|
||||
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])
|
||||
|
||||
node_select_yau_07b.get_node2(1, 1).get_child(1).tooltip_text = 'Переключение запрета си в уф'
|
||||
node_select_yau_07b.get_node2(1, 5).get_child(1).tooltip_text = 'Переключение сигнала ФГОЗ'
|
||||
|
||||
# Таблица ЯУ-07б-2
|
||||
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_2, Constants.ROWS_YAU_07B_2.size())
|
||||
node_select_yau_07b_2.set_columns_min_size([160, 120])
|
||||
|
||||
node_select_yau_07b_2.get_node2(1, 1).get_child(1).tooltip_text = 'Переключение запрета си в уф'
|
||||
node_select_yau_07b_2.get_node2(1, 5).get_child(1).tooltip_text = 'Переключение сигнала ФГОЗ'
|
||||
|
||||
# Таблица ЯУ-07б-3
|
||||
var node_select_yau_07b_3: Node = $TabContainer/PRD/body_grid/litera_1/yau07b_control
|
||||
draw_tabl(node_select_yau_07b_3, Constants.ROWS_YAU_07B_2, Constants.ROWS_YAU_07B_2.size())
|
||||
@@ -83,7 +87,7 @@ func _ready() -> void:
|
||||
node_select_fs_2.set_columns_min_size([150, 120, 150])
|
||||
node_select_fs_2.get_node2(1, 4).add_item('Const')
|
||||
node_select_fs_2.get_node2(1, 4).add_item('MSK')
|
||||
|
||||
|
||||
#Таблица ФС-3
|
||||
node_select_fs_3 = $TabContainer/PRD/body_grid/litera_1/fs_control
|
||||
draw_tabl(node_select_fs_3, Constants.ROWS_FS, Constants.ROWS_FS.size())
|
||||
|
||||
@@ -79,8 +79,8 @@ func _ready() -> void:
|
||||
$soc_y5/yau_07b,
|
||||
$soc_y5/ems_g,
|
||||
$soc_y5/ug,
|
||||
$soc_y5/ukp_2,
|
||||
$soc_y5/ukp_1,
|
||||
$soc_y5/ukp_2,
|
||||
|
||||
$soc_P1/MAA_1,
|
||||
$soc_P1/MAA_2,
|
||||
@@ -450,13 +450,13 @@ func _on_start_super_control():
|
||||
if TMP_1 > 70:
|
||||
um_cell_ind[i_temperature].value0 = TMP_1
|
||||
um_cell_ind[i_temperature].state = Constants.STATE_VAL.ERROR
|
||||
_on_contol_err()
|
||||
logger.warning('❌ Температура УМ %s = %d' % [um_cell_ind[i_temperature].fname, TMP_1])
|
||||
else:
|
||||
um_cell_ind[i_temperature].value0 = TMP_1
|
||||
if TMP_2 > 70:
|
||||
um_cell_ind[i_temperature+6].value0 = TMP_2
|
||||
um_cell_ind[i_temperature+6].state = Constants.STATE_VAL.ERROR
|
||||
_on_contol_err()
|
||||
logger.warning('❌ Температура %s: %d' % [um_cell_ind[i_temperature+6].fname, TMP_2])
|
||||
else:
|
||||
um_cell_ind[i_temperature+6].value0 = TMP_2
|
||||
if Constants.CURRENT_MODE == Constants.MODE.PRD_K:
|
||||
@@ -465,8 +465,7 @@ func _on_start_super_control():
|
||||
var TEMPERATURE = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_litera_1) * Constants.TEMP + 3
|
||||
if TEMPERATURE > 70:
|
||||
um_cell_ind[12].value0 = TEMPERATURE
|
||||
_on_contol_err()
|
||||
return
|
||||
logger.warning('❌ Температура %s = %d' % [um_cell_ind[12].fname, TEMPERATURE])
|
||||
else:
|
||||
um_cell_ind[12].value0 = TEMPERATURE
|
||||
|
||||
@@ -482,37 +481,39 @@ func _on_start_super_control():
|
||||
$soc_y5/yau_07b.state = Constants.STATE_VAL.ERROR
|
||||
logger.error("❌ ЯУ-07Б: Нет связи")
|
||||
_on_contol_err()
|
||||
return
|
||||
|
||||
if Network.unit_fs.online:
|
||||
var fs_freq: Array
|
||||
var fs_att_1: float
|
||||
var fs_att_2: float
|
||||
var fs_att_3: float
|
||||
if Constants.CURRENT_MODE == Constants.MODE.PRD_H:
|
||||
fs_freq.append(Constants.FS_FREQ.f2)
|
||||
fs_att_1 = Constants.FS_ATT['ПРД-Н1'][0]
|
||||
fs_freq.append(Constants.FS_FREQ.f3)
|
||||
fs_att_2 = Constants.FS_ATT['ПРД-Н1'][1]
|
||||
elif Constants.CURRENT_MODE == Constants.MODE.PRD_B:
|
||||
fs_freq.append(Constants.FS_FREQ.f4)
|
||||
fs_att_1 = Constants.FS_ATT['ПРД-В1'][0]
|
||||
fs_freq.append(Constants.FS_FREQ.f5)
|
||||
fs_att_2 = Constants.FS_ATT['ПРД-В1'][1]
|
||||
elif Constants.CURRENT_MODE == Constants.MODE.PRD_K:
|
||||
fs_freq.append(Constants.FS_FREQ.f6)
|
||||
fs_att_1 = Constants.FS_ATT['ПРД-К1'][0]
|
||||
fs_freq.append(Constants.FS_FREQ.f7)
|
||||
fs_att_2 = Constants.FS_ATT['ПРД-К1'][1]
|
||||
fs_freq.append(Constants.FS_FREQ.f1)
|
||||
fs_att_3 = Constants.FS_ATT['ПРД-К1'][2]
|
||||
fs_3_setup(fs_freq[2], 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_2_setup(fs_freq[1], fs_att_2) # Гц
|
||||
|
||||
else:
|
||||
logger.info('❌ Настройка модулей ФС')
|
||||
_on_contol_err()
|
||||
if flag_continue_control:
|
||||
if Network.unit_fs.online:
|
||||
var fs_freq: Array
|
||||
var fs_att_1: float
|
||||
var fs_att_2: float
|
||||
var fs_att_3: float
|
||||
if Constants.CURRENT_MODE == Constants.MODE.PRD_H:
|
||||
fs_freq.append(Constants.FS_FREQ.f2)
|
||||
fs_att_1 = Constants.FS_ATT['ПРД-Н1'][0]
|
||||
fs_freq.append(Constants.FS_FREQ.f3)
|
||||
fs_att_2 = Constants.FS_ATT['ПРД-Н1'][1]
|
||||
elif Constants.CURRENT_MODE == Constants.MODE.PRD_B:
|
||||
fs_freq.append(Constants.FS_FREQ.f4)
|
||||
fs_att_1 = Constants.FS_ATT['ПРД-В1'][0]
|
||||
fs_freq.append(Constants.FS_FREQ.f5)
|
||||
fs_att_2 = Constants.FS_ATT['ПРД-В1'][1]
|
||||
elif Constants.CURRENT_MODE == Constants.MODE.PRD_K:
|
||||
fs_freq.append(Constants.FS_FREQ.f6)
|
||||
fs_att_1 = Constants.FS_ATT['ПРД-К1'][0]
|
||||
fs_freq.append(Constants.FS_FREQ.f7)
|
||||
fs_att_2 = Constants.FS_ATT['ПРД-К1'][1]
|
||||
fs_freq.append(Constants.FS_FREQ.f1)
|
||||
fs_att_3 = Constants.FS_ATT['ПРД-К1'][2]
|
||||
fs_3_setup(fs_freq[2], 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_2_setup(fs_freq[1], fs_att_2) # Гц
|
||||
|
||||
else:
|
||||
logger.info('❌ Настройка модулей ФС')
|
||||
_on_contol_err()
|
||||
|
||||
|
||||
func _status_cell(status):
|
||||
@@ -528,6 +529,7 @@ func _status_cell(status):
|
||||
node_cell_ind[i].state = Constants.STATE_VAL.ERROR
|
||||
logger.error("❌ %s : Нет связи" % node_cell_ind[i].get('fname'))
|
||||
_on_contol_err()
|
||||
return
|
||||
|
||||
#dry_contact
|
||||
if (node_cell_ind[2].state == Constants.STATE_VAL.GOOD):
|
||||
@@ -750,7 +752,9 @@ func _on_contol_err():
|
||||
logger.warning('❌❌❌')
|
||||
flag_continue_control = false
|
||||
_status_prd()
|
||||
#timer.start(5)
|
||||
timer.wait_time = 5.0
|
||||
timer.one_shot = true
|
||||
timer.start()
|
||||
|
||||
|
||||
func _status_prd():
|
||||
|
||||
Reference in New Issue
Block a user