отладка контроля
This commit is contained in:
@@ -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