Merge remote-tracking branch 'sasha/master'

This commit is contained in:
MaD_CaT
2024-11-12 13:44:09 +03:00
10 changed files with 780 additions and 112 deletions

View File

@@ -2,7 +2,7 @@
"""
Драйвер клиента для интерфейса Modbus работающего через последовательный порт.
(приложение | UDP | JSON) <- (этот драйвер клиента) -> (сервер | Serial | Modbus RTU)
(приложение | UDP | JSON) <-> (этот драйвер клиента) <-> (сервер | Serial | Modbus RTU)
"""
import os
@@ -74,6 +74,9 @@ def run_sync_client(udp_addr, udp_port_rx, udp_port_tx, serial_port, serial_baud
if 'data' not in message:
message['data'] = []
if 'unit' not in message:
message['unit'] = unit_num
rc = False
if message['code'] == 'write':
data = message['data']

View File

@@ -14,6 +14,7 @@ config/name="uarep-ctl"
run/main_scene="res://scenes/tabs-switch/tab-switch.tscn"
config/features=PackedStringArray("4.3")
run/flush_stdout_on_print=true
run/max_fps=24
run/low_processor_mode=true
run/delta_smoothing=false
boot_splash/show_image=false
@@ -67,6 +68,7 @@ file_logging/enable_file_logging=true
gdscript/warnings/exclude_addons=false
gdscript/warnings/unassigned_variable=2
gdscript/warnings/unassigned_variable_op_assign=2
gdscript/warnings/unused_signal=0
gdscript/warnings/shadowed_variable=2
gdscript/warnings/shadowed_variable_base_class=2
gdscript/warnings/shadowed_global_identifier=2

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://bs7h65e7bodp3"]
[gd_scene load_steps=17 format=3 uid="uid://bs7h65e7bodp3"]
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="1_6olof"]
[ext_resource type="Script" path="res://scenes/контроль/прибор.gd" id="1_46rp6"]
@@ -6,32 +6,74 @@
[ext_resource type="Script" path="res://scenes/pribor-uyep/spt25-view.gd" id="4_v0lil"]
[ext_resource type="PackedScene" uid="uid://bsixhjfesq6r4" path="res://scenes/pribor-uyep/block-output.tscn" id="5_x74mk"]
[ext_resource type="PackedScene" uid="uid://btpc78gucr57f" path="res://scenes/контроль/элемент-я.tscn" id="6_60xs3"]
[ext_resource type="PackedScene" uid="uid://5c24lfvp72en" path="res://scenes/pribor-uyep/sch3.tscn" id="7_13r50"]
[ext_resource type="Script" path="res://scenes/pribor-uyep/sch3-view.gd" id="8_4t3jv"]
[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="8_8gaqb"]
[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="9_wwljg"]
[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="10_jl4ga"]
[sub_resource type="GDScript" id="GDScript_45hqb"]
script/source = "@tool
extends MarginContainer
func _enter_tree() -> void:
margins = [8, 8, 8, 8]
@export var margins: Array:
set(vals):
add_theme_constant_override('margin_top', vals[0])
add_theme_constant_override('margin_left', vals[1])
add_theme_constant_override('margin_bottom', vals[2])
add_theme_constant_override('margin_right', vals[3])
get:
var vals = [0, 0, 0, 0]
vals[0] = get_theme_constant('margin_top')
vals[1] = get_theme_constant('margin_left')
vals[2] = get_theme_constant('margin_bottom')
vals[3] = get_theme_constant('margin_right')
return vals
"
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xxyaa"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cd4fw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
[node name="pribor_uyep" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_left = 5.0
offset_top = -125.0
offset_right = 5.0
offset_bottom = -125.0
script = ExtResource("1_46rp6")
[node name="ref_G1" type="NinePatchRect" parent="."]
layout_mode = 0
offset_left = 98.0
offset_left = 150.0
offset_top = 184.0
offset_right = 756.0
offset_bottom = 1122.0
offset_right = 750.0
offset_bottom = 930.0
texture = ExtResource("1_6olof")
patch_margin_left = 16
patch_margin_top = 16
patch_margin_right = 16
patch_margin_bottom = 16
metadata/_edit_lock_ = true
[node name="lbl_header" type="Label" parent="."]
layout_mode = 0
offset_left = 100.0
offset_left = 150.0
offset_top = 156.0
offset_right = 750.0
offset_right = 705.0
offset_bottom = 182.0
theme_override_font_sizes/font_size = 22
text = "Контроль исправности прибора УЭП"
@@ -41,10 +83,10 @@ vertical_alignment = 1
[node name="Label" type="Label" parent="."]
self_modulate = Color(0.835294, 0.141176, 0.286275, 1)
layout_mode = 0
offset_left = 145.0
offset_top = 1055.0
offset_right = 675.0
offset_bottom = 1074.0
offset_left = 135.0
offset_top = 1295.0
offset_right = 665.0
offset_bottom = 1314.0
text = "** Позиционные обозначения требуют уточнения **"
horizontal_alignment = 1
vertical_alignment = 1
@@ -52,9 +94,9 @@ vertical_alignment = 1
[node name="spt25_A1" parent="." instance=ExtResource("6_60xs3")]
layout_mode = 0
offset_left = 175.0
offset_top = 275.0
offset_top = 210.0
offset_right = 415.0
offset_bottom = 685.0
offset_bottom = 620.0
script = ExtResource("4_v0lil")
unit_name = "уарэп-спт25-1"
fname = "СПТ-25-230-400"
@@ -85,10 +127,10 @@ offset_bottom = 367.0
[node name="spt25_A2" parent="." instance=ExtResource("6_60xs3")]
layout_mode = 0
offset_left = 440.0
offset_top = 275.0
offset_right = 680.0
offset_bottom = 685.0
offset_left = 480.0
offset_top = 210.0
offset_right = 720.0
offset_bottom = 620.0
script = ExtResource("4_v0lil")
unit_name = "уарэп-спт25-2"
fname = "СПТ-25-230-400"
@@ -117,11 +159,508 @@ offset_top = 275.0
offset_right = 225.0
offset_bottom = 367.0
[node name="sch3" parent="." instance=ExtResource("7_13r50")]
[node name="sch3" type="Control" parent="."]
editor_description = "Элемент замены из ЗИП"
custom_minimum_size = Vector2(32, 32)
layout_mode = 3
anchors_preset = 0
offset_left = 175.0
offset_top = 714.0
offset_right = 680.0
offset_bottom = 929.0
offset_top = 640.0
offset_right = 730.0
offset_bottom = 910.0
script = ExtResource("8_4t3jv")
textures = [ExtResource("8_8gaqb"), ExtResource("9_wwljg"), ExtResource("10_jl4ga")]
unit_name = "уарэп-щ3"
fname = "Щ3"
rname = "A3"
[node name="rect" type="NinePatchRect" parent="sch3"]
layout_mode = 2
offset_right = 555.0
offset_bottom = 270.0
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource("1_6olof")
draw_center = false
region_rect = Rect2(0, 0, 63, 63)
patch_margin_left = 17
patch_margin_top = 17
patch_margin_right = 17
patch_margin_bottom = 15
[node name="margin" type="MarginContainer" parent="sch3"]
layout_mode = 2
offset_left = 10.0
offset_top = 11.0
offset_right = 565.0
offset_bottom = 281.0
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
script = SubResource("GDScript_45hqb")
margins = [8, 8, 8, 8]
[node name="vbox" type="VBoxContainer" parent="sch3/margin"]
layout_mode = 2
[node name="grid" type="GridContainer" parent="sch3/margin/vbox"]
layout_mode = 2
size_flags_vertical = 2
columns = 3
[node name="state" type="TextureRect" parent="sch3/margin/vbox/grid"]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
[node name="fname" type="Label" parent="sch3/margin/vbox/grid"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 6
theme_override_font_sizes/font_size = 17
text = "Щ3"
vertical_alignment = 1
[node name="rname" type="Label" parent="sch3/margin/vbox/grid"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 6
theme_override_font_sizes/font_size = 22
text = "A3"
horizontal_alignment = 2
vertical_alignment = 1
[node name="table" type="GridContainer" parent="sch3/margin/vbox"]
layout_mode = 2
size_flags_vertical = 6
columns = 9
[node name="name0" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "УФ"
[node name="state0" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 0, 2, 0]
[node name="switch0" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name1" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "РТР"
[node name="state1" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 1, 2, 1]
[node name="switch1" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name2" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-Н.1"
[node name="state2" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 2, 2, 2]
[node name="switch2" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name3" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-Н.2"
[node name="state3" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 3, 2, 3]
[node name="switch3" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name4" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-Н.3"
[node name="state4" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 4, 2, 4]
[node name="switch4" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name5" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-Н.4"
[node name="state5" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 5, 2, 5]
[node name="switch5" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name6" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-В.1"
[node name="state6" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 6, 2, 6]
[node name="switch6" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name7" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-В.2"
[node name="state7" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 7, 2, 7]
[node name="switch7" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name8" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-В.3"
[node name="state8" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 8, 2, 8]
[node name="switch8" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name9" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-В.4"
[node name="state9" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 9, 2, 9]
[node name="switch9" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name10" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-К.1"
[node name="state10" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 10, 2, 10]
[node name="switch10" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name11" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-К.2"
[node name="state11" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [0, 11, 2, 11]
[node name="switch11" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name12" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-К.3"
[node name="state12" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [1, 0, 3, 0]
[node name="switch12" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name13" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-К.4"
[node name="state13" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [1, 1, 3, 1]
[node name="switch13" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name14" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Бл. по вент."
[node name="state14" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [1, 2, 3, 2]
[node name="switch14" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name15" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ДУ"
[node name="state15" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [1, 3, 3, 3]
[node name="switch15" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
disabled = true
button_pressed = true
action_mode = 0
[node name="name16" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. РТР"
[node name="state16" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [1, 7, 3, 7]
[node name="switch16" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
disabled = true
button_pressed = true
action_mode = 0
[node name="name17" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. ПРД.1"
[node name="state17" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [1, 8, 3, 8]
[node name="switch17" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
disabled = true
button_pressed = true
action_mode = 0
[node name="name18" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. ПРД.2"
[node name="state18" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [1, 9, 3, 9]
[node name="switch18" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
disabled = true
button_pressed = true
action_mode = 0
[node name="name19" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. ПРД.3"
[node name="state19" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [1, 10, 3, 10]
[node name="switch19" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
disabled = true
button_pressed = true
action_mode = 0
[node name="name20" type="Label" parent="sch3/margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. ПРД.4"
[node name="state20" type="TextureRect" parent="sch3/margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
texture = ExtResource("8_8gaqb")
expand_mode = 1
metadata/bits = [1, 11, 3, 11]
[node name="switch20" type="CheckButton" parent="sch3/margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
disabled = true
button_pressed = true
action_mode = 0
[node name="button" type="Button" parent="sch3"]
layout_mode = 2
offset_right = 555.0
offset_bottom = 270.0
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
theme_override_styles/hover = SubResource("StyleBoxEmpty_xxyaa")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_cd4fw")
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
[connection signal="resized" from="sch3" to="sch3" method="_on_resized"]
[connection signal="pressed" from="sch3/button" to="sch3" method="_on_button_pressed"]

View File

@@ -17,7 +17,7 @@ func _exit_tree() -> void:
if Engine.is_editor_hint(): return
var unit_key = settings.get_unit_key(unit_name)
var unit = network.units[unit_key]
unit.disconnect('responce_received', Callable(self, 'responce_received'))
unit.disconnect('responce_received', Callable(self, 'on_responce_received'))
func on_line_changed(_unit):
@@ -27,7 +27,6 @@ func on_line_changed(_unit):
func on_responce_received(addr: int, data: PackedByteArray):
print_debug([addr, data])
if (addr != 0) or (data.size() != 4):
return
var items = get_tree().get_nodes_in_group('bits_items')

View File

@@ -33,33 +33,33 @@ func _enter_tree() -> void:
"
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xxyaa"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cd4fw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
[node name="sch3" type="Control"]
editor_description = "Элемент замены из ЗИП"
custom_minimum_size = Vector2(32, 32)
layout_mode = 3
anchors_preset = 0
offset_left = 125.0
offset_left = 75.0
offset_top = 635.0
offset_right = 635.0
offset_bottom = 865.0
offset_right = 795.0
offset_bottom = 930.0
script = ExtResource("1_mb0l2")
textures = [ExtResource("2_qglal"), ExtResource("3_gqvwf"), ExtResource("4_2lj00")]
unit_name = "уарэп-щ3"
[node name="rect" type="NinePatchRect" parent="."]
layout_mode = 2
offset_right = 510.0
offset_bottom = 230.0
offset_right = 720.0
offset_bottom = 295.0
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource("5_eanbw")
@@ -72,8 +72,10 @@ patch_margin_bottom = 15
[node name="margin" type="MarginContainer" parent="."]
layout_mode = 2
offset_right = 510.0
offset_bottom = 230.0
offset_left = 10.0
offset_top = 11.0
offset_right = 730.0
offset_bottom = 306.0
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
@@ -114,7 +116,13 @@ vertical_alignment = 1
[node name="table" type="GridContainer" parent="margin/vbox"]
layout_mode = 2
size_flags_vertical = 6
columns = 8
columns = 9
[node name="name0" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "УФ"
[node name="state0" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -125,11 +133,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 0, 2, 0]
[node name="name0" type="Label" parent="margin/vbox/table"]
[node name="switch0" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name1" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "УФ"
text = "РТР"
[node name="state1" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -140,11 +153,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 1, 2, 1]
[node name="name1" type="Label" parent="margin/vbox/table"]
[node name="switch1" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name2" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "РТР"
text = "ПРД-Н.1"
[node name="state2" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -153,11 +171,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 2, 2, 2]
[node name="name2" type="Label" parent="margin/vbox/table"]
[node name="switch2" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name3" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-Н.1"
text = "ПРД-Н.2"
[node name="state3" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -168,11 +191,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 3, 2, 3]
[node name="name3" type="Label" parent="margin/vbox/table"]
[node name="switch3" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name4" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-Н.2"
text = "ПРД-Н.3"
[node name="state4" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -183,11 +211,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 4, 2, 4]
[node name="name4" type="Label" parent="margin/vbox/table"]
[node name="switch4" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name5" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-Н.3"
text = "ПРД-Н.4"
[node name="state5" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -196,11 +229,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 5, 2, 5]
[node name="name5" type="Label" parent="margin/vbox/table"]
[node name="switch5" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name6" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-Н.4"
text = "ПРД-В.1"
[node name="state6" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -211,11 +249,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 6, 2, 6]
[node name="name6" type="Label" parent="margin/vbox/table"]
[node name="switch6" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name7" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-В.1"
text = "ПРД-В.2"
[node name="state7" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -226,11 +269,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 7, 2, 7]
[node name="name7" type="Label" parent="margin/vbox/table"]
[node name="switch7" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name8" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-В.2"
text = "ПРД-В.3"
[node name="state8" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -239,11 +287,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 8, 2, 8]
[node name="name8" type="Label" parent="margin/vbox/table"]
[node name="switch8" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name9" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-В.3"
text = "ПРД-В.4"
[node name="state9" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -254,11 +307,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 9, 2, 9]
[node name="name9" type="Label" parent="margin/vbox/table"]
[node name="switch9" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name10" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-В.4"
text = "ПРД-К.1"
[node name="state10" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -269,11 +327,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 10, 2, 10]
[node name="name10" type="Label" parent="margin/vbox/table"]
[node name="switch10" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name11" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-К.1"
text = "ПРД-К.2"
[node name="state11" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -282,11 +345,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [0, 11, 2, 11]
[node name="name11" type="Label" parent="margin/vbox/table"]
[node name="switch11" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name12" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-К.2"
text = "ПРД-К.3"
[node name="state12" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -297,11 +365,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [1, 0, 3, 0]
[node name="name12" type="Label" parent="margin/vbox/table"]
[node name="switch12" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name13" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-К.3"
text = "ПРД-К.4"
[node name="state13" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -310,11 +383,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [1, 1, 3, 1]
[node name="name13" type="Label" parent="margin/vbox/table"]
[node name="switch13" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
action_mode = 0
[node name="name14" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ПРД-К.4"
text = "Бл. по вент."
[node name="state14" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -325,11 +403,16 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [1, 2, 3, 2]
[node name="name14" type="Label" parent="margin/vbox/table"]
[node name="switch14" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
action_mode = 0
[node name="name15" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Бл. по вент."
text = "ДУ"
[node name="state15" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -340,11 +423,18 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [1, 3, 3, 3]
[node name="name15" type="Label" parent="margin/vbox/table"]
[node name="switch15" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
disabled = true
button_pressed = true
action_mode = 0
[node name="name16" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "ДУ"
text = "Вент. РТР"
[node name="state16" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -353,11 +443,18 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [1, 7, 3, 7]
[node name="name16" type="Label" parent="margin/vbox/table"]
[node name="switch16" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
disabled = true
button_pressed = true
action_mode = 0
[node name="name17" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. РТР"
text = "Вент. ПРД.1"
[node name="state17" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -368,11 +465,18 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [1, 8, 3, 8]
[node name="name17" type="Label" parent="margin/vbox/table"]
[node name="switch17" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
disabled = true
button_pressed = true
action_mode = 0
[node name="name18" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. ПРД.1"
text = "Вент. ПРД.2"
[node name="state18" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -381,11 +485,18 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [1, 9, 3, 9]
[node name="name18" type="Label" parent="margin/vbox/table"]
[node name="switch18" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 2
disabled = true
button_pressed = true
action_mode = 0
[node name="name19" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. ПРД.2"
text = "Вент. ПРД.3"
[node name="state19" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -394,11 +505,18 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [1, 10, 3, 10]
[node name="name19" type="Label" parent="margin/vbox/table"]
[node name="switch19" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
size_flags_horizontal = 0
disabled = true
button_pressed = true
action_mode = 0
[node name="name20" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. ПРД.3"
text = "Вент. ПРД.4"
[node name="state20" type="TextureRect" parent="margin/vbox/table" groups=["bits_items"]]
custom_minimum_size = Vector2(24, 24)
@@ -407,21 +525,24 @@ texture = ExtResource("2_qglal")
expand_mode = 1
metadata/bits = [1, 11, 3, 11]
[node name="name20" type="Label" parent="margin/vbox/table"]
self_modulate = Color(1, 1, 1, 0.627451)
[node name="switch20" type="CheckButton" parent="margin/vbox/table"]
layout_mode = 2
theme_override_font_sizes/font_size = 17
text = "Вент. ПРД.4"
size_flags_horizontal = 2
disabled = true
button_pressed = true
action_mode = 0
[node name="button" type="Button" parent="."]
layout_mode = 2
offset_right = 510.0
offset_bottom = 230.0
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
offset_left = 18.0
offset_top = 19.0
offset_right = 738.0
offset_bottom = 314.0
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
theme_override_styles/hover = SubResource("StyleBoxEmpty_xxyaa")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_cd4fw")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
[connection signal="resized" from="." to="." method="_on_resized"]
[connection signal="pressed" from="button" to="." method="_on_button_pressed"]

View File

@@ -70,15 +70,15 @@ func _enter_tree() -> void:
"
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xxyaa"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cd4fw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
[node name="yelement_g" type="PanelContainer"]
editor_description = "Элемент замены из ЗИП"
@@ -141,10 +141,10 @@ vertical_alignment = 1
[node name="button" type="Button" parent="."]
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
theme_override_styles/hover = SubResource("StyleBoxEmpty_xxyaa")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_cd4fw")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
[connection signal="pressed" from="button" to="." method="_on_button_pressed"]

View File

@@ -70,15 +70,15 @@ func _enter_tree() -> void:
"
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xxyaa"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cd4fw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
[node name="yelement_empty" type="PanelContainer"]
editor_description = "Элемент замены из ЗИП"
@@ -125,10 +125,10 @@ vertical_alignment = 1
[node name="button" type="Button" parent="."]
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
theme_override_styles/hover = SubResource("StyleBoxEmpty_xxyaa")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_cd4fw")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
[connection signal="pressed" from="button" to="." method="_on_button_pressed"]

View File

@@ -22,24 +22,28 @@ func _on_button_pressed():
@export var state: int:
set(v):
state = tools.clip_value(v, 0, textures.size() - 1)
$margin/vbox/grid/state.texture = textures[v]
if is_inside_tree():
$margin/vbox/grid/state.texture = textures[v]
@export var fname: String:
set(v):
fname = v
$margin/vbox/grid/fname.text = v
if is_inside_tree():
$margin/vbox/grid/fname.text = v
@export var rname: String:
set(v):
rname = v
$margin/vbox/grid/rname.text = v
if is_inside_tree():
$margin/vbox/grid/rname.text = v
@export var alignment: int:
set(v):
$margin/vbox.alignment = v
if is_inside_tree():
$margin/vbox.alignment = v
func _ready() -> void: call_deferred('_on_resized')

View File

@@ -33,15 +33,15 @@ func _enter_tree() -> void:
"
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xxyaa"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cd4fw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_emtms"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_evx06"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ox0yw"]
[node name="yelement_ya" type="Control"]
editor_description = "Элемент замены из ЗИП"
@@ -112,11 +112,11 @@ vertical_alignment = 1
layout_mode = 2
offset_right = 180.0
offset_bottom = 155.0
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
theme_override_styles/hover = SubResource("StyleBoxEmpty_xxyaa")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_cd4fw")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_emtms")
theme_override_styles/focus = SubResource("StyleBoxEmpty_evx06")
theme_override_styles/normal = SubResource("StyleBoxEmpty_ox0yw")
[connection signal="resized" from="." to="." method="_on_resized"]
[connection signal="pressed" from="button" to="." method="_on_button_pressed"]

View File

@@ -14,7 +14,7 @@ class Sch3 extends unit.Unit:
}
var unit: = 1 ## Адрес устройства Modbus.
var cmd_state: = CmdState.DONE ## Код текущей команды.
var cmd_state: = CmdState.DONE ## Состояние выполнения текущей команды.
var tick_rx: = 0 ## Время приёма крайнего сообщения.
var tick_tx: = 0 ## Время отправки крайнего сообщения.