рефактор машины состояний контроля

This commit is contained in:
Maxim
2025-09-01 13:21:33 +03:00
parent 9cc9b834d8
commit cd23da9a2d
9 changed files with 89 additions and 102 deletions

View File

@@ -13,12 +13,13 @@ const constants_k: Dictionary = {
'ADDR_UG_LITERA_3': 0x10A,
'TEMP_THRESHOLD': 40,
'POWER_THRESHOLD': 40,
'TIMER_DELAY': 5.0,
'RAY_DOU_NUM': 0x3,
'ATT_UM_1': 0x0,
'ATT_UM_6': 0x7,
'ATT_UM_7': 0x7,
'POWER_UM': 75,
'POWER_UM': 85,
'TIMER_DELAY': 5.0,
'STATE_MASHINE_TIMER': 0.3,
}
# Конфигурация параметров для каждого прибора
const PRIBOR_CONFIG := {
@@ -70,9 +71,9 @@ var control_results_k: Dictionary = {
'dkm_7': false,
'dou_6': false,
'dou_7': false,
'fs_1': false,
'fs_6': false,
'fs_7': false,
'fs_1': 2,
'fs_6': 2,
'fs_7': 2,
}
var test_control_k = preload('res://scripts/pribor-prd.gd')
@@ -119,7 +120,7 @@ func initialize_connections() -> void:
func setup_timer() -> void:
add_child(mashine_timer)
mashine_timer.connect('timeout', Callable(self, 'on_state_mashine'))
mashine_timer.wait_time = 0.5
mashine_timer.wait_time = constants_k.STATE_MASHINE_TIMER
mashine_timer.start()
@@ -212,14 +213,20 @@ func on_control_result(result_dic: Dictionary, power_dic: Dictionary) -> void:
f.state = new_state
result_dic[fs_meta] = new_state
if result_dic.fs_1:
if result_dic.fs_1 == 1:
$kasseta_fs_kd/ref_A2.state = STATE_VAL.GOOD if result_dic.dkm_1 else STATE_VAL.ERROR
if result_dic.fs_6:
else:
result_dic.fs_1 = false
if result_dic.fs_6 == 1:
$kasseta_fs_kd/ref_A4.state = STATE_VAL.GOOD if result_dic.dkm_6 else STATE_VAL.ERROR
$dou6_A7.state = STATE_VAL.GOOD if result_dic.dou_6 else STATE_VAL.ERROR
if result_dic.fs_7:
else:
result_dic.fs_6 = false
if result_dic.fs_7 == 1:
$kasseta_fs_kd/ref_A7.state = STATE_VAL.GOOD if result_dic.dkm_7 else STATE_VAL.ERROR
$dou7_A8.state = STATE_VAL.GOOD if result_dic.dou_7 else STATE_VAL.ERROR
else:
result_dic.fs_7 = false
power_fill(power_dic)

View File

@@ -94,7 +94,6 @@ offset_left = 485.0
offset_top = 242.0
offset_right = 652.0
offset_bottom = 337.0
animation_duration = null
value0 = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
fname = "УМ1535Б"
rname = "A10"
@@ -108,7 +107,6 @@ offset_left = 485.0
offset_top = 337.0
offset_right = 652.0
offset_bottom = 432.0
animation_duration = null
fname = "УМ1535Б"
rname = "A11"
value0_info = "Мощность, Вт"
@@ -121,7 +119,6 @@ offset_left = 485.0
offset_top = 432.0
offset_right = 652.0
offset_bottom = 527.0
animation_duration = null
fname = "УМ1535Б"
rname = "A12"
value0_info = "Мощность, Вт"
@@ -134,7 +131,6 @@ offset_left = 485.0
offset_top = 527.0
offset_right = 652.0
offset_bottom = 622.0
animation_duration = null
fname = "УМ1535Б"
rname = "A13"
value0_info = "Мощность, Вт"
@@ -147,7 +143,6 @@ offset_left = 485.0
offset_top = 622.0
offset_right = 652.0
offset_bottom = 717.0
animation_duration = null
fname = "УМ1535Б"
rname = "A14"
value0_info = "Мощность, Вт"
@@ -160,7 +155,6 @@ offset_left = 485.0
offset_top = 717.0
offset_right = 652.0
offset_bottom = 812.0
animation_duration = null
fname = "УМ1535Б"
rname = "A15"
value0_info = "Мощность, Вт"
@@ -173,7 +167,6 @@ offset_left = 485.0
offset_top = 812.0
offset_right = 652.0
offset_bottom = 907.0
animation_duration = null
fname = "УТМ80"
rname = "A9"
value0_info = "Мощность, Вт"
@@ -186,7 +179,6 @@ offset_left = 8.0
offset_top = 242.0
offset_right = 175.0
offset_bottom = 337.0
animation_duration = null
fname = "УМ1535Б"
rname = "A16"
value0_info = "Мощность, Вт"
@@ -199,7 +191,6 @@ offset_left = 8.0
offset_top = 337.0
offset_right = 173.0
offset_bottom = 432.0
animation_duration = null
fname = "УМ1535Б"
rname = "A17"
value0_info = "Мощность, Вт"
@@ -212,7 +203,6 @@ offset_left = 8.0
offset_top = 432.0
offset_right = 175.0
offset_bottom = 527.0
animation_duration = null
fname = "УМ1535Б"
rname = "A18"
value0_info = "Мощность, Вт"
@@ -225,7 +215,6 @@ offset_left = 8.0
offset_top = 527.0
offset_right = 175.0
offset_bottom = 622.0
animation_duration = null
fname = "УМ1535Б"
rname = "A19"
value0_info = "Мощность, Вт"
@@ -238,7 +227,6 @@ offset_left = 8.0
offset_top = 622.0
offset_right = 175.0
offset_bottom = 717.0
animation_duration = null
fname = "УМ1535Б"
rname = "A20"
value0_info = "Мощность, Вт"
@@ -251,7 +239,6 @@ offset_left = 8.0
offset_top = 717.0
offset_right = 175.0
offset_bottom = 812.0
animation_duration = null
fname = "УМ1535Б"
rname = "A21"
value0_info = "Мощность, Вт"

View File

@@ -12,11 +12,12 @@ const constants_n = {
'ADDR_UG_LITERA_3': 0x10A,
'TEMP_THRESHOLD': 70,
'POWER_THRESHOLD': 40,
'TIMER_DELAY': 5.0,
'RAY_DOU_NUM': 0x3,
'ATT_UM_2': 0x7,
'ATT_UM_3': 0x7,
'POWER_UM': 70,
'TIMER_DELAY': 5.0,
'STATE_MASHINE_TIMER': 0.3,
}
# Конфигурация параметров для каждого прибора
const PRIBOR_CONFIG_N := {
@@ -64,8 +65,8 @@ var control_results_n: Dictionary = {
'dkm_3': false,
'dou_2': false,
'dou_3': false,
'fs_2': false,
'fs_3': false,
'fs_2': 2,
'fs_3': 2,
}
var test_control_n = preload('res://scripts/pribor-prd.gd')
@@ -112,7 +113,7 @@ func initialize_connections() -> void:
func setup_timer() -> void:
add_child(mashine_timer)
mashine_timer.connect('timeout', Callable(self, 'on_state_mashine'))
mashine_timer.wait_time = 0.5
mashine_timer.wait_time = constants_n.STATE_MASHINE_TIMER
mashine_timer.start()
@@ -202,12 +203,16 @@ func on_control_result(result_dic: Dictionary, power_dic: Dictionary) -> void:
f.state = new_state
result_dic[fs_meta] = new_state
if result_dic.fs_2:
if result_dic.fs_2 == 1:
$kasseta_FS_ND/ref_A4.state = STATE_VAL.GOOD if result_dic.dkm_2 else STATE_VAL.ERROR
$dou2_A5.state = STATE_VAL.GOOD if result_dic.dou_2 else STATE_VAL.ERROR
if result_dic.fs_3:
else:
result_dic.fs_2 = false
if result_dic.fs_3 == 1:
$kasseta_FS_ND/ref_A3.state = STATE_VAL.GOOD if result_dic.dkm_3 else STATE_VAL.ERROR
$dou3_A6.state = STATE_VAL.GOOD if result_dic.dou_3 else STATE_VAL.ERROR
else:
result_dic.fs_3 = false
power_fill(power_dic)

View File

@@ -117,7 +117,7 @@ offset_left = 55.0
offset_top = 32.0
offset_right = 105.0
offset_bottom = 182.0
fname = "Блок ФС-2"
fname = "Блок ФС-3"
rname = "A3"
[node name="ref_A1" parent="kasseta_FS_ND" groups=["default_reset", "fs_group"] instance=ExtResource("7_eoqf2")]
@@ -143,7 +143,7 @@ offset_left = 205.0
offset_top = 32.0
offset_right = 255.0
offset_bottom = 182.0
fname = "Блок ФС-3"
fname = "Блок ФС-2"
rname = "A4"
[node name="kasseta_P_1" type="NinePatchRect" parent="."]
@@ -204,7 +204,6 @@ offset_left = 485.0
offset_top = 242.0
offset_right = 652.0
offset_bottom = 337.0
animation_duration = null
fname = "УМ1535Б"
rname = "A7"
value0_info = "Мощность, Вт"
@@ -217,7 +216,6 @@ offset_left = 485.0
offset_top = 337.0
offset_right = 652.0
offset_bottom = 432.0
animation_duration = null
fname = "УМ1535А"
rname = "A8"
value0_info = "Мощность, Вт"
@@ -230,7 +228,6 @@ offset_left = 485.0
offset_top = 432.0
offset_right = 652.0
offset_bottom = 527.0
animation_duration = null
fname = "УМ1535А"
rname = "A9"
value0_info = "Мощность, Вт"
@@ -243,7 +240,6 @@ offset_left = 485.0
offset_top = 527.0
offset_right = 652.0
offset_bottom = 622.0
animation_duration = null
fname = "УМ1535А"
rname = "A10"
value0_info = "Мощность, Вт"
@@ -256,7 +252,6 @@ offset_left = 485.0
offset_top = 622.0
offset_right = 652.0
offset_bottom = 717.0
animation_duration = null
fname = "УМ1535А"
rname = "A11"
value0_info = "Мощность, Вт"
@@ -269,7 +264,6 @@ offset_left = 485.0
offset_top = 717.0
offset_right = 652.0
offset_bottom = 812.0
animation_duration = null
fname = "УМ1535А"
rname = "A12"
value0_info = "Мощность, Вт"
@@ -282,7 +276,6 @@ offset_left = 8.0
offset_top = 242.0
offset_right = 175.0
offset_bottom = 337.0
animation_duration = null
fname = "УМ1535А"
rname = "A13"
value0_info = "Мощность, Вт"
@@ -295,7 +288,6 @@ offset_left = 8.0
offset_top = 337.0
offset_right = 175.0
offset_bottom = 432.0
animation_duration = null
fname = "УМ1535А"
rname = "A14"
value0_info = "Мощность, Вт"
@@ -308,7 +300,6 @@ offset_left = 8.0
offset_top = 432.0
offset_right = 175.0
offset_bottom = 527.0
animation_duration = null
fname = "УМ1535А"
rname = "A15"
value0_info = "Мощность, Вт"
@@ -321,7 +312,6 @@ offset_left = 8.0
offset_top = 527.0
offset_right = 175.0
offset_bottom = 622.0
animation_duration = null
fname = "УМ1535А"
rname = "A16"
value0_info = "Мощность, Вт"
@@ -334,7 +324,6 @@ offset_left = 8.0
offset_top = 622.0
offset_right = 175.0
offset_bottom = 717.0
animation_duration = null
fname = "УМ1535А"
rname = "A17"
value0_info = "Мощность, Вт"
@@ -347,7 +336,6 @@ offset_left = 8.0
offset_top = 717.0
offset_right = 175.0
offset_bottom = 812.0
animation_duration = null
fname = "УМ1535А"
rname = "A18"
value0_info = "Мощность, Вт"

View File

@@ -12,11 +12,12 @@ const constants_v = {
'ADDR_UG_LITERA_3': 0x10A,
'TEMP_THRESHOLD': 70,
'POWER_THRESHOLD': 40,
'TIMER_DELAY': 5.0,
'RAY_DOU_NUM': 0x3,
'ATT_UM_4': 0x7,
'ATT_UM_5': 0x7,
'POWER_UM': 70,
'TIMER_DELAY': 5.0,
'STATE_MASHINE_TIMER': 0.3,
}
# Конфигурация параметров для каждого прибора
const PRIBOR_CONFIG_V := {
@@ -27,7 +28,7 @@ const PRIBOR_CONFIG_V := {
}
# Конфигурация частот и ширин для каждого ФС
const FS_PARAMS_V := {
4: {'freq': 1227.0, 'width': 110.0},
4: {'freq': 1227.0, 'width': 100.0},
5: {'freq': 1575.0, 'width': 110.0},
}
enum STATE_VAL { NONE = 0, GOOD = 1, ERROR = 2 }
@@ -64,8 +65,8 @@ var control_results_v: Dictionary = {
'dkm_5': false,
'dou_4': false,
'dou_5': false,
'fs_4': false,
'fs_5': false,
'fs_4': 2,
'fs_5': 2,
}
var test_control_v = preload('res://scripts/pribor-prd.gd')
@@ -111,7 +112,7 @@ func initialize_connections() -> void:
func setup_timer() -> void:
add_child(mashine_timer)
mashine_timer.connect('timeout', Callable(self, 'on_state_mashine'))
mashine_timer.wait_time = 0.5
mashine_timer.wait_time = constants_v.STATE_MASHINE_TIMER
mashine_timer.start()
@@ -202,13 +203,16 @@ func on_control_result(result_dic: Dictionary, power_dic: Dictionary) -> void:
f.state = new_state
result_dic[fs_meta] = new_state
if result_dic.fs_4:
$kasseta_FS_VD/ref_A2.state = STATE_VAL.GOOD if result_dic.dkm_4 else STATE_VAL.ERROR
$dou4_A5.state = STATE_VAL.GOOD if result_dic.dou_4 else STATE_VAL.ERROR
if result_dic.fs_5:
$kasseta_FS_VD/ref_A6.state = STATE_VAL.GOOD if result_dic.dkm_5 else STATE_VAL.ERROR
if result_dic.fs_5 == 1:
$kasseta_FS_VD/ref_A2.state = STATE_VAL.GOOD if result_dic.dkm_5 else STATE_VAL.ERROR
$dou5_A6.state = STATE_VAL.GOOD if result_dic.dou_5 else STATE_VAL.ERROR
else:
result_dic.fs_5 = false
if result_dic.fs_4 == 1:
$kasseta_FS_VD/ref_A6.state = STATE_VAL.GOOD if result_dic.dkm_4 else STATE_VAL.ERROR
$dou4_A5.state = STATE_VAL.GOOD if result_dic.dou_4 else STATE_VAL.ERROR
else:
result_dic.fs_4 = false
power_fill(power_dic)
var result = true

View File

@@ -153,7 +153,6 @@ offset_left = 485.0
offset_top = 242.0
offset_right = 652.0
offset_bottom = 337.0
animation_duration = null
fname = "УМ1535Б"
rname = "A7"
value0_info = "Мощность, Вт"
@@ -166,7 +165,6 @@ offset_left = 485.0
offset_top = 337.0
offset_right = 652.0
offset_bottom = 432.0
animation_duration = null
fname = "УМ1535А"
rname = "A8"
value0_info = "Мощность, Вт"
@@ -179,7 +177,6 @@ offset_left = 485.0
offset_top = 432.0
offset_right = 652.0
offset_bottom = 527.0
animation_duration = null
fname = "УМ1535А"
rname = "A9"
value0_info = "Мощность, Вт"
@@ -192,7 +189,6 @@ offset_left = 485.0
offset_top = 527.0
offset_right = 652.0
offset_bottom = 622.0
animation_duration = null
fname = "УМ1535А"
rname = "A10"
value0_info = "Мощность, Вт"
@@ -205,7 +201,6 @@ offset_left = 485.0
offset_top = 622.0
offset_right = 652.0
offset_bottom = 717.0
animation_duration = null
fname = "УМ1535А"
rname = "A11"
value0_info = "Мощность, Вт"
@@ -218,7 +213,6 @@ offset_left = 485.0
offset_top = 717.0
offset_right = 652.0
offset_bottom = 812.0
animation_duration = null
fname = "УМ1535А"
rname = "A12"
value0_info = "Мощность, Вт"
@@ -231,7 +225,6 @@ offset_left = 8.0
offset_top = 242.0
offset_right = 175.0
offset_bottom = 337.0
animation_duration = null
fname = "УМ1535А"
rname = "A13"
value0_info = "Мощность, Вт"
@@ -244,7 +237,6 @@ offset_left = 8.0
offset_top = 337.0
offset_right = 175.0
offset_bottom = 432.0
animation_duration = null
fname = "УМ1535А"
rname = "A14"
value0_info = "Мощность, Вт"
@@ -257,7 +249,6 @@ offset_left = 8.0
offset_top = 432.0
offset_right = 175.0
offset_bottom = 527.0
animation_duration = null
fname = "УМ1535А"
rname = "A15"
value0_info = "Мощность, Вт"
@@ -270,7 +261,6 @@ offset_left = 8.0
offset_top = 527.0
offset_right = 175.0
offset_bottom = 622.0
animation_duration = null
fname = "УМ1535А"
rname = "A16"
value0_info = "Мощность, Вт"
@@ -283,7 +273,6 @@ offset_left = 8.0
offset_top = 622.0
offset_right = 175.0
offset_bottom = 717.0
animation_duration = null
fname = "УМ1535А"
rname = "A17"
value0_info = "Мощность, Вт"
@@ -296,7 +285,6 @@ offset_left = 8.0
offset_top = 717.0
offset_right = 175.0
offset_bottom = 812.0
animation_duration = null
fname = "УМ1535А"
rname = "A18"
value0_info = "Мощность, Вт"

View File

@@ -26,7 +26,6 @@ signal pressed(control: PanelContainer)
var count: int = min(items.size(), v.size())
for i in count:
set_value0_animated(items[i], v[i])
#items[i].value = v[i]
## Значение уровня
@@ -177,7 +176,7 @@ func _enter_tree_defered():
var count: int = min(items.size(), value0.size())
for i in count:
items[i].min_value = min_value0
items[i].max_value = max_value0
items[i].max_value = 1400 # max_value0: TODO для отладки
items[i].step = step0
items = get_name_nodes()
set_group_param(items, 'text', value_name0)
@@ -273,7 +272,6 @@ offset_bottom = 88.0
theme_override_styles/panel = SubResource("StyleBoxEmpty_3nd2u")
script = SubResource("GDScript_oj3k3")
textures = [ExtResource("1_n1aqt"), ExtResource("2_rim3u"), ExtResource("3_3w8fg")]
animation_duration = null
value0 = [20.0, 30.0, 40.0, 50.0, 60.0, 70.0]
value1 = 56.0
min_value1 = -50.0

View File

@@ -343,29 +343,32 @@ func check_dir():
## Производит приём состояния модулей ФС.
func on_data_capsrpb_received(unit0: capsrpb.CapsRpb):
if not unit0.json_dic.has('ts'): return
if unit0.json_dic['ts'] != 7: return
if not unit0.json_dic.has('msfs'): return
if not unit0.json_dic['ts'] == 7 and not unit0.json_dic['ts'] == 5: return
if unit0.json_dic.has('msvk'):
for nfs in fs_caps_id:
fs_dict[fs_caps_id[nfs]].msvk = unit0.json_dic['msvk'] if unit0.json_dic['msvk'].size()>0 else []
var msfs = unit0.json_dic['msfs']
for fs in msfs:
if fs is Dictionary:
if not fs.has('nmfs'):
return
var nmfs = int(fs['nmfs'])
if not fs_caps_id.has(nmfs):
continue
var ii = fs_caps_id[nmfs]
if not fs_dict.has(ii):
continue
var fs_module = fs_dict[ii]
if fs.has('isg'):
fs_module.isg = int(fs['isg'])
if fs.has('pow'):
fs_module.pow_caps_rx = int(fs['pow'])
if fs.has('freq'):
fs_module.freq_caps_rx = int(fs['freq'])
if fs.has('width'):
fs_module.width_caps_rx = int(fs['width'])
if unit0.json_dic.has('msfs'):
var msfs = unit0.json_dic['msfs']
for fs in msfs:
if fs is Dictionary:
if not fs.has('nmfs'):
return
var nmfs = int(fs['nmfs'])
if not fs_caps_id.has(nmfs):
continue
var ii = fs_caps_id[nmfs]
if not fs_dict.has(ii):
continue
var fs_module = fs_dict[ii]
if fs.has('isg'):
fs_module.isg = int(fs['isg'])
if fs.has('pow'):
fs_module.pow_caps_rx = int(fs['pow'])
if fs.has('freq'):
fs_module.freq_caps_rx = int(fs['freq'])
if fs.has('width'):
fs_module.width_caps_rx = int(fs['width'])
signaller.emit_signal('fs_update_state', fs_dict)

View File

@@ -68,7 +68,8 @@ class TestPRD extends Node:
var control_timer: Timer = Timer.new()
var ems_6666_timer: Timer = Timer.new()
signal control_is_over(control_results, power_result)
var flag_fs_turn_on: bool = false
var flag_fs_turn_off: bool = false
## Инициализация аргуметнов
func _init(init_data: Dictionary) -> void:
@@ -118,9 +119,15 @@ class TestPRD extends Node:
if fs_key.is_empty():
return
var fs_result := {fs_key: 0}
var fs_result := {fs_key: 0, 'fs_modulation': 'none'}
fs_result = on_fs_state(packet_type_7, fs_mapping, fs_result)
control_results[fs_key] = fs_result[fs_key]
if fs_result.fs_modulation and not flag_fs_turn_on:
print_debug('Помеха "Включено"')
flag_fs_turn_on = true
if not fs_result.fs_modulation and not flag_fs_turn_off:
print('Помеха "Откючено"')
flag_fs_turn_off = true
##
@@ -132,7 +139,7 @@ class TestPRD extends Node:
_handle_fs_turn_on_state()
state = STATE_MASHINE.FS_WORK
STATE_MASHINE.FS_WORK:
if not flag_timer_started:
if flag_fs_turn_on:
_handle_fs_work_state()
STATE_MASHINE.CHEK_KASSETA_Y5:
if block_kasseta_y5_config['yau07']:
@@ -146,7 +153,7 @@ class TestPRD extends Node:
#ems_6666_timer.start()
#state = STATE_MASHINE.READ_ISA
STATE_MASHINE.READ_ISA:
if (unit_prd.cmd_state == unit_prd.CmdState.DONE) or (unit_prd.cmd_state == unit_prd.CmdState.FALSE):
if (unit_prd.cmd_state == unit_prd.CmdState.DONE) or (unit_prd.cmd_state == unit_prd.CmdState.FAIL):
_handle_read_isa(module_prd, unit_prd, [constants.ADDR_UG_LITERA_1, constants.ADDR_UG_LITERA_2, constants.ADDR_UG_LITERA_3])
state = STATE_MASHINE.UG_SET_RAY
STATE_MASHINE.UG_SET_RAY:
@@ -196,6 +203,7 @@ class TestPRD extends Node:
state = STATE_MASHINE.FS_TURN_OFF
STATE_MASHINE.FS_TURN_OFF:
_handle_fs_turn_off_state()
state = STATE_MASHINE.STOP_CONTROL
STATE_MASHINE.STOP_CONTROL:
_handle_stop_control_state()
@@ -203,8 +211,8 @@ class TestPRD extends Node:
func _handle_init_state() -> void:
control_label.text = 'Выполняется инициализация ФС-%s' % current_litera
if current_litera in [1, 2, 3, 4, 5, 6, 7]:
state = STATE_MASHINE.FS_TURN_ON
#state = STATE_MASHINE.STOP_CONTROL
if flag_fs_turn_off:
state = STATE_MASHINE.FS_TURN_ON
else:
control_results = on_control_result(block_ip_config, control_results)
var send_power_pack = prep_power(power_result, self_name)
@@ -221,8 +229,6 @@ class TestPRD extends Node:
func _handle_fs_work_state() -> void:
control_label.text = 'Выполняется проверка ФС-%s' % current_litera
if not module_prd.unit_yau07.online:
return
if (current_litera == 2 and control_results.fs_2) or \
(current_litera == 3 and control_results.fs_3) or \
(current_litera == 4 and control_results.fs_4) or \
@@ -268,8 +274,8 @@ class TestPRD extends Node:
func _handle_fs_turn_off_state() -> void:
control_label.text = 'Выполняется отключение ФС-%s' % current_litera
flag_fs_turn_off = false
manage_fs(false, self_name, pribor_config, fs_parameters, current_litera, constants.POWER_UM)
state = STATE_MASHINE.STOP_CONTROL
func _handle_stop_control_state() -> void:
@@ -364,6 +370,7 @@ class TestPRD extends Node:
func on_stop_control() -> void:
_handle_fs_turn_off_state()
state = STATE_MASHINE.FS_TURN_OFF
@@ -374,7 +381,6 @@ class TestPRD extends Node:
if not ip_config[block][1]:
all_blocks_ip_ok = false
ctrl_results['block_ip'] = all_blocks_ip_ok
return ctrl_results
@@ -522,6 +528,7 @@ class TestPRD extends Node:
var rule: Dictionary = FS_RULES[rule_key]
if _should_apply_rule(fs_num, rule, updated_results):
updated_results[rule.key] = fs_data.isg
updated_results['fs_modulation'] = fs_data.msvk.size() > 0
break
return updated_results
@@ -611,7 +618,7 @@ class TestPRD extends Node:
if pribor == '' or pribor == '' or pribor == '' or pribor == '':
dou = 'dou_6' if litera == 6 else 'dou_7'
elif pribor == '' or pribor == '' or pribor == '' or pribor == '':
dou = 'dou_4' if litera == 5 else 'dou_5'
dou = 'dou_4' if litera == 4 else 'dou_5'
var ray_dic: Dictionary = power_dic[litera]
if ray_dic[RAY_m5].size() == 0 or \
@@ -626,7 +633,7 @@ class TestPRD extends Node:
for i_pow_arr in ray_dic.values():
for i_pow in i_pow_arr.size():
if i_pow_arr[i_pow] < cnst.POWER_THRESHOLD:
print_debug('dou_%s: false' % litera)
#print_debug('dou_%s: false' % litera)
all_dou_ok = false
control_dic[dou] = all_dou_ok