Дорабока. Создан файл для контроля прибора ПРД-В. Правильное позиционное обозначение Щ3 и СПТ-25.

This commit is contained in:
MaD_CaT
2024-12-26 10:17:26 +03:00
parent fa4463e56f
commit 781bb50d6f
3 changed files with 56 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=10 format=3 uid="uid://cvskpe1ti3p45"]
[ext_resource type="Script" path="res://scenes/контроль/прибор.gd" id="1_dl7rt"]
[ext_resource type="Script" path="res://scenes/pribor-prd-v/pribor_prd_v.gd" id="1_c20s6"]
[ext_resource type="PackedScene" uid="uid://d3iqb5e4g81m5" path="res://scenes/контроль/элемент-г.tscn" id="2_xpo4b"]
[ext_resource type="Texture2D" uid="uid://c4mdrmk7h638f" path="res://data/nine-patch-round.png" id="3_wyy1b"]
[ext_resource type="PackedScene" uid="uid://bk1655p4e8y4u" path="res://scenes/контроль/кассета-у-5-нв.tscn" id="4_gl2bl"]
@@ -17,7 +17,7 @@ offset_left = 15.0
offset_top = 30.0
offset_right = 15.0
offset_bottom = 30.0
script = ExtResource("1_dl7rt")
script = ExtResource("1_c20s6")
[node name="maa2000_A22" parent="." instance=ExtResource("2_xpo4b")]
layout_mode = 2

View File

@@ -0,0 +1,49 @@
extends "res://scenes/контроль/прибор.gd"
enum STATE_VAL {
NONE = 0,
GOOD = 1,
ERROR = 2 }
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var unit_key = settings.get_unit_key(get_meta('unit_name'))
var unit_prd = network.units[unit_key]
unit_prd.connect('data_received', Callable(self, 'on_data_received'))
unit_prd.connect('line_changed', Callable(self, 'on_line_changed'))
set_default_state()
func set_default_state():
$um1535_A7.state = STATE_VAL.NONE
$um1535_A8.state = STATE_VAL.NONE
$um1535_A9.state = STATE_VAL.NONE
$um1535_A10.state = STATE_VAL.NONE
$um1535_A11.state = STATE_VAL.NONE
$um1535_A12.state = STATE_VAL.NONE
$um1535_A13.state = STATE_VAL.NONE
$um1535_A14.state = STATE_VAL.NONE
$um1535_A15.state = STATE_VAL.NONE
$um1535_A16.state = STATE_VAL.NONE
$um1535_A17.state = STATE_VAL.NONE
$um1535_A18.state = STATE_VAL.NONE
func on_line_changed(unit_prd):
if not unit_prd.online:
set_default_state()
func on_data_received(unit_prd):
var ukp1_online = (unit_prd.status[0] >> 2) & 1
var ukp2_online = (unit_prd.status[0] >> 3) & 1
var ug_online = (unit_prd.status[0] >> 1) & 1
if ug_online:
pass
else:
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass

View File

@@ -57,8 +57,8 @@ offset_right = 328.0
offset_bottom = 749.0
script = ExtResource("4_v0lil")
unit_name = "уарэп-спт25-1"
fname = "СПТ-25-230-400"
rname = "A1"
fname = "СПТ-25-230-400-3"
rname = "G1"
[node name="block_input1" parent="spt25_A1" instance=ExtResource("4_mrvir")]
layout_mode = 0
@@ -91,8 +91,8 @@ offset_right = 643.0
offset_bottom = 749.0
script = ExtResource("4_v0lil")
unit_name = "уарэп-спт25-2"
fname = "СПТ-25-230-400"
rname = "A2"
fname = "СПТ-25-230-400-3"
rname = "G2"
[node name="block_input1" parent="spt25_A2" instance=ExtResource("4_mrvir")]
layout_mode = 0
@@ -124,4 +124,4 @@ offset_right = 633.0
offset_bottom = 1059.0
unit_name = "уарэп-щ3"
fname = "Щ3 (контроль и управление питанием)"
rname = "A3"
rname = "A1"