Merge remote-tracking branch 'origin/master' into master-prd

This commit is contained in:
Maxim
2025-08-16 11:31:51 +03:00
17 changed files with 610 additions and 78 deletions

View File

@@ -12,7 +12,7 @@ patch_margin_top = 30
patch_margin_right = 15
patch_margin_bottom = 10
script = ExtResource("2_ki0kf")
text = "заголовок"
text = ""
[node name="header" type="Label" parent="."]
clip_contents = true

View File

@@ -1,8 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://8ll27id5ajq1"]
[ext_resource type="Script" uid="uid://d0jwv5opi3mrl" path="res://scenes/pribor-afsp/pribor-afsp.gd" id="1_151rh"]
[ext_resource type="Script" uid="uid://bux47vkw71w1t" path="res://scenes/pribor-afsp/request.gd" id="2_4vyhj"]
[ext_resource type="PackedScene" uid="uid://dnxq870xf6pkh" path="res://scenes/pribor-afsp/bort-afsp.tscn" id="3_d7iti"]
[ext_resource type="Script" uid="uid://bux47vkw71w1t" path="res://scenes/контроль/request.gd" id="2_4vyhj"]
[ext_resource type="PackedScene" uid="uid://dnxq870xf6pkh" path="res://scenes/контроль/bort-afsp.tscn" id="3_d7iti"]
[sub_resource type="GDScript" id="GDScript_yhnwg"]
script/source = "extends Timer

View File

@@ -1,8 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://5uv1idl3lqet"]
[ext_resource type="Script" uid="uid://d0jwv5opi3mrl" path="res://scenes/pribor-afsp/pribor-afsp.gd" id="1_tfses"]
[ext_resource type="Script" uid="uid://bux47vkw71w1t" path="res://scenes/pribor-afsp/request.gd" id="2_miwrd"]
[ext_resource type="PackedScene" uid="uid://dnxq870xf6pkh" path="res://scenes/pribor-afsp/bort-afsp.tscn" id="3_xpxb5"]
[ext_resource type="Script" uid="uid://bux47vkw71w1t" path="res://scenes/контроль/request.gd" id="2_miwrd"]
[ext_resource type="PackedScene" uid="uid://dnxq870xf6pkh" path="res://scenes/контроль/bort-afsp.tscn" id="3_xpxb5"]
[sub_resource type="GDScript" id="GDScript_yhnwg"]
script/source = "extends Timer

View File

@@ -1,9 +1,10 @@
@tool
class_name pribor_afsp extends 'res://scenes/контроль/прибор.gd'
@export var prefix_path: String = 'DeviceDescripton[DeviceName]'
static var json_conv: JSON = JSON.new()
static var node_maper = load('res://scenes/pribor-afsp/node-maper.gd')
static var node_maper = load('res://scenes/контроль/node-maper.gd')
func _on_request_completed(result, _response_code, headers, body: PackedByteArray):
if result != 0:

View File

@@ -4,7 +4,7 @@ class_name pribor_rtr extends 'res://scenes/контроль/прибор.gd'
@export var prefix_path: String = 'DeviceDescripton[DeviceName]'
static var json_conv: JSON = JSON.new()
static var node_maper = load('res://scenes/pribor-afsp/node-maper.gd')
static var node_maper = load('res://scenes/контроль/node-maper.gd')
const bort_to_node_name = {

View File

@@ -3,7 +3,7 @@
[ext_resource type="Script" uid="uid://d0jwv5opi3mrk" path="res://scenes/pribor-afsp/pribor-bpo.gd" id="1_bhc4e"]
[ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="2_jp6m0"]
[ext_resource type="PackedScene" uid="uid://p2suppildvq0" path="res://scenes/контроль/элемент-в.tscn" id="3_jcpjs"]
[ext_resource type="Script" uid="uid://bux47vkw71w1t" path="res://scenes/pribor-afsp/request.gd" id="4_crej3"]
[ext_resource type="Script" uid="uid://bux47vkw71w1t" path="res://scenes/контроль/request.gd" id="4_crej3"]
[node name="pribor_bpo" type="Control"]
layout_mode = 3

View File

@@ -97,6 +97,11 @@ func _ready() -> void:
func on_state_mashine() -> void:
control_prd_k.state_control_machine()
$um1535_A10.value0 = [10, 20, 30, 40, 50, 60]
$um1535_A11.value0 = [60, 50, 40, 30, 20, 10]
$um1535_A12.set_value0_by_index(5, 100)
$um1535_A13.set_value0_by_index(2, 0)
$um1535_A13.value1 = -20
func initialize_connections() -> void:

View File

@@ -1,9 +1,10 @@
[gd_scene load_steps=15 format=3 uid="uid://m5s87q7m66lj"]
[gd_scene load_steps=16 format=3 uid="uid://m5s87q7m66lj"]
[ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="1_8dmgr"]
[ext_resource type="Script" uid="uid://cwvikiygf8b1m" path="res://scenes/pribor-prd-k/pribor-prd-k.gd" id="1_tpdyp"]
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="2_14h25"]
[ext_resource type="PackedScene" uid="uid://cm5jd4gjrrpba" path="res://scenes/контроль/кассета-у-5-к.tscn" id="2_tb85r"]
[ext_resource type="PackedScene" uid="uid://bcyxqni7gxvtq" path="res://scenes/контроль/блок-в.tscn" id="5_c7lv8"]
[ext_resource type="PackedScene" uid="uid://bkxblfoj7ejv0" path="res://scenes/контроль/блок-а.tscn" id="6_fmhtx"]
[ext_resource type="PackedScene" uid="uid://bmagw8nd0ulhj" path="res://scenes/pribor-prd-k/kasseta-fs-kd.tscn" id="7_ia27q"]
[ext_resource type="Script" uid="uid://crpedygm3gohi" path="res://scenes/контроль/кассета.gd" id="7_xpa2n"]
@@ -113,83 +114,71 @@ text = "Панель
horizontal_alignment = 1
vertical_alignment = 1
[node name="um1535_A10" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="um1535_A10" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 485.0
offset_top = 242.0
offset_right = 652.0
offset_bottom = 337.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "УМ1535Б"
rname = "A10"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A11" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="um1535_A11" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 485.0
offset_top = 337.0
offset_right = 652.0
offset_bottom = 432.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "УМ1535Б"
rname = "A11"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A12" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="um1535_A12" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 485.0
offset_top = 432.0
offset_right = 652.0
offset_bottom = 527.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "УМ1535Б"
rname = "A12"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A13" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="um1535_A13" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 485.0
offset_top = 527.0
offset_right = 652.0
offset_bottom = 622.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "УМ1535Б"
rname = "A13"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A14" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="um1535_A14" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 485.0
offset_top = 622.0
offset_right = 652.0
offset_bottom = 717.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "УМ1535Б"
rname = "A14"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A15" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="um1535_A15" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 485.0
offset_top = 717.0
offset_right = 652.0
offset_bottom = 812.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "УМ1535Б"
rname = "A15"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="utm80_A9" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
layout_mode = 0
@@ -199,88 +188,74 @@ offset_right = 652.0
offset_bottom = 907.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "УТМ80"
rname = "A9"
[node name="um1535_A16" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="rm1620m_A16" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 8.0
offset_top = 242.0
offset_right = 175.0
offset_bottom = 337.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "РМ16-20М"
rname = "A16"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A17" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="rm1620m_A17" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 8.0
offset_top = 337.0
offset_right = 173.0
offset_bottom = 432.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "РМ16-20М"
rname = "A17"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A18" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="rm1620m_A18" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 8.0
offset_top = 432.0
offset_right = 175.0
offset_bottom = 527.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "РМ16-20М"
rname = "A18"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A19" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="rm1620m_A19" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 8.0
offset_top = 527.0
offset_right = 175.0
offset_bottom = 622.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "РМ16-20М"
rname = "A19"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A20" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="rm1620m_A20" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 8.0
offset_top = 622.0
offset_right = 175.0
offset_bottom = 717.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "РМ16-20М"
rname = "A20"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="um1535_A21" parent="." groups=["power_amplifier"] instance=ExtResource("6_fmhtx")]
[node name="rm1620m_A21" parent="." groups=["power_amplifier"] instance=ExtResource("5_c7lv8")]
layout_mode = 0
offset_left = 8.0
offset_top = 717.0
offset_right = 175.0
offset_bottom = 812.0
value_name0 = "°C"
value_name1 = "P, %"
name_min_size0 = Vector2i(35, 20)
name_min_size1 = Vector2i(35, 20)
fname = "РМ16-20М"
rname = "A21"
value0_info = "Мощность, Вт"
value1_info = "Температура,°C"
[node name="kasseta_fs_kd" parent="." instance=ExtResource("7_ia27q")]
layout_mode = 0

View File

@@ -4,7 +4,7 @@ extends Panel
func on_line_changed(unit_inst): log.message(Logger.INFO, '\"%s\" изменение состояния: %s' % [unit_inst.name, 'на связи' if unit_inst.online else 'отключен'])
func on_command_fail(unit_inst): log.message(Logger.ERROR, '\"%s\" команда не выполнена' % unit_inst.name)
func on_threats_changed(th: Object, msg: String): log.message(Logger.INFO, '%s: %s' % [msg, th.to_string()])
func on_parse_error(unit_inst, msg: String): log.message(Logger.ERROR, '%s: %s' % [unit.name, msg])
func on_parse_error(unit_inst, msg: String): log.message(Logger.ERROR, '%s: %s' % [unit_inst.name, msg])
func on_interfer_off(ecm, _ecms, _thrs,msg: String): log.message(Logger.INFO, '%s: %s' % [msg, ecm.to_string()])
func on_set_program_mode(msg: String): log.message(Logger.INFO, msg)

View File

@@ -0,0 +1,551 @@
[gd_scene load_steps=15 format=3 uid="uid://bcyxqni7gxvtq"]
[ext_resource type="Texture2D" uid="uid://c6nve6f8sfyj2" path="res://data/состояние-исправности-0.png" id="1_n1aqt"]
[ext_resource type="Texture2D" uid="uid://dnreyfh3cd1k2" path="res://data/состояние-исправности-1.png" id="2_rim3u"]
[ext_resource type="Texture2D" uid="uid://c6booa8753u5t" path="res://data/состояние-исправности-2.png" id="3_3w8fg"]
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="4_mcviv"]
[ext_resource type="Texture2D" uid="uid://00871pb6moln" path="res://data/прогресс-фон-1.png" id="5_rim3u"]
[ext_resource type="Texture2D" uid="uid://c1k856fxhrjnh" path="res://data/прогресс-заполнение-1.png" id="6_3w8fg"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3nd2u"]
[sub_resource type="GDScript" id="GDScript_oj3k3"]
script/source = "@tool
class_name blok_v extends PanelContainer
@export var textures: Array
signal pressed(control: PanelContainer)
## Значения уровней
@export var value0: Array:
set(v):
value0.assign(v)
var items: Array = get_level_nodes()
var count: int = min(items.size(), v.size())
for i in count:
items[i].value = v[i]
## Значение уровня
@export var value1: float:
set(v):
value1 = v
if not is_inside_tree():
return
$margin/vbox/grid1/level7.value = v
@export var min_value0: float:
set(v):
min_value0 = v
var items: = get_level_nodes()
set_group_param(items, 'min_value', v)
@export var min_value1: float:
set(v):
min_value1 = v
if not is_inside_tree():
return
$margin/vbox/grid1/level7.min_value = v
@export var max_value0: float:
set(v):
max_value0 = v
var items: = get_level_nodes()
set_group_param(items, 'max_value', v)
@export var max_value1: float:
set(v):
max_value1 = v
if not is_inside_tree():
return
$margin/vbox/grid1/level7.max_value = v
@export var step0: float:
set(v):
step0 = v
var items: = get_level_nodes()
set_group_param(items, 'step', v)
@export var step1: float:
set(v):
step1 = v
if not is_inside_tree():
return
$margin/vbox/grid1/level7.step = v
@export var value_name0: String:
set(v):
value_name0 = v
var items: Array = get_name_nodes()
set_group_param(items, 'text', v)
@export var value_name1: String:
set(v):
value_name1 = v
if not is_inside_tree():
return
$margin/vbox/grid2/lbl7.text = v
@export var fname: String:
set(v):
fname = v
if not is_inside_tree():
return
$margin/vbox/grid0/fname.text = v
@export var rname: String:
set(v):
rname = v
if not is_inside_tree():
return
$margin/vbox/grid0/rname.text = v
@export var state: int:
set(v):
state = tools.clip_value(v, 0, textures.size() - 1)
if not is_inside_tree():
return
$margin/vbox/grid0/state.texture = textures[state]
@export var alignment: int:
set(v):
alignment = v
if is_inside_tree():
$margin/vbox.alignment = v
@export var value0_info: String:
set(v):
value0_info = v
@export var value1_info: String:
set(v):
value1_info = v
func _on_button_pressed(): emit_signal('pressed', self)
func _enter_tree() -> void: call_deferred('_enter_tree_defered')
func set_value0(value: Array): value0.assign(value)
func _ready():
var items: Array= get_level_nodes()
for item in items:
item.connect('value_changed', on_level_changed.bind(item, value1_info))
on_level_changed(item.value, item, value0_info)
var level7 = $margin/vbox/grid1/level7
level7.connect('value_changed', on_level_changed.bind(level7, value1_info))
on_level_changed(level7.value, level7, value1_info)
func on_level_changed(_val: float, item: TextureProgressBar, info: String):
item.tooltip_text = '%s\\nТекущее: %0.2f\\nДиапазон: %0.2f…%0.2f' % [info, item.value, item.min_value, item.max_value]
func set_group_param(items: Array, param: StringName, v) -> void:
if not is_inside_tree():
return
if not get_tree():
return
for i in items.size():
items[i].set(param, v)
func set_value0_by_index(index: int, value: float) -> void:
var items: Array = get_level_nodes()
items[index].value = value
func _enter_tree_defered():
var items: Array = get_level_nodes()
var count: int = min(items.size(), value0.size())
for i in count:
items[i].value = value0[i]
items[i].min_value = min_value0
items[i].max_value = max_value0
items[i].step = step0
items = get_name_nodes()
set_group_param(items, 'text', value_name0)
if is_inside_tree():
$margin/vbox/grid1/level7.value = value1
$margin/vbox/grid1/level7.min_value = min_value1
$margin/vbox/grid1/level7.max_value = max_value1
$margin/vbox/grid1/level7.step = step1
$margin/vbox/grid2/lbl7.text = value_name1
$margin/vbox.alignment = alignment
$margin/vbox/grid0/rname.text = rname
$margin/vbox/grid0/fname.text = fname
$margin/vbox/grid0/state.texture = textures[state]
else:
push_warning('обращение к %s вне дерева' % self)
func get_level_nodes() -> Array:
if not is_inside_tree():
return []
if not get_tree():
return []
return [
$margin/vbox/grid1/level1,
$margin/vbox/grid1/level2,
$margin/vbox/grid1/level3,
$margin/vbox/grid1/level4,
$margin/vbox/grid1/level5,
$margin/vbox/grid1/level6 ]
func get_name_nodes() -> Array:
if not is_inside_tree():
return []
if not get_tree():
return []
return [
$margin/vbox/grid2/lbl1,
$margin/vbox/grid2/lbl2,
$margin/vbox/grid2/lbl3,
$margin/vbox/grid2/lbl4,
$margin/vbox/grid2/lbl5,
$margin/vbox/grid2/lbl6 ]
"
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_rceim"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8yvwo"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6qu57"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_mlxje"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3dspb"]
[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
"
[node name="блок-в" type="PanelContainer"]
editor_description = "Элемент замены из ЗИП"
offset_right = 160.0
offset_bottom = 88.0
theme_override_styles/panel = SubResource("StyleBoxEmpty_3nd2u")
script = SubResource("GDScript_oj3k3")
textures = [ExtResource("1_n1aqt"), ExtResource("2_rim3u"), ExtResource("3_3w8fg")]
value0 = [20.0, 30.0, 40.0, 50.0, 60.0, 70.0]
value1 = 56.0
min_value1 = -50.0
max_value0 = 100.0
max_value1 = 120.0
step0 = 1.0
step1 = 1.0
value_name0 = "P,%"
value_name1 = "°C"
fname = "Блок В"
rname = "A1"
[node name="button" type="Button" parent="."]
layout_mode = 2
theme_override_styles/focus = SubResource("StyleBoxEmpty_rceim")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_8yvwo")
theme_override_styles/hover = SubResource("StyleBoxEmpty_6qu57")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_mlxje")
theme_override_styles/normal = SubResource("StyleBoxEmpty_3dspb")
[node name="rect" type="NinePatchRect" parent="."]
layout_mode = 2
texture = ExtResource("4_mcviv")
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="."]
layout_mode = 2
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="margin"]
layout_mode = 2
[node name="grid0" type="GridContainer" parent="margin/vbox"]
layout_mode = 2
columns = 3
[node name="state" type="TextureRect" parent="margin/vbox/grid0"]
custom_minimum_size = Vector2(24, 24)
layout_mode = 2
size_flags_horizontal = 2
size_flags_vertical = 6
texture = ExtResource("1_n1aqt")
expand_mode = 1
[node name="fname" type="Label" parent="margin/vbox/grid0"]
self_modulate = Color(1, 1, 1, 0.627451)
custom_minimum_size = Vector2(0, 20)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_font_sizes/font_size = 17
text = "Блок В"
horizontal_alignment = 1
vertical_alignment = 1
[node name="rname" type="Label" parent="margin/vbox/grid0"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 6
theme_override_font_sizes/font_size = 18
text = "A1"
horizontal_alignment = 2
vertical_alignment = 1
[node name="grid1" type="GridContainer" parent="margin/vbox"]
layout_mode = 2
size_flags_vertical = 3
columns = 7
[node name="level1" type="TextureProgressBar" parent="margin/vbox/grid1" groups=["уровни"]]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
tooltip_text = "
Текущее: 20.00
Диапазон: 0.00…100.00"
mouse_filter = 0
value = 20.0
fill_mode = 3
nine_patch_stretch = true
stretch_margin_left = 8
stretch_margin_top = 8
stretch_margin_right = 8
stretch_margin_bottom = 8
texture_under = ExtResource("5_rim3u")
texture_progress = ExtResource("6_3w8fg")
tint_under = Color(1, 1, 1, 0.419608)
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
[node name="level2" type="TextureProgressBar" parent="margin/vbox/grid1" groups=["уровни"]]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
tooltip_text = "
Текущее: 30.00
Диапазон: 0.00…100.00"
mouse_filter = 0
value = 30.0
fill_mode = 3
nine_patch_stretch = true
stretch_margin_left = 8
stretch_margin_top = 8
stretch_margin_right = 8
stretch_margin_bottom = 8
texture_under = ExtResource("5_rim3u")
texture_progress = ExtResource("6_3w8fg")
tint_under = Color(1, 1, 1, 0.419608)
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
[node name="level3" type="TextureProgressBar" parent="margin/vbox/grid1" groups=["уровни"]]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
tooltip_text = "
Текущее: 40.00
Диапазон: 0.00…100.00"
mouse_filter = 0
value = 40.0
fill_mode = 3
nine_patch_stretch = true
stretch_margin_left = 8
stretch_margin_top = 8
stretch_margin_right = 8
stretch_margin_bottom = 8
texture_under = ExtResource("5_rim3u")
texture_progress = ExtResource("6_3w8fg")
tint_under = Color(1, 1, 1, 0.419608)
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
[node name="level4" type="TextureProgressBar" parent="margin/vbox/grid1" groups=["уровни"]]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
tooltip_text = "
Текущее: 50.00
Диапазон: 0.00…100.00"
mouse_filter = 0
value = 50.0
fill_mode = 3
nine_patch_stretch = true
stretch_margin_left = 8
stretch_margin_top = 8
stretch_margin_right = 8
stretch_margin_bottom = 8
texture_under = ExtResource("5_rim3u")
texture_progress = ExtResource("6_3w8fg")
tint_under = Color(1, 1, 1, 0.419608)
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
[node name="level5" type="TextureProgressBar" parent="margin/vbox/grid1" groups=["уровни"]]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
tooltip_text = "
Текущее: 60.00
Диапазон: 0.00…100.00"
mouse_filter = 0
value = 60.0
fill_mode = 3
nine_patch_stretch = true
stretch_margin_left = 8
stretch_margin_top = 8
stretch_margin_right = 8
stretch_margin_bottom = 8
texture_under = ExtResource("5_rim3u")
texture_progress = ExtResource("6_3w8fg")
tint_under = Color(1, 1, 1, 0.419608)
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
[node name="level6" type="TextureProgressBar" parent="margin/vbox/grid1" groups=["уровни"]]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
tooltip_text = "
Текущее: 70.00
Диапазон: 0.00…100.00"
mouse_filter = 0
value = 70.0
fill_mode = 3
nine_patch_stretch = true
stretch_margin_left = 8
stretch_margin_top = 8
stretch_margin_right = 8
stretch_margin_bottom = 8
texture_under = ExtResource("5_rim3u")
texture_progress = ExtResource("6_3w8fg")
tint_under = Color(1, 1, 1, 0.419608)
tint_progress = Color(0.890196, 0.486275, 0.196078, 1)
[node name="level7" type="TextureProgressBar" parent="margin/vbox/grid1"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
tooltip_text = "
Текущее: 56.00
Диапазон: -50.00…120.00"
mouse_filter = 0
min_value = -50.0
max_value = 120.0
value = 56.0
fill_mode = 3
nine_patch_stretch = true
stretch_margin_left = 8
stretch_margin_top = 8
stretch_margin_right = 8
stretch_margin_bottom = 8
texture_under = ExtResource("5_rim3u")
texture_progress = ExtResource("6_3w8fg")
tint_under = Color(0.890196, 0.486275, 0.196078, 1)
tint_over = Color(0.890196, 0.486275, 0.196078, 1)
[node name="grid2" type="GridContainer" parent="margin/vbox"]
clip_contents = true
layout_mode = 2
size_flags_vertical = 4
columns = 7
[node name="lbl1" type="Label" parent="margin/vbox/grid2" groups=["названия"]]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 8
text = "P,%"
horizontal_alignment = 1
[node name="lbl2" type="Label" parent="margin/vbox/grid2" groups=["названия"]]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 8
text = "P,%"
horizontal_alignment = 1
[node name="lbl3" type="Label" parent="margin/vbox/grid2" groups=["названия"]]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 8
text = "P,%"
horizontal_alignment = 1
[node name="lbl4" type="Label" parent="margin/vbox/grid2" groups=["названия"]]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 8
text = "P,%"
horizontal_alignment = 1
[node name="lbl5" type="Label" parent="margin/vbox/grid2" groups=["названия"]]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 8
text = "P,%"
horizontal_alignment = 1
[node name="lbl6" type="Label" parent="margin/vbox/grid2" groups=["названия"]]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 8
text = "P,%"
horizontal_alignment = 1
[node name="lbl7" type="Label" parent="margin/vbox/grid2"]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_font_sizes/font_size = 8
text = "°C"
horizontal_alignment = 1
[connection signal="pressed" from="button" to="." method="_on_button_pressed"]

View File

@@ -303,7 +303,7 @@ func get_tcp_data(sock: SocketTCP, peer, len_rx):
func _process(_delta: float) -> void:
tick = Time.get_ticks_msec()
RenderingServer.global_shader_parameter_set('tick_curent', tick)
for key in units_udp:
for key: StringName in units_udp:
var unit_udp = units_udp[key]
if Error.OK == unit_udp.process(tick):
var sock = send_sockets[unit_udp.name]
@@ -311,18 +311,18 @@ func _process(_delta: float) -> void:
var dst_port = dst_ports[key]
var dst_addr = dst_addrs[key]
sock.send_to([dst_addr, dst_port], tx_data)
for key in units_udprx:
for key: StringName in units_udprx:
var unit_udprx = units_udprx[key]
unit_udprx.process(tick)
for key in units_serial:
for key: StringName in units_serial:
var unit_serial = units_serial[key]
var serial = serials[key]
if Error.OK == unit_serial.process(tick):
serial.send_to(unit_serial.tx_data)
for key in units_modbus:
for key: StringName in units_modbus:
var unit_modbus = units_modbus[key]
unit_modbus.process(tick)
for sock_unit in tcp_sockets:
for sock_unit: Array in tcp_sockets:
var sock = sock_unit[0]
var unit_tcp = sock_unit[1]
if Error.OK == unit_tcp.process(tick):

View File

@@ -11,7 +11,7 @@ class_name GDTable extends GridContainer
const HEAD_PREFIX = 'HEAD_' ## Префикс ключа заголовка таблицы
const INDEX_FORMAT = '%03d_%03d' ## Формат индекса ключа
const MAX_INDEX = 199 ## Максимальное значение индекса для колонки и строки. Связано с форматом индекса ключа
const MAX_INDEX = 199 ## Максимальное значение индекса для колонки и строки. Связано с форматом индекса ключа
const NODE_PREFIX = 'NODE_' ## Префикс ключа ячейки таблицы
const SLCT_PREFIX = 'SLCT_' ## Префикс ключа индикатора выбранного ряда таблицы