Compare commits
20 Commits
a8b085a514
...
b273a01bf5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b273a01bf5 | ||
|
|
c6ed61b6ce | ||
|
|
7954048f11 | ||
|
|
6b8f767a89 | ||
|
|
8c330d08a6 | ||
|
|
e688e27a63 | ||
|
|
aebccdcf91 | ||
|
|
3d2d29c3f2 | ||
|
|
661e8ef96c | ||
|
|
fbd9969f93 | ||
|
|
2cdce8f1e6 | ||
|
|
3b747f211c | ||
|
|
c2e3127afa | ||
|
|
33e793faec | ||
|
|
43eb151471 | ||
|
|
58e43884f0 | ||
|
|
09b17c7ef7 | ||
|
|
427581b1f9 | ||
|
|
cbc9fbc7a9 | ||
|
|
38b858b6fc |
@@ -36,4 +36,4 @@
|
||||
- После клонирования запустить скрипт `git-hooks-config.sh`
|
||||
- В среде **Windows** запуск скрипта `git-hooks-config.sh` производить из оболочки `git bash`
|
||||
- Нужно обновить `settings.json`
|
||||
- поиск циклических зависимостей
|
||||
- поиск циклических зависимостей (не реализованно)
|
||||
|
||||
BIN
data/АФСП-РТР.png
Normal file
|
After Width: | Height: | Size: 150 KiB |
34
data/АФСП-РТР.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://vdhmga62vjsj"
|
||||
path="res://.godot/imported/АФСП-РТР.png-0b840f65d8791cdd41736204e8128ac9.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/АФСП-РТР.png"
|
||||
dest_files=["res://.godot/imported/АФСП-РТР.png-0b840f65d8791cdd41736204e8128ac9.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/Структура1.wmf.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
34
data/Структура1.wmf.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bj6gixv60xcrq"
|
||||
path="res://.godot/imported/Структура1.wmf.png-3f3bea77b2575bb24d8ebb8779214cf5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/Структура1.wmf.png"
|
||||
dest_files=["res://.godot/imported/Структура1.wmf.png-3f3bea77b2575bb24d8ebb8779214cf5.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-РЭП-РПД-В.png
Normal file
|
After Width: | Height: | Size: 254 KiB |
34
data/У-РЭП-РПД-В.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b2vf7en1jj8dv"
|
||||
path="res://.godot/imported/У-РЭП-РПД-В.png-16e53650006353b1f4857905926a9d2e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-РЭП-РПД-В.png"
|
||||
dest_files=["res://.godot/imported/У-РЭП-РПД-В.png-16e53650006353b1f4857905926a9d2e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-РЭП-РПД-К.png
Normal file
|
After Width: | Height: | Size: 176 KiB |
34
data/У-РЭП-РПД-К.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dm350ta8noa0v"
|
||||
path="res://.godot/imported/У-РЭП-РПД-К.png-382bf7e19c5207a25529ff47820a3140.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-РЭП-РПД-К.png"
|
||||
dest_files=["res://.godot/imported/У-РЭП-РПД-К.png-382bf7e19c5207a25529ff47820a3140.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-РЭП-РПД-Н.png
Normal file
|
After Width: | Height: | Size: 150 KiB |
34
data/У-РЭП-РПД-Н.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bktiige0i2lhl"
|
||||
path="res://.godot/imported/У-РЭП-РПД-Н.png-1812f48d3e2d228cc07e3a1f352eee1f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-РЭП-РПД-Н.png"
|
||||
dest_files=["res://.godot/imported/У-РЭП-РПД-Н.png-1812f48d3e2d228cc07e3a1f352eee1f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-УФ.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
34
data/У-УФ.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://u7h3l0jjrsnp"
|
||||
path="res://.godot/imported/У-УФ.png-e70ef42c717c17d1d5bd404916252ea3.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-УФ.png"
|
||||
dest_files=["res://.godot/imported/У-УФ.png-e70ef42c717c17d1d5bd404916252ea3.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/У-ЭП.png
Normal file
|
After Width: | Height: | Size: 319 KiB |
34
data/У-ЭП.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c3cyog3gy24ft"
|
||||
path="res://.godot/imported/У-ЭП.png-5de01103a8e9a06ea0e900facdc90d4d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/У-ЭП.png"
|
||||
dest_files=["res://.godot/imported/У-ЭП.png-5de01103a8e9a06ea0e900facdc90d4d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
data/УА-РЭП.png
Normal file
|
After Width: | Height: | Size: 557 KiB |
34
data/УА-РЭП.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cllxcfa130vqu"
|
||||
path="res://.godot/imported/УА-РЭП.png-2578a93f5ba5f7909945125656980bd6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://data/УА-РЭП.png"
|
||||
dest_files=["res://.godot/imported/УА-РЭП.png-2578a93f5ba5f7909945125656980bd6.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -35,8 +35,10 @@ func get_radius_outter() -> float: return material.get('shader_parameter/radius
|
||||
func get_radius_inner_0() -> float: return material.get('shader_parameter/radius_inner_0')
|
||||
func get_radius_inner_1() -> float: return material.get('shader_parameter/radius_inner_1')
|
||||
|
||||
func get_band_colors(_val: Array): return material.get('shader_parameter/ant_band_c')
|
||||
func get_band_failures(_val: Array): return material.get('shader_parameter/ant_band_m')
|
||||
func set_band_colors(val: Array): material.set('shader_parameter/ant_band_c', val)
|
||||
|
||||
func set_band_failures(val: Array): material.set('shader_parameter/ant_band_m', val)
|
||||
|
||||
## Добавляет сектор запрета[br]
|
||||
## [param id] - Индекс сектора запрета.[br]
|
||||
|
||||
@@ -727,7 +727,7 @@ func blend_mask(val: bool) -> void:
|
||||
|
||||
|
||||
func update_coordinates_label(lon: float, lat: float) -> void:
|
||||
coordinates_label = 'Координаты:\nNS:%f\nEW:%f' % [lat, lon]
|
||||
coordinates_label = 'Координаты: NS:%f, EW:%f' % [lat, lon]
|
||||
signaller.emit_signal('update_coordinates_map', coordinates_label)
|
||||
|
||||
|
||||
|
||||
@@ -476,7 +476,7 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
tooltip_text = "
|
||||
Текущее: 0.00
|
||||
Диапазон: -40.00…60.00"
|
||||
Диапазон: -40.00…55.00"
|
||||
mouse_filter = 0
|
||||
min_value = -40.0
|
||||
max_value = 55.0
|
||||
|
||||
@@ -29,7 +29,7 @@ func _on_toggled(toggled_on):
|
||||
$frame.visible = toggled_on
|
||||
|
||||
|
||||
func _on_focus_entered():
|
||||
func _on_focus_entered():
|
||||
button_pressed = true
|
||||
#enter_press() TODO: Пока что без выбора прибора
|
||||
|
||||
@@ -56,7 +56,7 @@ func enter_press():
|
||||
@export var progress_value: float = 0.0:
|
||||
set(v):
|
||||
progress_value = v
|
||||
|
||||
|
||||
if is_inside_tree():
|
||||
update_progress_bar(v)
|
||||
var max_val = $control_progress.get('max_value')
|
||||
@@ -83,3 +83,10 @@ func enter_press():
|
||||
progress_min_value = v
|
||||
if is_inside_tree():
|
||||
$control_progress.min_value = v
|
||||
|
||||
|
||||
@export var show_functional: bool:
|
||||
set(v):
|
||||
show_functional = v
|
||||
if is_inside_tree():
|
||||
$pic_functional.visible = v
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=21 format=3 uid="uid://lwmw4egynmd1"]
|
||||
[gd_scene load_steps=30 format=3 uid="uid://lwmw4egynmd1"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bar8k5qef7kch" path="res://data/УФ.png" id="2_0nvm1"]
|
||||
[ext_resource type="Script" uid="uid://q3gmpsqspjfp" path="res://scenes/контроль/внешний.gd" id="2_8r80x"]
|
||||
@@ -12,12 +12,20 @@
|
||||
[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="7_6j01w"]
|
||||
[ext_resource type="Texture2D" uid="uid://u3tnejvpm8it" path="res://data/disconnect-a.png" id="8_gs2be"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="8_isjua"]
|
||||
[ext_resource type="Shader" uid="uid://83fx15q1xlid" path="res://shaders/two-color.gdshader" id="9_71ec4"]
|
||||
[ext_resource type="Texture2D" uid="uid://b4isaggma6q3" path="res://data/Грани22.png" id="9_iqgf5"]
|
||||
[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="9_ll0vs"]
|
||||
[ext_resource type="Texture2D" uid="uid://bktiige0i2lhl" path="res://data/У-РЭП-РПД-Н.png" id="9_qe1go"]
|
||||
[ext_resource type="Texture2D" uid="uid://00871pb6moln" path="res://data/прогресс-фон-1.png" id="9_w6m6a"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1k856fxhrjnh" path="res://data/прогресс-заполнение-1.png" id="10_lbx5w"]
|
||||
[ext_resource type="Texture2D" uid="uid://u7h3l0jjrsnp" path="res://data/У-УФ.png" id="11_gjf0t"]
|
||||
[ext_resource type="Script" uid="uid://bncy1x53jp73d" path="res://scenes/контроль/connect_pribor.gd" id="11_u7tym"]
|
||||
[ext_resource type="Texture2D" uid="uid://vdhmga62vjsj" path="res://data/АФСП-РТР.png" id="13_32yvq"]
|
||||
[ext_resource type="Texture2D" uid="uid://dm350ta8noa0v" path="res://data/У-РЭП-РПД-К.png" id="16_32yvq"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3cyog3gy24ft" path="res://data/У-ЭП.png" id="16_gjf0t"]
|
||||
[ext_resource type="Script" uid="uid://xjs7owe2iexn" path="res://scenes/контроль/control_prd.gd" id="18_lbx5w"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2vf7en1jj8dv" path="res://data/У-РЭП-РПД-В.png" id="20_l5wui"]
|
||||
[ext_resource type="Texture2D" uid="uid://cllxcfa130vqu" path="res://data/УА-РЭП.png" id="22_1s34a"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_iqgf5"]
|
||||
script/source = "extends Panel
|
||||
@@ -48,6 +56,9 @@ const PRIBORS_RES = \\
|
||||
}
|
||||
|
||||
|
||||
var cur_pribor_node = null
|
||||
|
||||
|
||||
func on_line_changed(u, conn_node, _pribor_meta): conn_node.set_val(u.online)
|
||||
func on_serv_changed(u, pribor_node, _pribor_meta): pribor_node.state = int(u.serviceability)
|
||||
var count_device_control_is_ready: int = 0
|
||||
@@ -62,6 +73,7 @@ func reset_pribor_buttons():
|
||||
var pribor_buttons: = get_tree().get_nodes_in_group('pribor_buttons')
|
||||
for node in pribor_buttons:
|
||||
node.button_pressed = false
|
||||
node.show_functional = false
|
||||
|
||||
|
||||
func _ready():
|
||||
@@ -124,6 +136,10 @@ func clean_pribor_items():
|
||||
|
||||
|
||||
func on_pribor_press(pribor_path, header_text, pribor_node):
|
||||
if cur_pribor_node:
|
||||
cur_pribor_node.show_functional = false
|
||||
$lbl_header/chk_show_functional.button_pressed = false
|
||||
cur_pribor_node = pribor_node
|
||||
clean_pribor_items()
|
||||
var pribor_obj = load(pribor_path)
|
||||
if not pribor_obj:
|
||||
@@ -153,6 +169,11 @@ func on_update_uf_serviceability(uf_serviceaability: bool, uf_pribor: Node)-> vo
|
||||
uf_pribor.state = 1 if uf_serviceaability else 2
|
||||
|
||||
|
||||
func _on_chk_show_functional_toggled(toggled_on: bool) -> void:
|
||||
if cur_pribor_node:
|
||||
cur_pribor_node.show_functional = toggled_on
|
||||
|
||||
|
||||
func _on_control_prd_pressed() -> void:
|
||||
count_device_control_is_ready = 0
|
||||
signaller.emit_signal('start_contol_device')
|
||||
@@ -173,9 +194,9 @@ func on_control_is_over(pribor_node: Node) -> void:
|
||||
if count_device_control_is_ready == 12:
|
||||
var time_dict = Time.get_datetime_dict_from_system()
|
||||
$control_prd.text = 'Контроль выполнен %02d:%02d/%02d.%02d' % [
|
||||
time_dict.hour,
|
||||
time_dict.minute,
|
||||
time_dict.day,
|
||||
time_dict.hour,
|
||||
time_dict.minute,
|
||||
time_dict.day,
|
||||
time_dict.month]
|
||||
$control_prd.disabled = false
|
||||
$control_prd.tooltip_text = 'Нажать для повторного контроля '
|
||||
@@ -195,6 +216,12 @@ animations = [{
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_71ec4"]
|
||||
shader = ExtResource("9_71ec4")
|
||||
shader_parameter/grey = Vector3(0.14, 0.13, 0.13)
|
||||
shader_parameter/orange = Vector3(0.95, 0.55, 0.05)
|
||||
shader_parameter/gamma = 2.0
|
||||
|
||||
[node name="Контроль" type="Panel"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -203,6 +230,8 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = SubResource("GDScript_iqgf5")
|
||||
metadata/_edit_lock_ = true
|
||||
metadata/_edit_vertical_guides_ = [21.0, 1578.0]
|
||||
metadata/_edit_horizontal_guides_ = [200.0, 51.0]
|
||||
|
||||
[node name="capsrpb" type="TextureRect" parent="." groups=["pribor_pics"]]
|
||||
editor_description = "Кнопка для отображения внешних соединений."
|
||||
@@ -423,6 +452,7 @@ patch_margin_right = 16
|
||||
patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_prd_n_1"]
|
||||
visible = false
|
||||
light_mask = 3
|
||||
position = Vector2(35, -10)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
@@ -453,6 +483,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_n_1"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1029.0
|
||||
offset_top = 9.0
|
||||
offset_right = 576.0
|
||||
offset_bottom = 830.0
|
||||
scale = Vector2(0.97094, 0.97094)
|
||||
texture = ExtResource("9_qe1go")
|
||||
|
||||
[node name="pribor_uf" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -506,6 +548,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_uf"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1155.0
|
||||
offset_top = -362.0
|
||||
offset_right = -96.0001
|
||||
offset_bottom = 311.0
|
||||
scale = Vector2(0.789429, 0.789429)
|
||||
texture = ExtResource("11_gjf0t")
|
||||
|
||||
[node name="pribor_rtr" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -568,6 +622,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_rtr"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1036.0
|
||||
offset_top = -394.0
|
||||
offset_right = 927.0
|
||||
offset_bottom = 595.0
|
||||
scale = Vector2(0.792688, 0.792688)
|
||||
texture = ExtResource("13_32yvq")
|
||||
|
||||
[node name="pribor_afsp_1" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -634,6 +700,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_afsp_1"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -5120.0
|
||||
offset_top = -895.0
|
||||
offset_right = -3157.0
|
||||
offset_bottom = 93.9999
|
||||
scale = Vector2(3.96323, 3.96323)
|
||||
texture = ExtResource("13_32yvq")
|
||||
|
||||
[node name="pribor_afsp_2" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -701,6 +779,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_afsp_2"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -6070.0
|
||||
offset_top = -900.0
|
||||
offset_right = -4107.0
|
||||
offset_bottom = 89.0001
|
||||
scale = Vector2(3.96409, 4.54663)
|
||||
texture = ExtResource("13_32yvq")
|
||||
|
||||
[node name="pribor_uyep" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -752,6 +842,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.872305
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_uyep"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1292.0
|
||||
offset_top = -365.0
|
||||
offset_right = 821.0
|
||||
offset_bottom = 764.0
|
||||
scale = Vector2(0.736875, 0.814493)
|
||||
texture = ExtResource("16_gjf0t")
|
||||
|
||||
[node name="pribor_prd_v_2" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -827,6 +929,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_v_2"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1419.0
|
||||
offset_top = -480.0
|
||||
offset_right = 173.0
|
||||
offset_bottom = 328.0
|
||||
scale = Vector2(0.977411, 0.977411)
|
||||
texture = ExtResource("20_l5wui")
|
||||
|
||||
[node name="pribor_prd_n_2" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -874,6 +988,7 @@ patch_margin_right = 16
|
||||
patch_margin_bottom = 16
|
||||
|
||||
[node name="connect_pribor" type="AnimatedSprite2D" parent="pribor_prd_n_2"]
|
||||
visible = false
|
||||
light_mask = 3
|
||||
position = Vector2(37, -10)
|
||||
scale = Vector2(0.625, 0.625)
|
||||
@@ -881,6 +996,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_n_2"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1419.0
|
||||
offset_top = -145.0
|
||||
offset_right = 186.0
|
||||
offset_bottom = 676.0
|
||||
scale = Vector2(0.96888, 0.96888)
|
||||
texture = ExtResource("9_qe1go")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_n_2"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
@@ -956,6 +1083,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_k_2"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1418.0
|
||||
offset_top = -314.0
|
||||
offset_right = 345.0
|
||||
offset_bottom = 649.0
|
||||
scale = Vector2(0.881522, 0.881522)
|
||||
texture = ExtResource("16_32yvq")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_k_2"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
@@ -1054,6 +1193,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_v_3"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1026.0
|
||||
offset_top = -601.0
|
||||
offset_right = 566.0
|
||||
offset_bottom = 207.0
|
||||
scale = Vector2(0.975409, 0.975409)
|
||||
texture = ExtResource("20_l5wui")
|
||||
|
||||
[node name="pribor_prd_n_3" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1129,6 +1280,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_n_3"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1302.0
|
||||
offset_top = -602.0
|
||||
offset_right = 303.0
|
||||
offset_bottom = 219.0
|
||||
scale = Vector2(0.969291, 0.969291)
|
||||
texture = ExtResource("9_qe1go")
|
||||
|
||||
[node name="pribor_prd_k_3" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1204,6 +1367,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_k_3"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1167.0
|
||||
offset_top = -602.0
|
||||
offset_right = 596.0
|
||||
offset_bottom = 361.0
|
||||
scale = Vector2(0.882165, 0.896739)
|
||||
texture = ExtResource("16_32yvq")
|
||||
|
||||
[node name="pribor_prd_v_1" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1256,6 +1431,18 @@ sprite_frames = SubResource("SpriteFrames_foasq")
|
||||
frame_progress = 0.72355
|
||||
script = ExtResource("11_u7tym")
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_v_1"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1304.0
|
||||
offset_top = 2.0
|
||||
offset_right = 288.0
|
||||
offset_bottom = 810.0
|
||||
scale = Vector2(0.974661, 0.974661)
|
||||
texture = ExtResource("20_l5wui")
|
||||
|
||||
[node name="control_progress" type="TextureProgressBar" parent="pribor_prd_v_1"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
@@ -1354,6 +1541,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_k_1"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -1163.0
|
||||
offset_top = 10.0
|
||||
offset_right = 600.0
|
||||
offset_bottom = 973.0
|
||||
scale = Vector2(0.883479, 0.883479)
|
||||
texture = ExtResource("16_32yvq")
|
||||
|
||||
[node name="pribor_prd_v_4" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1428,6 +1627,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_v_4"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -923.0
|
||||
offset_top = -144.0
|
||||
offset_right = 669.0
|
||||
offset_bottom = 664.0
|
||||
scale = Vector2(0.976707, 0.976707)
|
||||
texture = ExtResource("20_l5wui")
|
||||
|
||||
[node name="pribor_prd_n_4" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1502,6 +1713,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_n_4"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -919.0
|
||||
offset_top = -485.0
|
||||
offset_right = 686.0
|
||||
offset_bottom = 336.0
|
||||
scale = Vector2(0.968111, 0.968111)
|
||||
texture = ExtResource("9_qe1go")
|
||||
|
||||
[node name="pribor_prd_k_4" type="TextureButton" parent="." groups=["pribor_buttons"]]
|
||||
editor_description = "Кнопка для выбора прибора."
|
||||
layout_mode = 0
|
||||
@@ -1576,6 +1799,18 @@ texture_progress = ExtResource("10_lbx5w")
|
||||
tint_under = Color(1, 1, 1, 0.419608)
|
||||
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="pribor_prd_k_4"]
|
||||
visible = false
|
||||
z_index = 1
|
||||
material = SubResource("ShaderMaterial_71ec4")
|
||||
layout_mode = 0
|
||||
offset_left = -924.0
|
||||
offset_top = -315.0
|
||||
offset_right = 839.0
|
||||
offset_bottom = 648.0
|
||||
scale = Vector2(0.879295, 0.879295)
|
||||
texture = ExtResource("16_32yvq")
|
||||
|
||||
[node name="txr_legend0" type="TextureRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 316.0
|
||||
@@ -1644,6 +1879,16 @@ text = "Контроль исправности прибора"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="chk_show_functional" type="CheckButton" parent="lbl_header"]
|
||||
layout_mode = 0
|
||||
offset_left = 972.0
|
||||
offset_top = -1.0
|
||||
offset_right = 1351.0
|
||||
offset_bottom = 33.0
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "Показть функциональную схему Э2"
|
||||
flat = true
|
||||
|
||||
[node name="connect_legend0" type="AnimatedSprite2D" parent="."]
|
||||
light_mask = 3
|
||||
position = Vector2(1219, 1151)
|
||||
@@ -1709,6 +1954,17 @@ text = "Запуск контроля"
|
||||
script = ExtResource("18_lbx5w")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="pic_functional" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = -962.0
|
||||
offset_top = 73.0
|
||||
offset_right = 96.9999
|
||||
offset_bottom = 746.0
|
||||
scale = Vector2(5, 5)
|
||||
texture = ExtResource("22_1s34a")
|
||||
|
||||
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
|
||||
[connection signal="toggled" from="pribor_prd_n_1" to="pribor_prd_n_1" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_uf" to="pribor_uf" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_rtr" to="pribor_rtr" method="_on_toggled"]
|
||||
@@ -1726,4 +1982,5 @@ metadata/_edit_lock_ = true
|
||||
[connection signal="toggled" from="pribor_prd_v_4" to="pribor_prd_v_4" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_prd_n_4" to="pribor_prd_n_4" method="_on_toggled"]
|
||||
[connection signal="toggled" from="pribor_prd_k_4" to="pribor_prd_k_4" method="_on_toggled"]
|
||||
[connection signal="toggled" from="lbl_header/chk_show_functional" to="." method="_on_chk_show_functional_toggled"]
|
||||
[connection signal="pressed" from="control_prd" to="." method="_on_control_prd_pressed"]
|
||||
|
||||
@@ -56,6 +56,7 @@ var fs_selected: Dictionary ## Словарь выбранных сектор
|
||||
var fs_active: Dictionary ## Словарь секторов назначенных на подавление
|
||||
var fs_emit: Dictionary ## Словарь секторов назначенных на подавление
|
||||
var fs_closed: Dictionary ## Словарь для секторов запрета
|
||||
var fs_failed: Array ## Индикация сломанных секторов (модули ФС). AntBandState.ANT_BAND_READY - исправен, AntBandState.ANT_BAND_FAILURE - сломан.
|
||||
|
||||
## Состояние перетаскивания.
|
||||
enum DragFSM {
|
||||
@@ -79,6 +80,11 @@ enum MapViewMode {
|
||||
}
|
||||
|
||||
|
||||
enum AntBandState {
|
||||
ANT_BAND_READY = 1,
|
||||
ANT_BAND_FAILED = 0
|
||||
}
|
||||
|
||||
const VAL_TO_EVENT = {
|
||||
false: 'manual_control', ## Выбор целей и установка помех вручную.
|
||||
true: 'full_auto' } ## Выбор целей и установка помех автоматически.
|
||||
@@ -92,6 +98,12 @@ func on_threat_selected(th, ecm_btns): on_rto_threat_sel(th.id, ecm_btns)
|
||||
func on_enter_tree() -> void: call_deferred('on_button_strobe_pressed')
|
||||
|
||||
|
||||
func clear_all_klaster(): $canvas.clear_all_seczap()
|
||||
|
||||
|
||||
func on_user_panning(): $btn_center.button_pressed = false
|
||||
|
||||
|
||||
func on_settings_changed():
|
||||
gos_flag = ProjectSettings.get_setting('application/config/Включить работу по своим целям', true)
|
||||
color_emit = ProjectSettings.get_setting('application/interfer/emit_color', Color(0.58, 0.47, 0.51, 1.0))
|
||||
@@ -144,10 +156,18 @@ func _exit_tree() -> void:
|
||||
timer1.queue_free()
|
||||
|
||||
|
||||
func init_fs_failed():
|
||||
var sectors_count = $canvas.fs_default_colors.size()
|
||||
fs_failed.resize(sectors_count)
|
||||
for i in fs_failed.size():
|
||||
fs_failed[i] = AntBandState.ANT_BAND_READY
|
||||
|
||||
|
||||
## Производит инициализацию.
|
||||
func _ready():
|
||||
ProjectSettings.connect('settings_changed', on_settings_changed)
|
||||
on_settings_changed()
|
||||
init_fs_failed()
|
||||
min_zoom = ProjectSettings.get_setting('application/config/map_minimum_zoom', 5)
|
||||
max_zoom = ProjectSettings.get_setting('application/config/map_maximum_zoom', 19)
|
||||
drag_fsm = DragFSM.OFF
|
||||
@@ -188,16 +208,13 @@ func _ready():
|
||||
|
||||
|
||||
func sector_klaster(sector_data):
|
||||
if sector_data["draw"]:
|
||||
var rect: Rect2 = sector_data["rect"]
|
||||
var color: Color = sector_data["color"]
|
||||
var id: int = sector_data["index"]
|
||||
if sector_data['draw']:
|
||||
var rect: Rect2 = sector_data['rect']
|
||||
var color: Color = sector_data['color']
|
||||
var id: int = sector_data['index']
|
||||
$canvas.add_seczap(id, Vector4(rect.position.x, rect.position.y, rect.size.x, rect.size.y))
|
||||
$canvas.set_seczap_color(id, color)
|
||||
else:
|
||||
pass
|
||||
|
||||
func clear_all_klaster(): $canvas.clear_all_seczap()
|
||||
|
||||
func on_navi_data_received(data: Dictionary):
|
||||
var k = data.get('k', 0.0)
|
||||
@@ -205,10 +222,6 @@ func on_navi_data_received(data: Dictionary):
|
||||
course = k
|
||||
|
||||
|
||||
func on_user_panning():
|
||||
$btn_center.button_pressed = false
|
||||
|
||||
|
||||
func on_chk_interfer_prinuditelno(_interfer_sectors):
|
||||
$chk_auto.set_pressed_no_signal(false)
|
||||
on_value_changed(false)
|
||||
@@ -522,6 +535,7 @@ func update_fs_colors():
|
||||
else:
|
||||
fs_colors[key] = color_select
|
||||
$canvas.set_band_colors(fs_colors)
|
||||
$canvas.set_band_failures(fs_failed)
|
||||
if fs_emit.size():
|
||||
if $btn_activate.pressed:
|
||||
$btn_activate.self_modulate = Color.RED
|
||||
@@ -577,8 +591,9 @@ func on_interfer_prinuditelno(prenuditelno_sectors, btns):
|
||||
|
||||
|
||||
## Вызывается при получении информации о состоянии модулей ФС от КАПС РПБ.
|
||||
func on_fs_update_state(_fs_dict: Dictionary):
|
||||
pass
|
||||
func on_fs_update_state(fs_dict: Dictionary):
|
||||
for key in fs_dict.keys():
|
||||
fs_failed[key] = fs_dict[key].isg
|
||||
|
||||
|
||||
func on_btn_center_toggled(toggled_on: bool) -> void:
|
||||
|
||||
@@ -306,18 +306,18 @@ vertical_alignment = 1
|
||||
|
||||
[node name="coordinates_map" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 999.0
|
||||
offset_top = 128.0
|
||||
offset_right = 1111.0
|
||||
offset_bottom = 147.0
|
||||
offset_left = 660.0
|
||||
offset_top = -24.0
|
||||
offset_right = 772.0
|
||||
offset_bottom = -5.0
|
||||
text = "Координаты:"
|
||||
|
||||
[node name="scale_map" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 999.0
|
||||
offset_top = 202.0
|
||||
offset_right = 1109.0
|
||||
offset_bottom = 223.0
|
||||
offset_left = 1003.0
|
||||
offset_top = -24.0
|
||||
offset_right = 1113.0
|
||||
offset_bottom = -3.0
|
||||
text = "Масштаб:"
|
||||
|
||||
[node name="zoom_plus" type="Button" parent="."]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
extends Panel
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
var unit_trassa = network.get_unit_instance('уарэп-трасса')
|
||||
unit_trassa.connect('line_changed', Callable(self, 'on_trassa_line_changed'))
|
||||
@@ -8,30 +9,30 @@ func _ready() -> void:
|
||||
|
||||
func on_trassa_line_changed(unit_trassa):
|
||||
if unit_trassa.online:
|
||||
$"454/СостояниеРэс3".self_modulate = Color.WEB_GREEN
|
||||
$"СкруглённыйПрямоугольникБелый/Label3".text = 'Трасса'
|
||||
$"СкруглённыйПрямоугольникБелый/Label4".text = 'Трасса'
|
||||
$"СкруглённыйПрямоугольникБелый/Label5".text = 'Активный'
|
||||
$"СкруглённыйПрямоугольникБелый/Label6".text = str(unit_trassa.daa)
|
||||
$"СкруглённыйПрямоугольникБелый/Label7".text = str(unit_trassa.dap)
|
||||
$"СкруглённыйПрямоугольникБелый/Label8".text = '1'
|
||||
$"СкруглённыйПрямоугольникБелый/Label9".text = str(unit_trassa.lfb)
|
||||
$"СкруглённыйПрямоугольникБелый/Label10".text = str(unit_trassa.lfb)
|
||||
$'454/СостояниеРэс3'.self_modulate = Color.WEB_GREEN
|
||||
$'СкруглённыйПрямоугольникБелый/Label3'.text = 'Трасса'
|
||||
$'СкруглённыйПрямоугольникБелый/Label4'.text = 'Трасса'
|
||||
$'СкруглённыйПрямоугольникБелый/Label5'.text = 'Активный'
|
||||
$'СкруглённыйПрямоугольникБелый/Label6'.text = str(unit_trassa.daa)
|
||||
$'СкруглённыйПрямоугольникБелый/Label7'.text = str(unit_trassa.dap)
|
||||
$'СкруглённыйПрямоугольникБелый/Label8'.text = '1'
|
||||
$'СкруглённыйПрямоугольникБелый/Label9'.text = str(unit_trassa.lfb)
|
||||
$'СкруглённыйПрямоугольникБелый/Label10'.text = str(unit_trassa.lfb)
|
||||
else:
|
||||
$"454/СостояниеРэс3".self_modulate = Color.WHITE
|
||||
$"СкруглённыйПрямоугольникБелый/Label3".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label4".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label5".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label6".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label7".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label8".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label9".text = '-'
|
||||
$"СкруглённыйПрямоугольникБелый/Label10".text = '-'
|
||||
$'454/СостояниеРэс3'.self_modulate = Color.WHITE
|
||||
$'СкруглённыйПрямоугольникБелый/Label3'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label4'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label5'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label6'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label7'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label8'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label9'.text = '-'
|
||||
$'СкруглённыйПрямоугольникБелый/Label10'.text = '-'
|
||||
|
||||
|
||||
func on_sector_klaster(_data, unit_trassa):
|
||||
$"СкруглённыйПрямоугольникБелый/Label6".text = str(unit_trassa.dap)
|
||||
$"СкруглённыйПрямоугольникБелый/Label7".text = str(unit_trassa.daa)
|
||||
$"СкруглённыйПрямоугольникБелый/Label8".text = '1'
|
||||
$"СкруглённыйПрямоугольникБелый/Label9".text = str(unit_trassa.lfb)
|
||||
$"СкруглённыйПрямоугольникБелый/Label10".text = str(unit_trassa.hfb)
|
||||
$'СкруглённыйПрямоугольникБелый/Label6'.text = str(unit_trassa.dap)
|
||||
$'СкруглённыйПрямоугольникБелый/Label7'.text = str(unit_trassa.daa)
|
||||
$'СкруглённыйПрямоугольникБелый/Label8'.text = '1'
|
||||
$'СкруглённыйПрямоугольникБелый/Label9'.text = str(unit_trassa.lfb)
|
||||
$'СкруглённыйПрямоугольникБелый/Label10'.text = str(unit_trassa.hfb)
|
||||
|
||||
@@ -93,6 +93,7 @@ const ID_INTERFERS_LEN = 63 ## Размер пула номеров целе
|
||||
const INTERFER_OFF = 'off'
|
||||
const INTERFER_IQFILE = 'IQ-файл'
|
||||
const POW_DEFAULT: float = 50.0
|
||||
const PERIOD_DEFAULT = 7.5
|
||||
var msg6_num: int = 0 ## Счётчик сообщений "тип 6"
|
||||
var msg8_num: int = 0 ## Счётчик сообщений "тип 8"
|
||||
var id_array: Array ## Массив id воздействий.
|
||||
@@ -215,7 +216,7 @@ func _ready() -> void:
|
||||
threats.connect('threats_resized', Callable(self, 'on_threats_resized'))
|
||||
threats.connect('threat_update', Callable(self, 'on_threats_update').bind(ecms, unit_caps))
|
||||
ProjectSettings.connect('settings_changed', on_settings_changed)
|
||||
var unit_nav = network.get_unit_instance('навигация')
|
||||
var unit_nav: = network.get_unit_instance('навигация')
|
||||
unit_nav.connect('data_received', on_nav_data_received.bind(unit_caps))
|
||||
|
||||
|
||||
@@ -389,10 +390,7 @@ func on_interfer_create(interfer_name, sel_threats, fs_arr, power, u, ecms) -> v
|
||||
if krp != '':
|
||||
interfer_name = krp
|
||||
set_rparams(item, param)
|
||||
if (param['width'] < settings.WIDTH_MIN):
|
||||
param['width'] = settings.WIDTH_MIN
|
||||
elif (param['width'] > settings.WIDTH_MAX):
|
||||
param['width'] = settings.WIDTH_MAX
|
||||
check_width(param)
|
||||
interfer_create(u, interfer_name, ecms, param, kni, id, thrs, SOURCE_INTERFER[0], power)
|
||||
|
||||
for item in fs_arr:
|
||||
@@ -401,10 +399,7 @@ func on_interfer_create(interfer_name, sel_threats, fs_arr, power, u, ecms) -> v
|
||||
var id = item[3]
|
||||
param['freq'] = item[1]
|
||||
param['width'] = item[2]
|
||||
if (param['width'] < settings.WIDTH_MIN):
|
||||
param['width'] = settings.WIDTH_MIN
|
||||
elif (param['width'] > settings.WIDTH_MAX):
|
||||
param['width'] = settings.WIDTH_MAX
|
||||
check_width(param)
|
||||
interfer_create(u, interfer_name, ecms, param, kni, id, fs, SOURCE_INTERFER[1], power)
|
||||
|
||||
|
||||
@@ -444,7 +439,7 @@ func interfer_create(u, interfer_name, ecms, param, kni, id, dict, source_interf
|
||||
var sz = ecms.size()
|
||||
var ispp: int = 0
|
||||
param['dur'] = 1.0 # Необходимо добавить параметры управления
|
||||
param['period'] = 1.0 # Необходимо добавить параметры управления
|
||||
param['period'] = param.get('period', PERIOD_DEFAULT)
|
||||
var key = dict.find_key(id)
|
||||
if source_interfer != SOURCE_INTERFER[2]:
|
||||
if key != null:
|
||||
@@ -580,9 +575,8 @@ func on_threats_update(threat, ecms, unit_caps):
|
||||
ecm.priority = threat.priority
|
||||
ecm.params['freq'] = threat.freq
|
||||
var width = threat.width * 1.5
|
||||
if width < settings.WIDTH_MIN:
|
||||
width = settings.WIDTH_MIN
|
||||
ecm.params['width'] = width
|
||||
check_width(ecm.params)
|
||||
if (threat.rkrp != '') and threat.fflags.rkrp and auto_enabled:
|
||||
var krp = get_krp(threat)
|
||||
if krp != '':
|
||||
@@ -619,12 +613,11 @@ func set_rparams(threat: threats.Threat, params: Dictionary):
|
||||
params['freq'] = threat.rparams['freq']
|
||||
else:
|
||||
params['freq'] = threat.freq
|
||||
if threat.rparams.has('period'):
|
||||
params['period'] = threat.rparams['period']
|
||||
if threat.rparams.has('width'):
|
||||
params['width'] = threat.rparams['width']
|
||||
params['width'] = threat.rparams['width'] * 1.5
|
||||
else:
|
||||
params['width'] = threat.width * 1.5
|
||||
check_width(params)
|
||||
if threat.rparams.has('filename'):
|
||||
params['filename'] = threat.rparams['filename']
|
||||
|
||||
@@ -695,3 +688,8 @@ func set_th_emit(th: threats.Threat, ecm: Interfer):
|
||||
return
|
||||
else:
|
||||
th.emit_state = 1
|
||||
|
||||
|
||||
func check_width(param: Dictionary):
|
||||
if (param['width'] < settings.WIDTH_MIN): param['width'] = settings.WIDTH_MIN
|
||||
elif (param['width'] > settings.WIDTH_MAX): param['width'] = settings.WIDTH_MAX
|
||||
|
||||
@@ -15,12 +15,25 @@ const PROGRESS_RAY_STATES: float = 50.0
|
||||
const PROGRESS_COMPLETE: float = 100.0
|
||||
|
||||
# Для маппинга (Возможно уберу в будущем, но это не точно)
|
||||
# Константы для работы с лучами
|
||||
const RAY_MASK = 0x07
|
||||
const SPECIAL_LITERAS = [3, 5, 7]
|
||||
const RAY_m5: String = "RAY_m5"
|
||||
const RAY_5: String = "RAY_5"
|
||||
const RAY_15: String = "RAY_15"
|
||||
const RAY_25: String = "RAY_25"
|
||||
const RAY_35: String = "RAY_35"
|
||||
const RAY_45: String = "RAY_45"
|
||||
# Маппинг значений лучей на состояния и названия
|
||||
const RAY_CONFIG = {
|
||||
0: { "state": "UG_SET_RAY_0", "name": "-5°", "delay": 0.5, "requires_si_fs": true },
|
||||
1: { "state": "UG_SET_RAY_1", "name": "5°", "delay": 0.0, "requires_si_fs": false },
|
||||
2: { "state": "UG_SET_RAY_2", "name": "15°", "delay": 0.0, "requires_si_fs": false },
|
||||
3: { "state": "UG_SET_RAY_3", "name": "25°", "delay": 0.0, "requires_si_fs": false },
|
||||
4: { "state": "UG_SET_RAY_4", "name": "35°", "delay": 0.0, "requires_si_fs": false },
|
||||
5: { "state": "UG_SET_RAY_5", "name": "45°", "delay": 0.0, "requires_si_fs": false },
|
||||
6: { "state": "UG_SET_RAY_0", "name": "сброс", "delay": 0.0, "requires_si_fs": false } # Особый случай
|
||||
}
|
||||
|
||||
const RAY_TYPES := [RAY_m5, RAY_5, RAY_15, RAY_25, RAY_35, RAY_45]
|
||||
enum STATE_MACHINE {
|
||||
@@ -64,6 +77,7 @@ var ems_input_bits_config: Dictionary
|
||||
var fs_rules: Array
|
||||
|
||||
var _ray_state_mapping: Dictionary
|
||||
var _ray_state_enums: Dictionary = {}
|
||||
# Переменные класса
|
||||
var constants: Dictionary
|
||||
var pribor_config: Dictionary
|
||||
@@ -134,6 +148,7 @@ func _ready() -> void:
|
||||
_determine_self_name()
|
||||
initialize_connections()
|
||||
setup_timer()
|
||||
_initialize_ray_state_enums()
|
||||
|
||||
|
||||
func _get_ray_key(machine_state: int) -> String:
|
||||
@@ -288,7 +303,7 @@ func on_fs_update_state(packet_type_7: Dictionary, fs_mapping: Dictionary) -> vo
|
||||
flag_fs_status_ok = control_results[fs_key] == 1
|
||||
|
||||
|
||||
##
|
||||
# Обновленная машина состояний
|
||||
func state_control_machine() -> void:
|
||||
match state:
|
||||
STATE_MACHINE.INIT:
|
||||
@@ -321,66 +336,42 @@ func state_control_machine() -> void:
|
||||
_handle_read_isa(unit_prd, [constants.ADDR_UG_LITERA_1, constants.ADDR_UG_LITERA_2, constants.ADDR_UG_LITERA_3], cmd_array)
|
||||
flag_write_isa = false
|
||||
state = STATE_MACHINE.UG_SET_RAY
|
||||
|
||||
# Упрощенные состояния лучей
|
||||
STATE_MACHINE.UG_SET_RAY:
|
||||
var addr: int = constants.ADDR_UG_LITERA_1
|
||||
if current_litera == 3 or current_litera == 5 or current_litera == 7:
|
||||
addr = constants.ADDR_UG_LITERA_2
|
||||
if unit_prd.isa_ports.has(addr) and (unit_prd.cmd_state == unit_prd.CmdState.DONE):
|
||||
if unit_prd.isa_ports[addr] & 0x07 == 0:
|
||||
state = STATE_MACHINE.UG_SET_RAY_1
|
||||
elif unit_prd.isa_ports[addr] & 0x07 == 1:
|
||||
state = STATE_MACHINE.UG_SET_RAY_2
|
||||
elif unit_prd.isa_ports[addr] & 0x07 == 2:
|
||||
state = STATE_MACHINE.UG_SET_RAY_3
|
||||
elif unit_prd.isa_ports[addr] & 0x07 == 3:
|
||||
state = STATE_MACHINE.UG_SET_RAY_4
|
||||
elif unit_prd.isa_ports[addr] & 0x07 == 4:
|
||||
state = STATE_MACHINE.UG_SET_RAY_5
|
||||
elif unit_prd.isa_ports[addr] & 0x07 == 5:
|
||||
if not current_litera == 1:
|
||||
control_results = check_dou_result(control_results, power_for_litera, self_name, current_litera, constants)
|
||||
state = STATE_MACHINE.IN_EMS_STOP
|
||||
elif unit_prd.isa_ports[addr] & 0x07 == 6:
|
||||
state = STATE_MACHINE.UG_SET_RAY_0
|
||||
if current_litera == 1:
|
||||
state = STATE_MACHINE.UG_SET_RAY_5
|
||||
|
||||
_handle_ray_operation() # Режим чтения
|
||||
|
||||
STATE_MACHINE.UG_SET_RAY_0:
|
||||
if flag_si_fs_input and not flag_write_isa:
|
||||
control_timer.stop()
|
||||
_handle_ug_set_state(0x0)
|
||||
await get_tree().create_timer(0.5).timeout
|
||||
state = STATE_MACHINE.READ_ISA
|
||||
_handle_ray_operation(0)
|
||||
|
||||
STATE_MACHINE.UG_SET_RAY_1:
|
||||
if not flag_write_isa:
|
||||
_handle_ug_set_state(0x1)
|
||||
state = STATE_MACHINE.READ_ISA
|
||||
_handle_ray_operation(1)
|
||||
|
||||
STATE_MACHINE.UG_SET_RAY_2:
|
||||
if not flag_write_isa:
|
||||
_handle_ug_set_state(0x2)
|
||||
state = STATE_MACHINE.READ_ISA
|
||||
_handle_ray_operation(2)
|
||||
|
||||
STATE_MACHINE.UG_SET_RAY_3:
|
||||
if not flag_write_isa:
|
||||
_handle_ug_set_state(0x3)
|
||||
state = STATE_MACHINE.READ_ISA
|
||||
_handle_ray_operation(3)
|
||||
|
||||
STATE_MACHINE.UG_SET_RAY_4:
|
||||
if not flag_write_isa:
|
||||
_handle_ug_set_state(0x4)
|
||||
state = STATE_MACHINE.READ_ISA
|
||||
_handle_ray_operation(4)
|
||||
|
||||
STATE_MACHINE.UG_SET_RAY_5:
|
||||
if not flag_write_isa:
|
||||
_handle_ug_set_state(0x5)
|
||||
state = STATE_MACHINE.READ_ISA
|
||||
_handle_ray_operation(5)
|
||||
|
||||
STATE_MACHINE.IN_EMS_STOP:
|
||||
ems_6666_timer.stop()
|
||||
state = STATE_MACHINE.FS_TURN_OFF
|
||||
|
||||
STATE_MACHINE.FS_TURN_OFF:
|
||||
ems_6666_timer.stop()
|
||||
_handle_fs_turn_off_state()
|
||||
state = STATE_MACHINE.STOP_CONTROL
|
||||
|
||||
STATE_MACHINE.STOP_CONTROL:
|
||||
_handle_stop_control_state()
|
||||
## В машине состояний вызов изменения состояния прогресс бара контроля
|
||||
|
||||
# Обновление прогресс-бара
|
||||
if block_kasseta_y5_config['yau07'] or flag_no_trust_yau07:
|
||||
progressbar_status()
|
||||
|
||||
@@ -456,9 +447,8 @@ func _handle_ug_set_state(RAY_DOU_NUM: int) -> void:
|
||||
flag_write_isa = on_ug_setting(unit_prd, dic_att, cmd_array)
|
||||
|
||||
|
||||
|
||||
|
||||
## Функция для продвижения статуса прогресс бара
|
||||
# Обновленный прогресс-бар с учетом новой структуры
|
||||
func progressbar_status() -> void:
|
||||
if current_litera == 0:
|
||||
progress_value = PROGRESS_COMPLETE
|
||||
@@ -466,7 +456,6 @@ func progressbar_status() -> void:
|
||||
progress_value = 0
|
||||
return
|
||||
|
||||
# Базовый прогресс в зависимости от состояния
|
||||
var base_progress: float = 0.0
|
||||
|
||||
match state:
|
||||
@@ -484,16 +473,10 @@ func progressbar_status() -> void:
|
||||
base_progress = PROGRESS_READ_ISA
|
||||
STATE_MACHINE.UG_SET_RAY:
|
||||
base_progress = PROGRESS_UG_SET_RAY
|
||||
STATE_MACHINE.UG_SET_RAY_0, STATE_MACHINE.UG_SET_RAY_1:
|
||||
STATE_MACHINE.UG_SET_RAY_0, STATE_MACHINE.UG_SET_RAY_1, STATE_MACHINE.UG_SET_RAY_2, \
|
||||
STATE_MACHINE.UG_SET_RAY_3, STATE_MACHINE.UG_SET_RAY_4, STATE_MACHINE.UG_SET_RAY_5:
|
||||
# Для всех состояний лучей используем одинаковый прогресс
|
||||
base_progress = PROGRESS_RAY_STATES
|
||||
STATE_MACHINE.UG_SET_RAY_2:
|
||||
base_progress = PROGRESS_RAY_STATES + 10.0
|
||||
STATE_MACHINE.UG_SET_RAY_3:
|
||||
base_progress = PROGRESS_RAY_STATES + 20.0
|
||||
STATE_MACHINE.UG_SET_RAY_4:
|
||||
base_progress = PROGRESS_RAY_STATES + 30.0
|
||||
STATE_MACHINE.UG_SET_RAY_5:
|
||||
base_progress = PROGRESS_RAY_STATES + 40.0
|
||||
STATE_MACHINE.IN_EMS_STOP, STATE_MACHINE.FS_TURN_OFF, STATE_MACHINE.STOP_CONTROL:
|
||||
base_progress = PROGRESS_COMPLETE
|
||||
|
||||
@@ -502,11 +485,21 @@ func progressbar_status() -> void:
|
||||
var timer_progress = (control_timer.wait_time - control_timer.time_left) / control_timer.wait_time
|
||||
base_progress = lerp(base_progress - 5.0, base_progress, timer_progress)
|
||||
|
||||
# Учитываем прогресс по лучам внутри UG_SET_RAY состояния
|
||||
if state == STATE_MACHINE.UG_SET_RAY:
|
||||
var addr: int = _get_ug_address()
|
||||
if _can_process_ray_state(addr):
|
||||
var ray_value = unit_prd.isa_ports[addr] & RAY_MASK
|
||||
# Используем маппинг из RAY_CONFIG для более точного прогресса
|
||||
var max_ray_value = 5.0 # максимальное значение луча для прогресса
|
||||
var ray_progress = float(ray_value) / max_ray_value * 40.0
|
||||
base_progress += ray_progress
|
||||
|
||||
# Распределяем прогресс по ФС
|
||||
if total_fs_to_check > 0:
|
||||
var progress_per_fs = PROGRESS_COMPLETE / total_fs_to_check
|
||||
current_fs_progress = base_progress
|
||||
progress_value = (completed_fs_count * progress_per_fs) + (current_fs_progress * progress_per_fs / PROGRESS_COMPLETE)
|
||||
var progress_per_fs = (PROGRESS_COMPLETE - PROGRESS_INIT) / total_fs_to_check
|
||||
var fs_base_progress = completed_fs_count * progress_per_fs
|
||||
progress_value = fs_base_progress + (base_progress * progress_per_fs / PROGRESS_COMPLETE)
|
||||
else:
|
||||
progress_value = base_progress
|
||||
|
||||
@@ -562,6 +555,13 @@ func initialize_connections() -> void:
|
||||
signaller.connect('режим_контроль', Callable(self, 'on_mode_changed').bind(true))
|
||||
|
||||
|
||||
# Инициализация маппинга имен состояний в enum значения
|
||||
func _initialize_ray_state_enums() -> void:
|
||||
for ray_value in RAY_CONFIG:
|
||||
var state_name = RAY_CONFIG[ray_value].state
|
||||
_ray_state_enums[state_name] = STATE_MACHINE.get(state_name)
|
||||
|
||||
|
||||
func on_interfer_resized(ecms_dic: Dictionary) -> void:
|
||||
ecms = ecms_dic
|
||||
|
||||
@@ -635,6 +635,11 @@ func _get_device_type() -> String:
|
||||
return ''
|
||||
|
||||
|
||||
# Получение адреса UG для текущей литеры
|
||||
func _get_ug_address() -> int:
|
||||
return constants.ADDR_UG_LITERA_2 if current_litera in SPECIAL_LITERAS else constants.ADDR_UG_LITERA_1
|
||||
|
||||
|
||||
## Настройка таймеров
|
||||
func setup_timer() -> void:
|
||||
add_child(control_timer)
|
||||
@@ -671,6 +676,75 @@ func on_stop_control() -> void:
|
||||
state = STATE_MACHINE.FS_TURN_OFF
|
||||
|
||||
|
||||
# Обработка значения луча из UG_SET_RAY состояния
|
||||
func _process_ray_value(ray_value: int) -> void:
|
||||
match ray_value:
|
||||
0, 1, 2, 3, 4:
|
||||
var next_ray = ray_value + 1
|
||||
if next_ray in RAY_CONFIG: # ← Добавить проверку
|
||||
state = _ray_state_enums[RAY_CONFIG[next_ray].state]
|
||||
5:
|
||||
if not current_litera == 1:
|
||||
control_results = check_dou_result(control_results, power_for_litera, self_name, current_litera, constants)
|
||||
state = STATE_MACHINE.IN_EMS_STOP
|
||||
6:
|
||||
state = STATE_MACHINE.UG_SET_RAY_0
|
||||
if current_litera == 1:
|
||||
state = STATE_MACHINE.UG_SET_RAY_5
|
||||
|
||||
|
||||
# Универсальный обработчик для всех операций с лучами
|
||||
func _handle_ray_operation(ray_num: int = -1) -> void:
|
||||
if ray_num == -1:
|
||||
# Режим чтения - определение текущего луча
|
||||
_handle_ray_read_mode()
|
||||
else:
|
||||
# Режим записи - установка конкретного луча
|
||||
_handle_ray_write_mode(ray_num)
|
||||
|
||||
|
||||
# Обработка чтения состояния луча
|
||||
func _handle_ray_read_mode() -> void:
|
||||
var addr: int = _get_ug_address()
|
||||
if not _can_process_ray_state(addr):
|
||||
return
|
||||
var ray_value = unit_prd.isa_ports[addr] & RAY_MASK
|
||||
_process_ray_value(ray_value)
|
||||
|
||||
|
||||
# Проверка возможности обработки состояния луча
|
||||
func _can_process_ray_state(addr: int) -> bool:
|
||||
return unit_prd.isa_ports.has(addr) and (unit_prd.cmd_state == unit_prd.CmdState.DONE)
|
||||
|
||||
|
||||
# Обработка записи состояния луча
|
||||
func _handle_ray_write_mode(ray_num: int) -> void:
|
||||
if not _can_write_ray(ray_num):
|
||||
return
|
||||
var ray_config = RAY_CONFIG[ray_num]
|
||||
# Особые условия для луча 0
|
||||
if ray_num == 0:
|
||||
control_timer.stop()
|
||||
# Задержка если требуется
|
||||
if ray_config.delay > 0:
|
||||
await get_tree().create_timer(ray_config.delay).timeout
|
||||
# Установка луча
|
||||
_handle_ug_set_state(ray_num)
|
||||
flag_write_isa = true
|
||||
state = STATE_MACHINE.READ_ISA
|
||||
|
||||
|
||||
# Проверка возможности записи луча
|
||||
func _can_write_ray(ray_num: int) -> bool:
|
||||
if flag_write_isa:
|
||||
return false
|
||||
var ray_config = RAY_CONFIG[ray_num]
|
||||
# Для луча 0 требуется flag_si_fs_input, для остальных - нет
|
||||
if ray_num == 0:
|
||||
return ray_config.requires_si_fs and flag_si_fs_input
|
||||
return true
|
||||
|
||||
|
||||
## Срабатывает при выходе или входе в режим контроль
|
||||
func on_mode_changed(in_tree: bool) -> void:
|
||||
flag_in_control = in_tree
|
||||
@@ -694,7 +768,6 @@ func _process_dkm_status(status: PackedByteArray) -> void:
|
||||
var dkm_bit = _get_dkm_bit_for_current_fs(current_litera, constants)
|
||||
if dkm_bit == 0:
|
||||
control_results['dkm_1'] = check_dkm(status, dkm_bit)
|
||||
|
||||
var addr: int = constants.ADDR_UG_LITERA_1
|
||||
if current_litera == 3 or current_litera == 5 or current_litera == 7:
|
||||
addr = constants.ADDR_UG_LITERA_2
|
||||
@@ -1047,15 +1120,7 @@ func get_current_status() -> String:
|
||||
|
||||
|
||||
func _get_ray_name(ray_num: int) -> String:
|
||||
match ray_num:
|
||||
0: return "-5°"
|
||||
1: return "5°"
|
||||
2: return "15°"
|
||||
3: return "25°"
|
||||
4: return "35°"
|
||||
5: return "45°"
|
||||
6: return "ДКМ"
|
||||
_: return "неизвестный угол"
|
||||
return RAY_CONFIG.get(ray_num, {}).get("name", "неизвестный угол")
|
||||
|
||||
|
||||
# Геттер для результатов контроля
|
||||
|
||||
@@ -7,6 +7,9 @@ code = "shader_type canvas_item;
|
||||
|
||||
#define RADIUS_INNER_0 200.0 /* Радиус внутренний для режима приоритет РТО */
|
||||
#define RADIUS_INNER_1 480.0 /* Радиус внутренний для режима приоритет РЛС */
|
||||
#define ANTENAS_COUNT 28 /* Количество антенн */
|
||||
#define ANT_BAND_READY 1U /* Антенна (модуль ФС) готова или исправна */
|
||||
#define ANT_BAND_FAILED 0U /* Антенна (модуль ФС) не исправно */
|
||||
|
||||
uniform vec2 pc0 = vec2(560, 560); /* Центр сетки антенн */
|
||||
uniform float rotation: hint_range(0.0, 360.0) = 0.0; /* */
|
||||
@@ -14,9 +17,13 @@ uniform vec4 color0: source_color = vec4(0.38, 0.47, 0.51, 0.4);
|
||||
uniform vec4 color1: source_color = vec4(0.39, 0.44, 0.50, 0.4);
|
||||
uniform float radius_inner_0 = RADIUS_INNER_0;
|
||||
uniform float radius_inner_1 = RADIUS_INNER_1;
|
||||
uniform float radius_outter = 550.0; /* Радиус внешний. Должно быть равно ant_band_r1_6 */
|
||||
uniform float radius_outter = 550.0; /* Радиус внешний. Должно быть равно ant_band_r1_6 */
|
||||
uniform float alpha: hint_range(0.0, 1.0) = 0.5;
|
||||
uniform int mode = 0; /* Режим отображения. Приоритет РТО - 0, приоритет РЛС - 1 */
|
||||
uniform int mode = 0; /* Режим отображения. Приоритет РТО - 0, приоритет РЛС - 1 */
|
||||
uniform float ffr: hint_range(0.0, 1.0) = 0.2; /* Индикация неисправности модулей ФС. Заметность штриховки. */
|
||||
uniform float sfr: hint_range(0.0, 10.0) = 0.0; /* Индикация неисправности модулей ФС. Скорость движения штрховки */
|
||||
uniform float afr: hint_range(0.0, 180.0) = 0.0; /* Индикация неисправности модулей ФС. Наклон штрховки */
|
||||
uniform float pfr: hint_range(1.0, 20.0) = 10.0; /* Индикация неисправности модулей ФС. Частота штриховки */
|
||||
|
||||
const int ant_band_count_0 = 2;
|
||||
const int ant_band_count_1 = 2;
|
||||
@@ -42,7 +49,8 @@ const float ant_band_r1_4[] = {450.0, 530.0};
|
||||
const float ant_band_r1_5[] = {500.0, 540.0};
|
||||
const float ant_band_r1_6[] = {550.0, 550.0};
|
||||
|
||||
uniform vec4 ant_band_c[28];
|
||||
uniform vec4 ant_band_c[ANTENAS_COUNT];
|
||||
uniform uint ant_band_m[ANTENAS_COUNT];
|
||||
const float d4 = 90.0;
|
||||
const float ds = 1.0;
|
||||
|
||||
@@ -79,6 +87,12 @@ void antenas(inout vec4 c, vec2 uv, vec2 p0, int cnt, float r0, float r1, inout
|
||||
col.rgb = ant_band_c[j].rgb;
|
||||
index++;
|
||||
col.a = alpha + (random_timed(uv) - 0.5f) * ant_band_c[j].a;
|
||||
if (ant_band_m[j] == ANT_BAND_FAILED)
|
||||
{
|
||||
vec2 uvr = uv;
|
||||
rotate_vec2(uvr, radians(afr), pc0);
|
||||
col.a *= (1.0 - ffr) + tanh(10.0 * sin(TIME * sfr + 2.0 * PI * uvr.x / pfr)) * ffr;
|
||||
}
|
||||
float v = float(i & 1);
|
||||
vec4 color = v * col + (1.0f - v) * col;
|
||||
sector(c, uv, p0, float(i) * da, da, r0, r1, color);
|
||||
@@ -120,4 +134,9 @@ shader_parameter/radius_inner_1 = 480.0
|
||||
shader_parameter/radius_outter = 550.0
|
||||
shader_parameter/alpha = 0.5
|
||||
shader_parameter/mode = 0
|
||||
shader_parameter/ffr = 0.2
|
||||
shader_parameter/sfr = 0.0
|
||||
shader_parameter/afr = 0.0
|
||||
shader_parameter/pfr = 10.0
|
||||
shader_parameter/ant_band_c = PackedVector4Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
shader_parameter/ant_band_m = PackedInt32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
|
||||
|
||||
17
shaders/two-color.gdshader
Normal file
@@ -0,0 +1,17 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform vec3 grey = vec3(0.14, 0.13, 0.13);
|
||||
uniform vec3 orange = vec3(0.95, 0.55, 0.05);
|
||||
uniform float gamma = 2.0;
|
||||
|
||||
vec3 bw_to_2color(vec3 c, vec3 dark, vec3 light)
|
||||
{
|
||||
float l = pow(c.r * 0.2126 + c.g * 0.7152 + c.b * 0.0722, gamma);
|
||||
return mix(light, dark, l);
|
||||
}
|
||||
|
||||
|
||||
void fragment()
|
||||
{
|
||||
COLOR.rgb = bw_to_2color(texture(TEXTURE, UV).rgb, grey, orange);
|
||||
}
|
||||
1
shaders/two-color.gdshader.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://83fx15q1xlid
|
||||
@@ -322,12 +322,12 @@ func _set_row_selected(i_row: int, selected: bool = true) -> void:
|
||||
push_error('нет такого ряда: %d (всего %d рядов)\n' % [i_row, rows_count])
|
||||
return
|
||||
if nodes.has(selector_key) and (not selected):
|
||||
var node = nodes[node_key]
|
||||
var selector = nodes[selector_key]
|
||||
nodes.erase(selector_key)
|
||||
if is_instance_valid(node) and is_instance_valid(selector):
|
||||
if selector.get_parent() == node:
|
||||
node.remove_child(selector)
|
||||
if is_instance_valid(selector):
|
||||
var prnt = selector.get_parent_control()
|
||||
if prnt:
|
||||
prnt.remove_child(selector)
|
||||
selector.queue_free()
|
||||
else:
|
||||
push_warning('обращение к удалённому элементу \"%s\"' % selector_key)
|
||||
|
||||