diff --git a/scripts/pribor-prd.gd b/scripts/pribor-prd.gd index 99e2a6d7..c3a3e045 100644 --- a/scripts/pribor-prd.gd +++ b/scripts/pribor-prd.gd @@ -445,12 +445,11 @@ func _handle_fs_work_state() -> void: (current_litera == 6 and control_results.fs_6) or \ (current_litera == 7 and control_results.fs_7) or \ (current_litera == 1 and control_results.fs_1): - if not block_kasseta_y5_config['yau07']: - _set_status('Ожидание данных от ЯУ-07...') - return # НЕ переходим дальше пока нет данных от сервиса МП550 - if flags.only_fs: state = STATE_MACHINE.IN_EMS_STOP + elif not block_kasseta_y5_config['yau07']: + _set_status('Ожидание данных от МП550 сервиса...') + return else: state = STATE_MACHINE.UG_SET_RAY_5 if current_litera == 1 else STATE_MACHINE.UG_SET_RAY_CTRL @@ -470,7 +469,7 @@ func _handle_check_kasseta_state() -> void: _set_status('Перегрев УМ') state = STATE_MACHINE.IN_EMS_STOP else: - flags.flag_only_fs = true + flags.only_fs = true _set_status('Касета У5: ERROR, Проверка ФС.') state = STATE_MACHINE.FS_TURN_ON @@ -554,8 +553,7 @@ func _handle_ray_read_mode() -> void: ## Обработка записи состояния луча func _handle_ray_write_mode(ray_num: int) -> void: - if not _can_write_ray(): - return + if not _can_write_ray(): return if (ray_num == 6 or ray_num == 5) and not control_timer.is_stopped(): control_timer.stop() @@ -1057,9 +1055,9 @@ static func check_block_kasseta_y5(status_prd: PackedByteArray, y5_config: Dicti y5_config.yau07 = not flag_not_trust if y5_config.yau07: y5_config.ems = (status_prd[0] & 1) and ((status_prd[0] >> 4) & 1) - y5_config.ug = (status_prd[0] >> 1) & 1 - y5_config.ukp1 = (status_prd[0] >> 2) & 1 - y5_config.ukp2 = (status_prd[0] >> 3) & 1 + y5_config.ug = (status_prd[0] >> 1) & 1 != 0 + y5_config.ukp1 = (status_prd[0] >> 2) & 1 != 0 + y5_config.ukp2 = (status_prd[0] >> 3) & 1 != 0 return y5_config