Модификация провекри и результата контроля ум, если 3 луча проходят по мощности, то ум считается исправным

This commit is contained in:
TotMaxim
2025-11-17 21:16:48 +03:00
parent dc362ad26f
commit f39212232a
3 changed files with 38 additions and 38 deletions

View File

@@ -75,9 +75,12 @@ static func power_fill(pow_dic: Dictionary, fs_result: Dictionary, power_amplifi
if powamp_meta in ['um_1', 'um_2', 'um_3', 'um_4', 'um_5', 'um_6'] and not fs_result.fs_2: return
if powamp_meta in ['um_9', 'um_10', 'um_11', 'um_12', 'um_13', 'um_14'] and not fs_result.fs_3: return
i_node_powapm.value0 = pow_dic[powamp_meta]
var count_above_threshold = 0
for i_p in pow_dic[powamp_meta]:
if i_p < POWER_THRESHOLD:
status = STATE_VAL.ERROR
if i_p >= POWER_THRESHOLD:
count_above_threshold += 1
status = STATE_VAL.GOOD if count_above_threshold >= 3 else STATE_VAL.ERROR
i_node_powapm.state = status