Доработка. [PATCH] отладка контроля, изменение индикации режима Тренаж

This commit is contained in:
2025-10-13 11:53:18 +03:00
committed by sasha80
parent fad2e1cd64
commit d09a0f3f4c
9 changed files with 81 additions and 6 deletions

View File

@@ -159,7 +159,7 @@ func on_mode_changed(in_tree: bool) -> void:
mashine_timer.start()
func power_fill(pow_dic: Dictionary) -> void:
func power_fill(pow_dic: Dictionary, fs_result: Dictionary) -> void:
var power_amplifier: Array = get_tree().get_nodes_in_group('power_amplifier')
for i_powapm in power_amplifier:
var powamp_meta: String = i_powapm.get_meta('um')
@@ -167,6 +167,8 @@ func power_fill(pow_dic: Dictionary) -> void:
if pow_dic[powamp_meta].size() < 6:
status = STATE_VAL.ERROR
else:
if powamp_meta in ['um_1', 'um_2', 'um_3', 'um_4', 'um_5', 'um_6'] and not fs_result.fs_4: return
if powamp_meta in ['um_7', 'um_8', 'um_9', 'um_10', 'um_11', 'um_12'] and not fs_result.fs_5: return
i_powapm.value0 = pow_dic[powamp_meta]
for i_p in pow_dic[powamp_meta]:
if i_p < constants_v.POWER_THRESHOLD:
@@ -211,7 +213,7 @@ func on_control_result(result_dic: Dictionary, power_dic: Dictionary) -> void:
$dou4_A5.state = STATE_VAL.GOOD if result_dic.dou_4 else STATE_VAL.ERROR
else:
result_dic.fs_4 = 0
power_fill(power_dic)
power_fill(power_dic, result_dic)
var result = true
for device in result_dic.values():