Доработка Логики конфигураций
This commit is contained in:
@@ -176,14 +176,17 @@ static func on_control_result(for_result_dic: Dictionary) -> void:
|
||||
f.state = result_dic[fs_meta]
|
||||
|
||||
if not all_y5_good: return
|
||||
if result_dic.fs_1 == 1 and block_kasseta_y5_prd_config_k['yau07']:
|
||||
var fs_1 = true if int(result_dic.fs_1) == 1 else false
|
||||
if fs_1 and block_kasseta_y5_prd_config_k['yau07']:
|
||||
for_result_dic.module_fs_1.state = STATE_VAL.GOOD if result_dic.dkm_1 else STATE_VAL.ERROR
|
||||
|
||||
if result_dic.fs_6 == 1 and block_kasseta_y5_prd_config_k['yau07']:
|
||||
|
||||
var fs_6 = true if int(result_dic.fs_6) == 1 else false
|
||||
if fs_6 and block_kasseta_y5_prd_config_k['yau07']:
|
||||
for_result_dic.module_fs_6.state = STATE_VAL.GOOD if result_dic.dkm_6 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_6.state = STATE_VAL.GOOD if result_dic.dou_6 else STATE_VAL.ERROR
|
||||
|
||||
if result_dic.fs_7 == 1 and block_kasseta_y5_prd_config_k['yau07']:
|
||||
|
||||
var fs_7 = true if int(result_dic.fs_7) == 1 else false
|
||||
if fs_7 and block_kasseta_y5_prd_config_k['yau07']:
|
||||
for_result_dic.module_fs_7.state = STATE_VAL.GOOD if result_dic.dkm_7 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_7.state = STATE_VAL.GOOD if result_dic.dou_7 else STATE_VAL.ERROR
|
||||
|
||||
|
||||
@@ -166,11 +166,13 @@ static func on_control_result(for_result_dic: Dictionary) -> void:
|
||||
f.state = result_dic[fs_meta]
|
||||
|
||||
if not all_y5_good: return
|
||||
if result_dic.fs_2 == 1 and block_kasseta_y5_prd_config_n['yau07']:
|
||||
var fs_2 = true if int(result_dic.fs_2) == 1 else false
|
||||
if fs_2 and block_kasseta_y5_prd_config_n['yau07']:
|
||||
for_result_dic.module_fs_2.state = STATE_VAL.GOOD if result_dic.dkm_2 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_2.state = STATE_VAL.GOOD if result_dic.dou_2 else STATE_VAL.ERROR
|
||||
|
||||
if result_dic.fs_3 == 1 and block_kasseta_y5_prd_config_n['yau07']:
|
||||
|
||||
var fs_3 = true if int(result_dic.fs_3) == 1 else false
|
||||
if fs_3 and block_kasseta_y5_prd_config_n['yau07']:
|
||||
for_result_dic.module_fs_3.state = STATE_VAL.GOOD if result_dic.dkm_3 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_3.state = STATE_VAL.GOOD if result_dic.dou_3 else STATE_VAL.ERROR
|
||||
|
||||
|
||||
@@ -162,11 +162,13 @@ static func on_control_result(for_result_dic: Dictionary) -> void:
|
||||
f.state = result_dic[fs_meta]
|
||||
|
||||
if not all_y5_good: return
|
||||
if result_dic.fs_5 == 1 and block_kasseta_y5_prd_config_v['yau07']:
|
||||
var fs_5 = true if int(result_dic.fs_5) == 1 else false
|
||||
if fs_5 and block_kasseta_y5_prd_config_v['yau07']:
|
||||
for_result_dic.module_fs_5.state = STATE_VAL.GOOD if result_dic.dkm_5 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_5.state = STATE_VAL.GOOD if result_dic.dou_5 else STATE_VAL.ERROR
|
||||
|
||||
if result_dic.fs_4 == 1 and block_kasseta_y5_prd_config_v['yau07']:
|
||||
|
||||
var fs_4 = true if int(result_dic.fs_4) == 1 else false
|
||||
if fs_4 and block_kasseta_y5_prd_config_v['yau07']:
|
||||
for_result_dic.module_fs_4.state = STATE_VAL.GOOD if result_dic.dkm_4 else STATE_VAL.ERROR
|
||||
for_result_dic.dou_4.state = STATE_VAL.GOOD if result_dic.dou_4 else STATE_VAL.ERROR
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ signal pressed(control: PanelContainer)
|
||||
return
|
||||
$margin/vbox/grid1/level7.value = v
|
||||
$margin/vbox/grid1/level7.tint_progress = Color.RED if v >= 50 else Color.GOLD if v >= 40 else Color.WHITE
|
||||
on_level_changed(v, $margin/vbox/grid1/level7, value1_info)
|
||||
|
||||
|
||||
@export var min_value0: float:
|
||||
@@ -150,12 +151,11 @@ func _ready():
|
||||
item.connect('value_changed', on_level_changed.bind(item, value0_info))
|
||||
on_level_changed(item.value, item, value0_info)
|
||||
var level7: = $margin/vbox/grid1/level7
|
||||
level7.connect('value_changed', on_level_changed.bind(level7, value1_info))
|
||||
on_level_changed(level7.value, level7, value1_info)
|
||||
|
||||
|
||||
func on_level_changed(_val: float, item: TextureProgressBar, info: String):
|
||||
item.tooltip_text = '%s\\nТекущее: %0.2f\\nДиапазон: %0.2f…%0.2f' % [info, item.value, item.min_value, item.max_value]
|
||||
func on_level_changed(val: float, item: TextureProgressBar, info: String):
|
||||
item.tooltip_text = '%s\\nТекущее: %0.2f\\nДиапазон: %0.2f…%0.2f' % [info, val, item.min_value, item.max_value]
|
||||
|
||||
|
||||
func set_group_param(items: Array, param: StringName, v) -> void:
|
||||
|
||||
@@ -36,6 +36,7 @@ signal pressed(control: PanelContainer)
|
||||
return
|
||||
$margin/vbox/grid1/level7.value = v
|
||||
$margin/vbox/grid1/level7.tint_progress = Color.RED if v >= 50 else Color.GOLD if v >= 40 else Color.WHITE
|
||||
on_level_changed(v, $margin/vbox/grid1/level7, value1_info)
|
||||
|
||||
|
||||
@export var min_value0: float:
|
||||
@@ -150,12 +151,11 @@ func _ready():
|
||||
item.connect('value_changed', on_level_changed.bind(item, value0_info))
|
||||
on_level_changed(item.value, item, value0_info)
|
||||
var level7: = $margin/vbox/grid1/level7
|
||||
level7.connect('value_changed', on_level_changed.bind(level7, value1_info))
|
||||
on_level_changed(level7.value, level7, value1_info)
|
||||
|
||||
|
||||
func on_level_changed(_val: float, item: TextureProgressBar, info: String):
|
||||
item.tooltip_text = '%s\\nТекущее: %0.2f\\nДиапазон: %0.2f…%0.2f' % [info, item.value, item.min_value, item.max_value]
|
||||
func on_level_changed(val: float, item: TextureProgressBar, info: String):
|
||||
item.tooltip_text = '%s\\nТекущее: %0.2f\\nДиапазон: %0.2f…%0.2f' % [info, val, item.min_value, item.max_value]
|
||||
|
||||
|
||||
func set_group_param(items: Array, param: StringName, v) -> void:
|
||||
@@ -366,7 +366,7 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: -40.00
|
||||
Диапазон: -40.00…60.00"
|
||||
Диапазон: -40.00…55.00"
|
||||
mouse_filter = 0
|
||||
min_value = -40.0
|
||||
max_value = 55.0
|
||||
|
||||
Reference in New Issue
Block a user