dev maxim
This commit is contained in:
108
PRD_MP550.tscn
108
PRD_MP550.tscn
@@ -95,18 +95,6 @@ bg_color = Color(0.356863, 0.278431, 0.356863, 1)
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_7u7p7"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_jlp41"]
|
||||
colors = PackedColorArray(0, 0.647059, 0, 1, 0, 0.266667, 0, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_u3yy8"]
|
||||
gradient = SubResource("Gradient_jlp41")
|
||||
fill = 1
|
||||
fill_from = Vector2(0.5, 0.5)
|
||||
fill_to = Vector2(1.145, 0)
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_otisn"]
|
||||
texture = SubResource("GradientTexture2D_u3yy8")
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_723du"]
|
||||
size = Vector2(1600, 1200)
|
||||
|
||||
@@ -120,7 +108,8 @@ script/source = "extends Sprite2D
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_dgiai"]
|
||||
shader = ExtResource("4_uy5o2")
|
||||
shader_parameter/color_signal = Color(0.588235, 0.466667, 0, 1)
|
||||
shader_parameter/turn = 0.735
|
||||
shader_parameter/turn = 0.785
|
||||
shader_parameter/inner_radius = 0.32
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_ki0n7"]
|
||||
|
||||
@@ -129,10 +118,23 @@ gradient = SubResource("Gradient_ki0n7")
|
||||
fill_from = Vector2(0.474359, 0.5)
|
||||
metadata/_snap_enabled = true
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_jlp41"]
|
||||
colors = PackedColorArray(0, 0.647059, 0, 1, 0, 0.266667, 0, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_u3yy8"]
|
||||
gradient = SubResource("Gradient_jlp41")
|
||||
fill = 1
|
||||
fill_from = Vector2(0.5, 0.5)
|
||||
fill_to = Vector2(1.145, 0)
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_otisn"]
|
||||
texture = SubResource("GradientTexture2D_u3yy8")
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2pxu2"]
|
||||
shader = ExtResource("8_12mng")
|
||||
shader_parameter/color_signal = Color(0.588242, 0.466356, 0, 1)
|
||||
shader_parameter/turn = 0.735
|
||||
shader_parameter/turn = 0.785
|
||||
shader_parameter/inner_radius = 0.32
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_tn8m6"]
|
||||
|
||||
@@ -293,7 +295,7 @@ metadata/_edit_lock_ = true
|
||||
|
||||
[node name="body_grid" type="GridContainer" parent="TabContainer/PRD"]
|
||||
layout_mode = 0
|
||||
offset_left = 651.0
|
||||
offset_left = 488.0
|
||||
offset_top = -14.0
|
||||
offset_right = 1664.0
|
||||
offset_bottom = 690.0
|
||||
@@ -303,7 +305,7 @@ clip_contents = true
|
||||
custom_minimum_size = Vector2(700, 300)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
columns = 3
|
||||
columns = 4
|
||||
|
||||
[node name="module_fs" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"]
|
||||
custom_minimum_size = Vector2(250, 250)
|
||||
@@ -359,38 +361,10 @@ offset_top = 33.0
|
||||
offset_right = 84.0
|
||||
offset_bottom = 56.0
|
||||
|
||||
[node name="yau_07b" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"]
|
||||
custom_minimum_size = Vector2(250, 200)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="LABEL" type="Label" parent="TabContainer/PRD/body_grid/litera_2_4_6/yau_07b"]
|
||||
layout_mode = 2
|
||||
text = "ЛИТЕРА 2! ПРД-Н!"
|
||||
|
||||
[node name="Zapret" type="Button" parent="TabContainer/PRD/body_grid/litera_2_4_6/yau_07b"]
|
||||
custom_minimum_size = Vector2(180, 25)
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
mouse_default_cursor_shape = 2
|
||||
theme_override_styles/pressed = SubResource("StyleBoxTexture_otisn")
|
||||
toggle_mode = true
|
||||
text = " Запрет СИ2"
|
||||
metadata/dev_num = 48
|
||||
|
||||
[node name="Modul_um_1" type="Button" parent="TabContainer/PRD/body_grid/litera_2_4_6/yau_07b"]
|
||||
layout_mode = 2
|
||||
focus_mode = 0
|
||||
mouse_default_cursor_shape = 2
|
||||
theme_override_styles/pressed = SubResource("StyleBoxTexture_otisn")
|
||||
toggle_mode = true
|
||||
text = " Модуляция УМ 2"
|
||||
metadata/dev_num = 51
|
||||
|
||||
[node name="Ray_set_1" type="OptionButton" parent="TabContainer/PRD/body_grid/litera_2_4_6/yau_07b"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="att_set_1" type="OptionButton" parent="TabContainer/PRD/body_grid/litera_2_4_6/yau_07b"]
|
||||
[node name="yau07b_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("2_vmbyo")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="table_ukp_1" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_2_4_6"]
|
||||
layout_mode = 2
|
||||
@@ -482,6 +456,7 @@ offset_right = 84.0
|
||||
offset_bottom = 56.0
|
||||
|
||||
[node name="yau_07b" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_3_5_7"]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(250, 200)
|
||||
layout_mode = 2
|
||||
|
||||
@@ -523,6 +498,11 @@ layout_mode = 2
|
||||
[node name="att_set_2" type="OptionButton" parent="TabContainer/PRD/body_grid/litera_3_5_7/yau_07b"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="yau07b_control" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_3_5_7"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("2_vmbyo")
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="table_ukp_2" type="GridContainer" parent="TabContainer/PRD/body_grid/litera_3_5_7"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("2_vmbyo")
|
||||
@@ -757,22 +737,20 @@ vertical_alignment = 1
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="ref_A23" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
|
||||
offset_left = 9.0
|
||||
offset_top = 34.0
|
||||
offset_right = 59.0
|
||||
offset_bottom = 208.0
|
||||
offset_left = 40.0
|
||||
offset_top = -206.0
|
||||
offset_right = 90.0
|
||||
offset_bottom = -32.0
|
||||
textures = Array[Texture]([])
|
||||
self_size = Vector2i(50, 174)
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="ref_A24" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
|
||||
offset_left = 59.0
|
||||
offset_top = 34.0
|
||||
offset_right = 109.0
|
||||
offset_bottom = 208.0
|
||||
offset_left = 40.0
|
||||
offset_top = -448.0
|
||||
offset_right = 90.0
|
||||
offset_bottom = -274.0
|
||||
textures = Array[Texture]([])
|
||||
self_size = Vector2i(50, 174)
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="ref_A25" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
|
||||
offset_left = 109.0
|
||||
@@ -802,6 +780,7 @@ self_size = Vector2i(50, 174)
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="ref_A28" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
|
||||
visible = false
|
||||
offset_left = 259.0
|
||||
offset_top = 34.0
|
||||
offset_right = 309.0
|
||||
@@ -811,6 +790,7 @@ self_size = Vector2i(50, 174)
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="ref_A29" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
|
||||
visible = false
|
||||
offset_left = 309.0
|
||||
offset_top = 34.0
|
||||
offset_right = 359.0
|
||||
@@ -819,16 +799,6 @@ textures = Array[Texture]([])
|
||||
self_size = Vector2i(50, 174)
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="ref_A30" parent="TabContainer/ControlPanel/soc_P1" instance=ExtResource("11_fg7ul")]
|
||||
offset_left = 359.0
|
||||
offset_top = 34.0
|
||||
offset_right = 409.0
|
||||
offset_bottom = 208.0
|
||||
textures = Array[Texture]([])
|
||||
self_size = Vector2i(50, 174)
|
||||
rname = "A30"
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="Signal_EMS_G" type="NinePatchRect" parent="TabContainer/ControlPanel"]
|
||||
layout_mode = 0
|
||||
offset_left = 536.0
|
||||
@@ -1141,10 +1111,6 @@ text = "Темп"
|
||||
[connection signal="pressed" from="TabContainer/PRD/body_grid/litera_2_4_6/module_fs/get_freq" to="TabContainer/Modul_fs" method="_on_send_pressed"]
|
||||
[connection signal="pressed" from="TabContainer/PRD/body_grid/litera_2_4_6/module_fs/get_att" to="TabContainer/Modul_fs" method="_on_get_att"]
|
||||
[connection signal="toggled" from="TabContainer/PRD/body_grid/litera_2_4_6/module_fs/get_gen_status" to="TabContainer/Modul_fs" method="_on_get_status"]
|
||||
[connection signal="toggled" from="TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Zapret" to="." method="_on_zapret1"]
|
||||
[connection signal="toggled" from="TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Modul_um_1" to="." method="_on_modul_um_1"]
|
||||
[connection signal="item_selected" from="TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Ray_set_1" to="." method="_on_btn_ray_1"]
|
||||
[connection signal="item_selected" from="TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/att_set_1" to="." method="_on_attenuator_1"]
|
||||
[connection signal="pressed" from="TabContainer/PRD/body_grid/litera_3_5_7/module_fs/con" to="TabContainer/Modul_fs" method="_on_start"]
|
||||
[connection signal="pressed" from="TabContainer/PRD/body_grid/litera_3_5_7/module_fs/get_freq" to="TabContainer/Modul_fs" method="_on_send_pressed"]
|
||||
[connection signal="pressed" from="TabContainer/PRD/body_grid/litera_3_5_7/module_fs/get_att" to="TabContainer/Modul_fs" method="_on_get_att"]
|
||||
|
||||
@@ -2,9 +2,9 @@ shader_type canvas_item;
|
||||
|
||||
uniform vec4 color_signal: source_color;
|
||||
uniform float turn = 0.785;
|
||||
uniform float inner_radius = 0.32;
|
||||
|
||||
const float outer_radius = 0.109;
|
||||
const float inner_radius = 0.82;
|
||||
const float zoom = 100.0;
|
||||
const float speed = 2.1;
|
||||
const float size = 9.0;
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
shader = ExtResource("1_mtift")
|
||||
shader_parameter/color_signal = null
|
||||
shader_parameter/turn = 0.785
|
||||
shader_parameter/inner_radius = 0.32
|
||||
|
||||
@@ -2,9 +2,9 @@ shader_type canvas_item;
|
||||
|
||||
uniform vec4 color_signal: source_color;
|
||||
uniform float turn = 0.785;
|
||||
uniform float inner_radius = 0.32;
|
||||
|
||||
const float outer_radius = 0.109;
|
||||
const float inner_radius = 0.82;
|
||||
const float zoom = 100.0;
|
||||
const float speed = 2.1;
|
||||
const float size = 9.0;
|
||||
|
||||
@@ -22,11 +22,34 @@ func _ready() -> void:
|
||||
|
||||
# Таблица УКП_2
|
||||
node_select2 = $TabContainer/PRD/body_grid/litera_3_5_7/table_ukp_2
|
||||
draw_tabl(node_select2, Constants.ROWS_UKP2_DATA, Constants.ROWS_UKP2_DATA.size())
|
||||
draw_tabl(node_select2, Constants.ROWS_REGS_DATA, Constants.ROWS_REGS_DATA.size())
|
||||
node_select2.set_columns_min_size([120, 120])
|
||||
node_select2.set_node_text(0, 0, 'Мощность')
|
||||
node_select2.set_node_text(1, 0, 'Температура')
|
||||
|
||||
# Таблица ЯУ-07б
|
||||
var node_select_yau_07b = $TabContainer/PRD/body_grid/litera_2_4_6/yau07b_control
|
||||
draw_tabl(node_select_yau_07b, Constants.ROWS_YAU_07B, Constants.ROWS_YAU_07B.size())
|
||||
node_select_yau_07b.set_columns_min_size([160, 120])
|
||||
node_select_yau_07b.set_node_text(0, 0, 'ПРД-Н')
|
||||
node_select_yau_07b.set_node_text(1, 0, 'Литера_2')
|
||||
node_select_yau_07b.set_node_text(0, 1, 'Запрет СИ_2')
|
||||
node_select_yau_07b.set_node_text(0, 2, 'Модуляция УМ_2')
|
||||
node_select_yau_07b.set_node_text(0, 3, 'Положение луча')
|
||||
node_select_yau_07b.set_node_text(0, 4, 'Аттенюатор')
|
||||
|
||||
var node_select_yau_07b_2 = $TabContainer/PRD/body_grid/litera_3_5_7/yau07b_control
|
||||
draw_tabl(node_select_yau_07b_2, Constants.ROWS_YAU_07B, Constants.ROWS_YAU_07B.size())
|
||||
node_select_yau_07b_2.set_columns_min_size([160, 120])
|
||||
node_select_yau_07b_2.set_node_text(0, 0, 'ПРД-Н')
|
||||
node_select_yau_07b_2.set_node_text(1, 0, 'Литера_3')
|
||||
node_select_yau_07b_2.set_node_text(0, 1, 'Запрет СИ_3')
|
||||
node_select_yau_07b_2.set_node_text(0, 2, 'Модуляция УМ_3')
|
||||
node_select_yau_07b_2.set_node_text(0, 3, 'Положение луча')
|
||||
node_select_yau_07b_2.set_node_text(0, 4, 'Аттенюатор')
|
||||
|
||||
#Таблица ФС
|
||||
|
||||
# Выбор прибора для подключения
|
||||
var node_select_device = $TabContainer/PRD/select_dev
|
||||
draw_tabl(node_select_device, Constants.SELECT_DEVICE, Constants.SELECT_DEVICE.size())
|
||||
@@ -40,21 +63,36 @@ func _ready() -> void:
|
||||
node_select_device.get_node2(0,0).text = 'ПРИБОР'
|
||||
node_select_device.set_columns_min_size([100, 100])
|
||||
|
||||
## Заполненение списка модуляции УМ
|
||||
for key in Constants.OUT_x128:
|
||||
node_select_yau_07b.get_node2(1, 2).add_item(key)
|
||||
node_select_yau_07b_2.get_node2(1, 2).add_item(key)
|
||||
|
||||
## Заполненение списка направления луча
|
||||
for key in Constants.RAY_DICT:
|
||||
$TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Ray_set_1.add_item(key)
|
||||
$TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Ray_set_2.add_item(key)
|
||||
node_select_yau_07b.get_node2(1, 3).add_item(key)
|
||||
node_select_yau_07b_2.get_node2(1, 3).add_item(key)
|
||||
|
||||
## Заполненение списка аттенюатора
|
||||
for key in Constants.ATT_DICT:
|
||||
$TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/att_set_1.add_item(key)
|
||||
$TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/att_set_2.add_item(key)
|
||||
|
||||
node_select_yau_07b.get_node2(1, 4).add_item(key)
|
||||
node_select_yau_07b_2.get_node2(1, 4).add_item(key)
|
||||
|
||||
draw_control_panel_prd(Constants.ADDRESSES[0][3])
|
||||
|
||||
Network.connect('yau_status_line', Callable(self, '_on_yau_status'))
|
||||
Network.connect('yau_receive', Callable(self, '_on_data_received'))
|
||||
Network.connect('yau_read_isa', Callable(self, '_on_read_isa'))
|
||||
|
||||
node_select_yau_07b.get_node2(1, 1).get_child(1, false).connect('toggled', Callable(self, '_on_zapret1'))
|
||||
node_select_yau_07b.get_node2(1, 2).connect('item_selected', Callable(self, '_on_modul_um_1'))
|
||||
node_select_yau_07b.get_node2(1, 3).connect('item_selected', Callable(self, '_on_btn_ray_1'))
|
||||
node_select_yau_07b.get_node2(1, 4).connect('item_selected', Callable(self, '_on_attenuator_1'))
|
||||
|
||||
node_select_yau_07b_2.get_node2(1, 1).get_child(1, false).connect('toggled', Callable(self, '_on_zapret2'))
|
||||
node_select_yau_07b_2.get_node2(1, 2).connect('item_selected', Callable(self, '_on_modul_um_2'))
|
||||
node_select_yau_07b_2.get_node2(1, 3).connect('item_selected', Callable(self, '_on_btn_ray_2'))
|
||||
node_select_yau_07b_2.get_node2(1, 4).connect('item_selected', Callable(self, '_on_attenuator_2'))
|
||||
|
||||
|
||||
func draw_control_panel_prd(mode) -> void:
|
||||
@@ -98,8 +136,10 @@ func _on_read_isa(unit_isa_ports: Dictionary) -> void:
|
||||
|
||||
if isa_data.has(Constants.BASE_PORTS.UG+6):
|
||||
$TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[0x106] & 0x7))
|
||||
$TabContainer/PRD/body_grid/litera_2_4_6/PSK/ray_1.material.set('shader_parameter/inner_radius', 0.3 + 0.01 * (isa_data[0x106] & 0x38))
|
||||
if isa_data.has(Constants.BASE_PORTS.UG+8):
|
||||
$TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/turn', 0.735 + 0.025 * (isa_data[0x108] & 0x7))
|
||||
$TabContainer/PRD/body_grid/litera_3_5_7/PSK2/ray_2.material.set('shader_parameter/inner_radius', 0.3 + 0.01 * (isa_data[0x108] & 0x38))
|
||||
|
||||
|
||||
## Рисует таблицу
|
||||
@@ -131,7 +171,7 @@ func _on_data_received(data_from_yau_07):
|
||||
for i in range(8): ## Температура от УКП_1
|
||||
var temperature_ukp_1 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_1 + 2 * i)
|
||||
var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_1) * Constants.TEMP
|
||||
node_select1.set_node_text(1, i+1, '%d' % TMP)
|
||||
node_select1.set_node_text(1, i+1, '%d °С' % TMP)
|
||||
|
||||
for i_pow in range(8): ## Мощность от УКП_2
|
||||
if len(data_from_yau_07) > Constants.DataIndices.POWER_UKP_2 + 2 * i_pow:
|
||||
@@ -142,7 +182,7 @@ func _on_data_received(data_from_yau_07):
|
||||
if len(data_from_yau_07) > Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row:
|
||||
var temperature_ukp_2 = data_from_yau_07.decode_u16(Constants.DataIndices.TEMPERATURE_UKP_2 + 2 * row)
|
||||
var TMP = Constants.CONST_MIN_TEMP + (Constants.MAXIMUM_CODE_ADC - temperature_ukp_2) * Constants.TEMP
|
||||
node_select2.set_node_text(1, row+1, '%d' % TMP)
|
||||
node_select2.set_node_text(1, row+1, '%d °С' % TMP)
|
||||
|
||||
|
||||
func set_frame(node: Node, val: int): node.set_frame(val)
|
||||
@@ -202,30 +242,42 @@ func fill_item(node: Node, i_column: int, i_row: int, arr: Dictionary, select: i
|
||||
|
||||
|
||||
func _on_zapret1(toggled_on: bool) -> void:
|
||||
var meta = $TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Zapret.get_meta('dev_num')
|
||||
var meta = 48
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, meta)
|
||||
var zapret_mode = 0x4000 if toggled_on else 0x0
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, zapret_mode)
|
||||
|
||||
|
||||
func _on_zapret2(toggled_on: bool) -> void:
|
||||
var meta = $TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Zapret2.get_meta('dev_num')
|
||||
var meta = 49
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, meta)
|
||||
var zapret_mode = 0x4000 if toggled_on else 0x0
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, zapret_mode)
|
||||
|
||||
|
||||
func _on_modul_um_1(toggled_on: bool):
|
||||
var meta = $TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Modul_um_1.get_meta('dev_num')
|
||||
func _on_modul_um_1(item_from_ray_1: int):
|
||||
var meta = 51
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, meta)
|
||||
var modul_um = 0x2000 if toggled_on else 0x0
|
||||
var modul_um_values = {
|
||||
1: 0x2000,
|
||||
2: 0x4000,
|
||||
3: 0x8000
|
||||
}
|
||||
|
||||
var modul_um = modul_um_values.get(item_from_ray_1, 0)
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, modul_um)
|
||||
|
||||
|
||||
func _on_modul_um_2(toggled_on: bool):
|
||||
var meta = $TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Modul_um_2.get_meta('dev_num')
|
||||
func _on_modul_um_2(item_from_ray_1: int):
|
||||
var meta = 52
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+2, meta)
|
||||
var modul_um = 0x2000 if toggled_on else 0x0
|
||||
var modul_um_values = {
|
||||
1: 0x2000,
|
||||
2: 0x4000,
|
||||
3: 0x8000,
|
||||
}
|
||||
|
||||
var modul_um = modul_um_values.get(item_from_ray_1, 0)
|
||||
Network.write_port_isa(Constants.BASE_PORTS.EMS_G+8, modul_um)
|
||||
|
||||
|
||||
@@ -246,6 +298,7 @@ func _on_fgos_2(toggled_on: bool):
|
||||
## Регулировка положением луча 1
|
||||
func _on_btn_ray_1(item_from_ray_1: int) -> void:
|
||||
if isa_from_yau07b.has(Constants.BASE_PORTS.UG+6):
|
||||
print('Биты в УГ: ', set_bits(isa_from_yau07b[Constants.BASE_PORTS.UG+6], item_from_ray_1, 7))
|
||||
Network.write_port_isa(Constants.BASE_PORTS.UG+6, set_bits(isa_from_yau07b[Constants.BASE_PORTS.UG+6], item_from_ray_1, 7))
|
||||
Network.read_port_isa([Constants.BASE_PORTS.UG+6])
|
||||
else:
|
||||
@@ -261,6 +314,7 @@ func _on_btn_ray_2(item_from_ray_2: int) -> void:
|
||||
print_debug('В ISA отсутствует данные в \"%x\" порту' % (Constants.BASE_PORTS.UG+0x8))
|
||||
|
||||
|
||||
## Регулировка аттенюатора луча 1
|
||||
func _on_attenuator_1(item_from_att_1: int) -> void:
|
||||
if isa_from_yau07b.has(Constants.BASE_PORTS.UG+6):
|
||||
Network.write_port_isa(Constants.BASE_PORTS.UG+6, set_bits(isa_from_yau07b[Constants.BASE_PORTS.UG+6], item_from_att_1 << 3, 0x38))
|
||||
@@ -268,6 +322,8 @@ func _on_attenuator_1(item_from_att_1: int) -> void:
|
||||
else:
|
||||
print_debug('В ISA отсутствует данные в \"%x\" порту' % (Constants.BASE_PORTS.UG+0x6))
|
||||
|
||||
|
||||
## Регулировка аттенюатора луча 2
|
||||
func _on_attenuator_2(item_from_att_1: int) -> void:
|
||||
if isa_from_yau07b.has(Constants.BASE_PORTS.UG+8):
|
||||
Network.write_port_isa(Constants.BASE_PORTS.UG+8, set_bits(isa_from_yau07b[Constants.BASE_PORTS.UG+8], item_from_att_1 << 3, 0x38))
|
||||
@@ -275,6 +331,7 @@ func _on_attenuator_2(item_from_att_1: int) -> void:
|
||||
else:
|
||||
print_debug('В ISA отсутствует данные в \"%x\" порту' % (Constants.BASE_PORTS.UG+0x8))
|
||||
|
||||
|
||||
func _on_read_isa_pressed() -> void:
|
||||
Network.read_port_isa([Constants.BASE_PORTS.EMS_G+2, Constants.BASE_PORTS.EMS_G+4, Constants.BASE_PORTS.EMS_G+8])
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@ const ROWS_REGS_DATA: Array = [
|
||||
[TableNode, TableNode],
|
||||
[TableNode, TableNode],
|
||||
[TableNode, TableNode]]
|
||||
const ROWS_UKP2_DATA: Array = [
|
||||
[TableNode, TableNode],
|
||||
[TableNode, TableNode],
|
||||
[TableNode, TableNode],
|
||||
[TableNode, TableNode],
|
||||
const ROWS_YAU_07B: Array = [
|
||||
[TableNode, TableNode],
|
||||
[TableNode, Switch],
|
||||
[TableNode, TableList],
|
||||
[TableNode, TableList],
|
||||
[TableNode, TableList],
|
||||
[TableNode, TableNode],
|
||||
[TableNode, TableNode],
|
||||
[TableNode, TableNode],
|
||||
@@ -37,7 +37,7 @@ const ADDRESSES: Array = [
|
||||
['ПРД-Н1', '10.1.1.11', 50011, MODE.PRD_H, '10.1.2.18', '10.1.2.19', ''],
|
||||
['ПРД-Н2', '10.1.1.21', 50021, MODE.PRD_H, '10.1.2.34', '10.1.2.35', ''],
|
||||
['ПРД-Н3', '10.1.1.31', 50031, MODE.PRD_H, '10.1.2.50', '10.1.2.51', ''],
|
||||
['ПРД-Н4', '10.1.1.41', 50041, MODE.PRD_H, '10.1.2.67', '10.1.2.67', ''],
|
||||
['ПРД-Н4', '10.1.1.41', 50041, MODE.PRD_H, '10.1.2.66', '10.1.2.67', ''],
|
||||
['ПРД-В1', '10.1.1.12', 50012, MODE.PRD_B, '10.1.2.20', '10.1.2.21', ''],
|
||||
['ПРД-В2', '10.1.1.22', 50022, MODE.PRD_B, '10.1.2.36', '10.1.2.37', ''],
|
||||
['ПРД-В3', '10.1.1.32', 50032, MODE.PRD_B, '10.1.2.52', '10.1.2.53', ''],
|
||||
@@ -86,13 +86,13 @@ const OUT_x128: Array = [
|
||||
'0',
|
||||
'1',]
|
||||
const RAY_DICT: Array = [
|
||||
' Контроль',
|
||||
' -5°',
|
||||
' 5°',
|
||||
' 15°',
|
||||
' 25°',
|
||||
' 35°',
|
||||
' 45°',
|
||||
' Контроль',
|
||||
]
|
||||
const ATT_DICT: Array = [
|
||||
' 0 db',
|
||||
@@ -107,10 +107,8 @@ const ATT_DICT: Array = [
|
||||
const SIGNS_PRD: Array = [
|
||||
## ПРК-К
|
||||
[
|
||||
' Запрет СИ6',
|
||||
' Запрет СИ7',
|
||||
' Запрет СИ1',
|
||||
'ЛИТЕРА 6! ПРД-К',
|
||||
'ЛИТЕРА 7! ПРД-К',
|
||||
'СЗИ6 от УФ',
|
||||
'СЗИ7 от УФ',
|
||||
@@ -126,9 +124,7 @@ const SIGNS_PRD: Array = [
|
||||
'МАА №2',
|
||||
'ИП9-50 №1',
|
||||
'ИП9-50 №2',
|
||||
'ИП12-50 №1',
|
||||
'ИП9-50 №3',
|
||||
'ИП12-50 №2',
|
||||
'ИП5-25',
|
||||
],
|
||||
## ПРК-В
|
||||
@@ -136,7 +132,6 @@ const SIGNS_PRD: Array = [
|
||||
' Запрет СИ4',
|
||||
' Запрет СИ5',
|
||||
'',
|
||||
'ЛИТЕРА 4! ПРД-В',
|
||||
'ЛИТЕРА 5! ПРД-В',
|
||||
'СЗИ4 от УФ',
|
||||
'СЗИ5 от УФ',
|
||||
@@ -152,21 +147,15 @@ const SIGNS_PRD: Array = [
|
||||
'МАА №2',
|
||||
'ИП9-50 №1',
|
||||
'ИП9-50 №2',
|
||||
'ИП12-50 №1',
|
||||
'-',
|
||||
'-',
|
||||
'ИП5-25',
|
||||
],
|
||||
## ПРК-Н
|
||||
[
|
||||
' Запрет СИ2',
|
||||
' Запрет СИ3',
|
||||
'',
|
||||
'ЛИТЕРА 2! ПРД-Н',
|
||||
'ЛИТЕРА 3! ПРД-Н',
|
||||
'СЗИ2 от УФ',
|
||||
'СЗИ3 от УФ',
|
||||
'СИ2 от ФС',
|
||||
'СИ3 от ФС',
|
||||
'СИ2 в УФ',
|
||||
'СИ3 в УФ',
|
||||
@@ -178,35 +167,31 @@ const SIGNS_PRD: Array = [
|
||||
'МАА №2',
|
||||
'ИП9-50 №1',
|
||||
'ИП9-50 №2',
|
||||
'ИП12-50 №1',
|
||||
'-',
|
||||
'-',
|
||||
'ИП5-25',
|
||||
'--',
|
||||
],
|
||||
]
|
||||
var NODE_MAP = {
|
||||
'TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/Zapret': 0,
|
||||
'TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Zapret2': 1,
|
||||
'TabContainer/PRD/body_grid/litera_2_4_6/yau_07b/LABEL': 3,
|
||||
'TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/LABEL2': 4,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A22': 5,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A23': 6,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A26': 7,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A27': 8,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A28': 9,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A29': 10,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A31': 11,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A32': 12,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A33': 13,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A34': 14,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A23': 15,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A24': 16,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A25': 17,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A26': 18,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A27': 19,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A28': 20,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A29': 21,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A30': 22,
|
||||
'TabContainer/PRD/body_grid/litera_3_5_7/yau_07b/Zapret2': 0,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A22': 1,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A23': 2,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A26': 3,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A27': 4,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A28': 5,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A29': 6,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A31': 7,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A32': 8,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A33': 9,
|
||||
'TabContainer/ControlPanel/Signal_EMS_G/ref_A34': 10,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A23': 11,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A24': 12,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A25': 13,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A26': 14,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A27': 15,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A28': 16,
|
||||
'TabContainer/ControlPanel/soc_P1/ref_A29': 17,
|
||||
}
|
||||
enum BASE_PORTS {
|
||||
UG = 0x100,
|
||||
|
||||
Reference in New Issue
Block a user