исправление морды
This commit is contained in:
@@ -232,22 +232,6 @@ theme_override_font_sizes/font_size = 14
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_p247y")
|
||||
text = "Загрузить"
|
||||
|
||||
[node name="Litera_3_5_7" type="ColorRect" parent="Background"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_top = 48.0
|
||||
offset_right = 1941.0
|
||||
offset_bottom = 352.0
|
||||
color = Color(0.669446, 0.567301, 0.66881, 1)
|
||||
|
||||
[node name="Litera_1" type="ColorRect" parent="Background"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_top = 359.0
|
||||
offset_right = 2182.0
|
||||
offset_bottom = 638.0
|
||||
color = Color(0.669446, 0.567301, 0.66881, 1)
|
||||
|
||||
[node name="ISA" type="Label" parent="."]
|
||||
offset_left = 225.0
|
||||
offset_top = 11.0
|
||||
@@ -280,12 +264,11 @@ theme_override_styles/tab_selected = SubResource("StyleBoxTexture_k08q3")
|
||||
theme_override_styles/tab_hovered = SubResource("StyleBoxTexture_dklg6")
|
||||
theme_override_styles/tab_unselected = SubResource("StyleBoxTexture_17le6")
|
||||
tab_alignment = 2
|
||||
current_tab = 1
|
||||
current_tab = 0
|
||||
tab_focus_mode = 0
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="PRD" type="Panel" parent="TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxTexture_7u7p7")
|
||||
metadata/_tab_index = 0
|
||||
@@ -429,6 +412,7 @@ script = ExtResource("2_vmbyo")
|
||||
node_gap = Vector2(100, 50)
|
||||
|
||||
[node name="ControlPanel" type="Panel" parent="TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxTexture_tn8m6")
|
||||
script = ExtResource("9_akagi")
|
||||
|
||||
@@ -7,11 +7,6 @@ func _ready() -> void:
|
||||
Network.connect('yau_receive', Callable(self, '_on_data_received'))
|
||||
Network.connect('yau_status_line', Callable(self, '_control_pribor'))
|
||||
|
||||
var timer = Timer.new()
|
||||
self.add_child(timer)
|
||||
timer.connect('timeout', Callable(self, 'on_timer'))
|
||||
timer.start(1)
|
||||
|
||||
'''sockets_ind = [
|
||||
$soc_y5/ems_g/light_ind,
|
||||
$soc_y5/ug/light_ind,
|
||||
@@ -32,11 +27,11 @@ func on_timer(unit):
|
||||
print(unit)
|
||||
|
||||
func _on_data_received(data_from_yau_07):
|
||||
var status_board = data_from_yau_07.decode_u8(Constants.DataIndices.STATUS_BOARD)
|
||||
var dry_contact: int = data_from_yau_07.decode_u16(Constants.DataIndices.DRY_CONTACT) # Контроль сухих контактов (УГ)
|
||||
var _status_board = data_from_yau_07.decode_u8(Constants.DataIndices.STATUS_BOARD)
|
||||
var _dry_contact: int = data_from_yau_07.decode_u16(Constants.DataIndices.DRY_CONTACT) # Контроль сухих контактов (УГ)
|
||||
|
||||
|
||||
## From Network status about yau-07
|
||||
func _control_pribor(yau_status:bool) -> void:
|
||||
func _control_pribor(_yau_status:bool) -> void:
|
||||
#$device.text = str(Constants.CURRENT_MODE)
|
||||
$soc_y5/ay07.state = Constants.STATE_VAL.GOOD
|
||||
|
||||
@@ -97,8 +97,8 @@ func _on_data_received(data_from_yau_07):
|
||||
var out_imp: int = data_from_yau_07.decode_u16(Constants.DataIndices.OUT_IMPULS_PRD)
|
||||
var parent_node2 = get_parent().get_parent()
|
||||
|
||||
#process_sockets_vert(in_blank, in_imp, 16, 1, parent_node2)
|
||||
#process_sockets_horizon(out_blank, out_imp, 16, 2, parent_node2)
|
||||
process_sockets_vert(in_blank, in_imp, 16, 1, parent_node2)
|
||||
process_sockets_horizon(out_blank, out_imp, 16, 2, parent_node2)
|
||||
|
||||
|
||||
func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_node2: Node):
|
||||
@@ -113,20 +113,18 @@ func process_sockets_horizon(blank: int, imp: int, count: int, col: int, parent_
|
||||
|
||||
set_frame(socket_status, frame_type)
|
||||
|
||||
if i == 1:
|
||||
set_frame(get_specific_node(parent_node2, 5), frame_type)
|
||||
if i == 1: # СИ_2_в_УФ
|
||||
var CI_2_UF = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(2).get_node2(1, 6).get_child(1)
|
||||
set_frame(CI_2_UF, frame_type)
|
||||
if i == 2:
|
||||
set_frame(get_specific_node(parent_node2, 6), frame_type)
|
||||
if i == 2: # СИ_3_в_УФ
|
||||
var CI_3_UF = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(2).get_node2(1, 6).get_child(1)
|
||||
set_frame(CI_3_UF, frame_type)
|
||||
if i == 4:
|
||||
set_frame(get_specific_node(parent_node2, 7), frame_type)
|
||||
if i == 5:
|
||||
set_frame(get_specific_node(parent_node2, 8), frame_type)
|
||||
if i == 9:
|
||||
set_frame(get_specific_node(parent_node2, 9), frame_type)
|
||||
if i == 4: # Модуляция_УМ_2
|
||||
pass
|
||||
if i == 5: # Модуляция_УМ_3
|
||||
pass
|
||||
if i == 9: # ФГОЗ_3
|
||||
pass
|
||||
|
||||
|
||||
func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_node2: Node):
|
||||
@@ -141,24 +139,18 @@ func process_sockets_vert(blank: int, imp: int, count: int, col: int, parent_nod
|
||||
|
||||
set_frame(socket_status, frame_type)
|
||||
|
||||
if i == 1:
|
||||
set_frame(get_specific_node(parent_node2, 1), frame_type)
|
||||
if i == 2:
|
||||
set_frame(get_specific_node(parent_node2, 2), frame_type)
|
||||
if i == 9:
|
||||
set_frame(get_specific_node(parent_node2, 3), frame_type)
|
||||
if i == 1: # СЗИ_2_от_УФ
|
||||
pass
|
||||
if i == 2: # СЗИ_3_от_УФ
|
||||
pass
|
||||
if i == 9: # СИ_2_от_ФС
|
||||
var CI_2_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(0).get_child(0).get_node2(1, 6).get_child(1)
|
||||
set_frame(CI_2_FS, frame_type)
|
||||
if i == 10:
|
||||
set_frame(get_specific_node(parent_node2, 4), frame_type)
|
||||
if i == 10: # СИ_3_от_ФС
|
||||
var CI_3_FS = parent_node2.get_child(3).get_child(0).get_child(0).get_child(1).get_child(0).get_node2(1, 6).get_child(1)
|
||||
set_frame(CI_3_FS, frame_type)
|
||||
|
||||
|
||||
func get_specific_node(parent_node2: Node, child_index: int)-> Node:
|
||||
return parent_node2.get_child(3, false).get_child(1).get_child(4).get_child(child_index).get_child(3)
|
||||
|
||||
|
||||
func set_frame(node: Node, val: int): node.set_frame(val)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user