Merge remote-tracking branch 'MaD_CaT/master'
# Conflicts: # scenes/работа.tscn
This commit is contained in:
@@ -165,7 +165,7 @@ func on_row_pressed_in(i_row: int):
|
||||
## Выбор входного устройства, для отображения в таблице соединений входа и изменения параметров
|
||||
func set_in_dev(dev):
|
||||
var row_type: Array = [CellLineEdit, CellLineEdit, CellLineEdit, CellLineEdit, CellState]
|
||||
set_dev($scrl_in_set/tbl_in_set, dev, row_type, IN_SET_ROW, 'Список соединённых выходов :')
|
||||
set_dev($scrl_in_set/tbl_in_set, dev, row_type, IN_SET_ROW, 'Список соединённых выходов :', [250, 100, 70, 70, 70])
|
||||
|
||||
|
||||
## Обработчик выбора строки в таблице соединений входа и изменения параметров
|
||||
@@ -264,7 +264,7 @@ func on_row_pressed_out(i_row: int):
|
||||
## Выбор выходного устройства, для отображения в таблице соединений выхода и изменения параметров
|
||||
func set_out_dev(dev):
|
||||
var row_type: Array = [CellLineEdit, CellLineEdit, CellLineEdit, CellLineEdit, CellState, CellOptBtn]
|
||||
set_dev($scrl_out_set/tbl_out_set, dev, row_type, OUT_SET_ROW, 'Список соединённых входов :')
|
||||
set_dev($scrl_out_set/tbl_out_set, dev, row_type, OUT_SET_ROW, 'Список соединённых входов :', [250, 100, 70, 70, 70, 100])
|
||||
var mode = $scrl_out_set/tbl_out_set.get_node2(5, 0)
|
||||
for opt in OUT_MODE:
|
||||
mode.add_item(opt)
|
||||
@@ -276,9 +276,10 @@ func set_out_dev(dev):
|
||||
## Выбор входного или выходного устройства [param tbl] - таблица, [param dev] - устройство,
|
||||
## [param row_type] - массив с типами колонок, [param row_type_conn] - массив с пустыми LineEdit
|
||||
## [param lbl_text] - текст отображаемый во 2 строке: пример: ('Список соединённых входов :')
|
||||
func set_dev(tbl, dev, row_type, row_type_conn, lbl_text):
|
||||
func set_dev(tbl, dev, row_type, row_type_conn, lbl_text, row_size):
|
||||
tbl.clear_rows()
|
||||
tbl.add_row(row_type)
|
||||
tbl.set_columns_min_size(row_size)
|
||||
var le_name: LineEdit = tbl.get_node2(0, 0)
|
||||
le_name.editable = false
|
||||
le_name.text = dev.dev_name
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dab6loryocc73"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/ЭМС.gd" id="1_yxwqu"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="2_613yt"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd60btbqnpiqw" path="res://data/document-new-0.png" id="3_y7t8c"]
|
||||
[ext_resource type="Texture2D" uid="uid://coqg6wsftvtxr" path="res://data/document-save-0.png" id="4_isl7c"]
|
||||
[ext_resource type="Texture2D" uid="uid://cywuevvpkxl7v" path="res://data/edit-copy-0.png" id="5_43oc1"]
|
||||
[ext_resource type="Texture2D" uid="uid://7h55yvh84cve" path="res://data/connect.png" id="6_yao2u"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjsr544qccftu" path="res://data/disconnect.png" id="7_kiwau"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="8_p4lbb"]
|
||||
[ext_resource type="Script" path="res://scenes/ЭМС.gd" id="1_1nxn8"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="2_wuf8c"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd60btbqnpiqw" path="res://data/document-new-0.png" id="3_ht4vy"]
|
||||
[ext_resource type="Texture2D" uid="uid://coqg6wsftvtxr" path="res://data/document-save-0.png" id="4_1lt1r"]
|
||||
[ext_resource type="Texture2D" uid="uid://cywuevvpkxl7v" path="res://data/edit-copy-0.png" id="5_6msm4"]
|
||||
[ext_resource type="Texture2D" uid="uid://7h55yvh84cve" path="res://data/connect.png" id="6_4iewi"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjsr544qccftu" path="res://data/disconnect.png" id="7_fxg53"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="8_bdyv5"]
|
||||
|
||||
[node name="ЭМС" type="Panel"]
|
||||
offset_right = 1598.0
|
||||
offset_bottom = 1201.0
|
||||
script = ExtResource("1_yxwqu")
|
||||
script = ExtResource("1_1nxn8")
|
||||
|
||||
[node name="lbl_online" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -23,7 +23,7 @@ offset_bottom = 30.0
|
||||
theme_override_colors/font_color = Color(0, 0.647059, 0.184314, 1)
|
||||
text = "Ячейка на связи"
|
||||
|
||||
[node name="btn_flash_read" parent="." instance=ExtResource("2_613yt")]
|
||||
[node name="btn_flash_read" parent="." instance=ExtResource("2_wuf8c")]
|
||||
layout_mode = 0
|
||||
offset_left = 1446.0
|
||||
offset_top = 55.0
|
||||
@@ -31,7 +31,7 @@ offset_right = 1583.0
|
||||
offset_bottom = 85.0
|
||||
text = "Прочитать"
|
||||
|
||||
[node name="btn_flash_write" parent="." instance=ExtResource("2_613yt")]
|
||||
[node name="btn_flash_write" parent="." instance=ExtResource("2_wuf8c")]
|
||||
layout_mode = 0
|
||||
offset_left = 1446.0
|
||||
offset_top = 99.0
|
||||
@@ -48,7 +48,7 @@ offset_bottom = 1016.0
|
||||
focus_mode = 0
|
||||
shortcut_feedback = false
|
||||
shortcut_in_tooltip = false
|
||||
icon = ExtResource("3_y7t8c")
|
||||
icon = ExtResource("3_ht4vy")
|
||||
|
||||
[node name="btn_save" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -57,7 +57,7 @@ offset_top = 1017.0
|
||||
offset_right = 1509.0
|
||||
offset_bottom = 1073.0
|
||||
focus_mode = 0
|
||||
icon = ExtResource("4_isl7c")
|
||||
icon = ExtResource("4_1lt1r")
|
||||
|
||||
[node name="btn_copy" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -66,7 +66,7 @@ offset_top = 1074.0
|
||||
offset_right = 1510.0
|
||||
offset_bottom = 1130.0
|
||||
focus_mode = 0
|
||||
icon = ExtResource("5_43oc1")
|
||||
icon = ExtResource("5_6msm4")
|
||||
|
||||
[node name="btn_connect" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -76,7 +76,7 @@ offset_right = 683.0
|
||||
offset_bottom = 111.0
|
||||
focus_mode = 0
|
||||
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
|
||||
icon = ExtResource("6_yao2u")
|
||||
icon = ExtResource("6_4iewi")
|
||||
|
||||
[node name="btn_disconnect" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -86,7 +86,7 @@ offset_right = 770.0
|
||||
offset_bottom = 815.0
|
||||
focus_mode = 0
|
||||
theme_override_colors/icon_normal_color = Color(1, 1, 1, 1)
|
||||
icon = ExtResource("7_kiwau")
|
||||
icon = ExtResource("7_fxg53")
|
||||
|
||||
[node name="scrollin" type="ScrollContainer" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -97,7 +97,7 @@ offset_bottom = 679.0
|
||||
|
||||
[node name="tbl_in" type="GridContainer" parent="scrollin"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("8_p4lbb")
|
||||
script = ExtResource("8_bdyv5")
|
||||
|
||||
[node name="scrl_files" type="ScrollContainer" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -108,7 +108,7 @@ offset_bottom = 1166.0
|
||||
|
||||
[node name="tbl_files" type="GridContainer" parent="scrl_files"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("8_p4lbb")
|
||||
script = ExtResource("8_bdyv5")
|
||||
|
||||
[node name="scrollout" type="ScrollContainer" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -119,7 +119,7 @@ offset_bottom = 679.0
|
||||
|
||||
[node name="tbl_out" type="GridContainer" parent="scrollout"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("8_p4lbb")
|
||||
script = ExtResource("8_bdyv5")
|
||||
|
||||
[node name="scrl_in_set" type="ScrollContainer" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -130,7 +130,7 @@ offset_bottom = 942.0
|
||||
|
||||
[node name="tbl_in_set" type="GridContainer" parent="scrl_in_set"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("8_p4lbb")
|
||||
script = ExtResource("8_bdyv5")
|
||||
|
||||
[node name="scrl_out_set" type="ScrollContainer" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -141,4 +141,4 @@ offset_bottom = 924.0
|
||||
|
||||
[node name="tbl_out_set" type="GridContainer" parent="scrl_out_set"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("8_p4lbb")
|
||||
script = ExtResource("8_bdyv5")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://trt0q8th3bn2"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/журнал.gd" id="1_4bknr"]
|
||||
[ext_resource type="Script" path="res://addons/godot-logger/scripts/logger_output.gd" id="2_4e6at"]
|
||||
[ext_resource type="Script" path="res://scenes/журнал.gd" id="1_fwq1t"]
|
||||
[ext_resource type="Script" path="res://addons/godot-logger/scripts/logger_output.gd" id="2_m6ebo"]
|
||||
|
||||
[node name="журнал" type="Panel"]
|
||||
anchors_preset = 15
|
||||
@@ -13,7 +13,7 @@ offset_right = -2.0
|
||||
offset_bottom = -1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_4bknr")
|
||||
script = ExtResource("1_fwq1t")
|
||||
|
||||
[node name="content" type="RichTextLabel" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -26,7 +26,7 @@ theme_override_colors/selection_color = Color(0.72549, 0.270588, 0.133333, 1)
|
||||
threaded = true
|
||||
selection_enabled = true
|
||||
deselect_on_focus_loss_enabled = false
|
||||
script = ExtResource("2_4e6at")
|
||||
script = ExtResource("2_m6ebo")
|
||||
|
||||
[node name="btn_save" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -46,8 +46,8 @@ text = "Очистить"
|
||||
|
||||
[node name="dlg_file" type="FileDialog" parent="."]
|
||||
gui_embed_subwindows = true
|
||||
title = "Сохранить журнал работы в файл"
|
||||
initial_position = 2
|
||||
title = "Сохранить журнал работы в файл"
|
||||
size = Vector2i(900, 900)
|
||||
borderless = true
|
||||
ok_button_text = "Да"
|
||||
|
||||
@@ -51,50 +51,6 @@ func _ready() -> void:
|
||||
|
||||
for key in units: Log.info('%s %s:%d' % [units[key].name, key[0], key[1]])
|
||||
|
||||
var timer_interfer: = Timer.new()
|
||||
add_child(timer_interfer)
|
||||
timer_interfer.connect('timeout', Callable(self, 'on_timer_interfer'))
|
||||
timer_interfer.start(0.3)
|
||||
|
||||
|
||||
func on_timer_interfer():
|
||||
var interfer = {}
|
||||
var random = RandomNumberGenerator.new()
|
||||
random.randomize()
|
||||
interfer['ts'] = 6
|
||||
interfer['ss'] = 0
|
||||
interfer['ispp'] = random.randi_range(1, 10)
|
||||
interfer['krp'] = 'pdm2'
|
||||
interfer['powp'] = random.randi_range(0, 10)
|
||||
interfer['kni'] = random.randi_range(0, 360)
|
||||
interfer['params'] = {'freq':random.randi_range(400, 6000), 'width': 20}
|
||||
interfer['get'] = []
|
||||
var json = JSON.new().stringify(interfer)
|
||||
var pac = json.to_utf8_buffer()
|
||||
sock_capsrpb.set_dest_address(repsettings.UnitProfiles['уарэп-капсрпб-отп'][1], repsettings.UnitProfiles['уарэп-капсрпб-отп'][2])
|
||||
sock_capsrpb.put_packet(pac)
|
||||
|
||||
var msg_type8 = {}
|
||||
var time = Time.get_datetime_dict_from_system()
|
||||
msg_type8['ts'] = 8
|
||||
msg_type8['ss'] = 0
|
||||
msg_type8['roll'] = 0
|
||||
msg_type8['trim'] = 0
|
||||
msg_type8['year'] = time['year']
|
||||
msg_type8['month'] = time['month']
|
||||
msg_type8['day'] = time['day']
|
||||
msg_type8['hour'] = time['hour']
|
||||
msg_type8['minute'] = time['minute']
|
||||
msg_type8['second'] = time['second']
|
||||
msg_type8['long'] = 38.4324
|
||||
msg_type8['lat'] = 43.5353
|
||||
msg_type8['course'] = 264
|
||||
msg_type8['speed'] = 10
|
||||
json = JSON.new().stringify(msg_type8)
|
||||
pac = json.to_utf8_buffer()
|
||||
sock_capsrpb.set_dest_address(repsettings.UnitProfiles['уарэп-капсрпб-отп'][1], repsettings.UnitProfiles['уарэп-капсрпб-отп'][2])
|
||||
sock_capsrpb.put_packet(pac)
|
||||
|
||||
|
||||
func poll_receive(sock: Socket, tick: int) -> bool:
|
||||
while sock.get_available_packet_count() > 0:
|
||||
|
||||
Reference in New Issue
Block a user