Доработка. В Журнале добавлены фильтры.
This commit is contained in:
@@ -37,8 +37,8 @@ func _enter_tree() -> void:
|
||||
_def_settings("plugins/logger/file/file_path", "user://uarep-ctl.log")
|
||||
_def_settings("plugins/logger/file/log_file_write", true)
|
||||
|
||||
_def_settings("plugins/logger/default_output_format", "[{hour}:{minute}:{second}][{level}]{text}")
|
||||
_def_settings("plugins/logger/file_format", "[{hour}:{minute}:{second}][{level}]{text}")
|
||||
_def_settings("plugins/logger/default_output_format", "[{year}-{month}-{day} {hour}:{minute}:{second}][{level}]{text}")
|
||||
_def_settings("plugins/logger/file_format", "[{year}-{month}-{day} {hour}:{minute}:{second}][{level}]{text}")
|
||||
|
||||
add_autoload_singleton(AUTOLOAD_NAME, AUTOLOAD_PATH)
|
||||
add_custom_type(LOGGER_OUTPUT, "RichTextLabel", load(LOGGER_OUTPUT_SCRIPT), load(LOGGER_OUTPUT_ICON))
|
||||
|
||||
@@ -32,12 +32,14 @@ var _format_default_output : String
|
||||
var _format_file : String
|
||||
|
||||
var _names = {
|
||||
INFO: "INFO",
|
||||
DEBUG: "DEBUG",
|
||||
WARNING: "WARNING",
|
||||
ERROR: "ERROR",
|
||||
FATAL: "FATAL"
|
||||
INFO: "ИНФО",
|
||||
DEBUG: "ОТЛАДКА",
|
||||
WARNING: "ВНИМАНИЕ",
|
||||
ERROR: "ОШИБКА",
|
||||
FATAL: "АВАРИЯ"
|
||||
}
|
||||
var _msg_array: Array
|
||||
var _filters: Array
|
||||
|
||||
# Can be overridden to define custom default values.
|
||||
func _enter_tree() -> void:
|
||||
@@ -194,11 +196,15 @@ func message(level: int, text: String) -> void:
|
||||
msg["level"] = level
|
||||
msg["level_name"] = _names[level]
|
||||
msg["text"] = " " + text
|
||||
|
||||
logged.emit(msg)
|
||||
|
||||
_msg_array.append(msg)
|
||||
if (_flt_msg(msg)):
|
||||
logged.emit(msg)
|
||||
|
||||
|
||||
if _file_write_enabled:
|
||||
_file.store_line(format_file(msg))
|
||||
_file.call_deferred('flush')
|
||||
|
||||
if _default_output_enabled:
|
||||
print(format_stdout(msg))
|
||||
@@ -208,17 +214,54 @@ func _open_file() -> void:
|
||||
if is_instance_valid(_file) and _file.is_open():
|
||||
_file.close()
|
||||
|
||||
_file = FileAccess.open(get_file_path(), FileAccess.WRITE)
|
||||
_file = FileAccess.open(get_file_path(), FileAccess.READ_WRITE)
|
||||
|
||||
var err := FileAccess.get_open_error()
|
||||
if err:
|
||||
_file = FileAccess.open(get_file_path(), FileAccess.WRITE)
|
||||
_file.close()
|
||||
_file = FileAccess.open(get_file_path(), FileAccess.READ_WRITE)
|
||||
return print_debug(error_string(err))
|
||||
|
||||
err = _file.get_error()
|
||||
if err:
|
||||
return print_debug(error_string(err))
|
||||
|
||||
|
||||
var read = _file.get_as_text()
|
||||
_file.seek_end(0)
|
||||
|
||||
|
||||
func _close_file() -> void:
|
||||
if is_instance_valid(_file) and _file.is_open():
|
||||
_file = null
|
||||
|
||||
|
||||
func save_file(path):
|
||||
var f = FileAccess.open(path, FileAccess.WRITE)
|
||||
var err := FileAccess.get_open_error()
|
||||
if err:
|
||||
print_debug(error_string(err))
|
||||
var log_text = _file.get_as_text()
|
||||
f.store_line(log_text)
|
||||
f.close()
|
||||
|
||||
|
||||
func set_filtrs(flt_array: Array):
|
||||
_filters = flt_array
|
||||
|
||||
|
||||
func _flt_msg(msg):
|
||||
var flt_arr: Array = []
|
||||
for item in _filters:
|
||||
if item.button_pressed:
|
||||
flt_arr.append(item.get_meta('filter'))
|
||||
if msg['text'].find(item.get_meta('filter')) != -1:
|
||||
return true
|
||||
if msg['level_name'] in flt_arr:
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func add_msgs():
|
||||
for msg in _msg_array:
|
||||
if (_flt_msg(msg)):
|
||||
logged.emit(msg)
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dab6loryocc73"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/ЭМС.gd" id="1_pviu7"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="2_1ax2t"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd60btbqnpiqw" path="res://data/document-new-0.png" id="3_r066l"]
|
||||
[ext_resource type="Texture2D" uid="uid://coqg6wsftvtxr" path="res://data/document-save-0.png" id="4_acavs"]
|
||||
[ext_resource type="Texture2D" uid="uid://cywuevvpkxl7v" path="res://data/edit-copy-0.png" id="5_m3d6g"]
|
||||
[ext_resource type="Texture2D" uid="uid://7h55yvh84cve" path="res://data/connect.png" id="6_bj72w"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjsr544qccftu" path="res://data/disconnect.png" id="7_f177o"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="8_6w7lj"]
|
||||
[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"]
|
||||
|
||||
[node name="ЭМС" type="Panel"]
|
||||
offset_right = 1598.0
|
||||
offset_bottom = 1201.0
|
||||
script = ExtResource("1_pviu7")
|
||||
script = ExtResource("1_yxwqu")
|
||||
|
||||
[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_1ax2t")]
|
||||
[node name="btn_flash_read" parent="." instance=ExtResource("2_613yt")]
|
||||
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_1ax2t")]
|
||||
[node name="btn_flash_write" parent="." instance=ExtResource("2_613yt")]
|
||||
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_r066l")
|
||||
icon = ExtResource("3_y7t8c")
|
||||
|
||||
[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_acavs")
|
||||
icon = ExtResource("4_isl7c")
|
||||
|
||||
[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_m3d6g")
|
||||
icon = ExtResource("5_43oc1")
|
||||
|
||||
[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_bj72w")
|
||||
icon = ExtResource("6_yao2u")
|
||||
|
||||
[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_f177o")
|
||||
icon = ExtResource("7_kiwau")
|
||||
|
||||
[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_6w7lj")
|
||||
script = ExtResource("8_p4lbb")
|
||||
|
||||
[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_6w7lj")
|
||||
script = ExtResource("8_p4lbb")
|
||||
|
||||
[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_6w7lj")
|
||||
script = ExtResource("8_p4lbb")
|
||||
|
||||
[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_6w7lj")
|
||||
script = ExtResource("8_p4lbb")
|
||||
|
||||
[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_6w7lj")
|
||||
script = ExtResource("8_p4lbb")
|
||||
|
||||
@@ -7,6 +7,13 @@ func on_threats_changed(th: Object, msg: String): Log.message(Logger.INFO, '%s:
|
||||
func on_parse_error(unit, msg: String): Log.message(Logger.ERROR, '%s: %s' % [unit.to_string(), msg])
|
||||
|
||||
|
||||
func _enter_tree():
|
||||
var flts: Array = []
|
||||
for item in $filtrs.get_children():
|
||||
flts.append(item)
|
||||
Log.set_filtrs(flts)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Log.info('Модуль журнала работы готов')
|
||||
Log.info('Операционная система: %s' % [OS.get_distribution_name()])
|
||||
@@ -31,3 +38,12 @@ func _on_dlg_file_confirmed() -> void:
|
||||
$btn_clear.show()
|
||||
$btn_save.show()
|
||||
$dlg_file.hide()
|
||||
|
||||
|
||||
func _on_dlg_file_file_selected(path):
|
||||
Log.save_file(path)
|
||||
|
||||
|
||||
func _on_check_box_pressed():
|
||||
$content.clear()
|
||||
Log.add_msgs()
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://trt0q8th3bn2"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/журнал.gd" id="1_d0gme"]
|
||||
[ext_resource type="Script" path="res://addons/godot-logger/scripts/logger_output.gd" id="2_2i2cr"]
|
||||
[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"]
|
||||
|
||||
[node name="журнал" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -2.0
|
||||
offset_top = -1.0
|
||||
offset_right = -2.0
|
||||
offset_bottom = -1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_d0gme")
|
||||
script = ExtResource("1_4bknr")
|
||||
|
||||
[node name="content" type="RichTextLabel" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -23,7 +27,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_2i2cr")
|
||||
script = ExtResource("2_4e6at")
|
||||
|
||||
[node name="btn_save" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
@@ -49,8 +53,67 @@ size = Vector2i(900, 900)
|
||||
borderless = true
|
||||
ok_button_text = "Да"
|
||||
cancel_button_text = "Отмена"
|
||||
access = 2
|
||||
|
||||
[node name="filtrs" type="GridContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 15.0
|
||||
offset_top = 1081.0
|
||||
offset_right = 1326.0
|
||||
offset_bottom = 1115.0
|
||||
columns = 8
|
||||
|
||||
[node name="CheckBox_INFO" type="CheckBox" parent="filtrs"]
|
||||
layout_mode = 2
|
||||
button_pressed = true
|
||||
text = "ИНФО"
|
||||
metadata/filter = "ИНФО"
|
||||
|
||||
[node name="CheckBox_DEBUG" type="CheckBox" parent="filtrs"]
|
||||
layout_mode = 2
|
||||
button_pressed = true
|
||||
text = "ОТЛАДКА"
|
||||
metadata/filter = "ОТЛАДКА"
|
||||
|
||||
[node name="CheckBox_WARNING" type="CheckBox" parent="filtrs"]
|
||||
layout_mode = 2
|
||||
button_pressed = true
|
||||
text = "ВНИМАНИЕ"
|
||||
metadata/filter = "ВНИМАНИЕ"
|
||||
|
||||
[node name="CheckBox_ERROR" type="CheckBox" parent="filtrs"]
|
||||
layout_mode = 2
|
||||
button_pressed = true
|
||||
text = "ОШИБКА"
|
||||
metadata/filter = "ОШИБКА"
|
||||
|
||||
[node name="CheckBox_FATAL" type="CheckBox" parent="filtrs"]
|
||||
layout_mode = 2
|
||||
button_pressed = true
|
||||
text = "АВАРИЯ"
|
||||
metadata/filter = "АВАРИЯ"
|
||||
|
||||
[node name="CheckBox_THREAT" type="CheckBox" parent="filtrs"]
|
||||
layout_mode = 2
|
||||
button_pressed = true
|
||||
text = "Цель"
|
||||
metadata/filter = "Цель"
|
||||
|
||||
[node name="CheckBox_CONTROL" type="CheckBox" parent="filtrs"]
|
||||
layout_mode = 2
|
||||
button_pressed = true
|
||||
text = "Контроль"
|
||||
metadata/filter = "Контроль"
|
||||
|
||||
[connection signal="button_down" from="btn_save" to="." method="_on_btn_save_button_down"]
|
||||
[connection signal="button_down" from="btn_clear" to="." method="_on_clear_button_down" flags=3]
|
||||
[connection signal="canceled" from="dlg_file" to="." method="_on_dlg_file_confirmed"]
|
||||
[connection signal="confirmed" from="dlg_file" to="." method="_on_dlg_file_confirmed"]
|
||||
[connection signal="file_selected" from="dlg_file" to="." method="_on_dlg_file_file_selected"]
|
||||
[connection signal="pressed" from="filtrs/CheckBox_INFO" to="." method="_on_check_box_pressed"]
|
||||
[connection signal="pressed" from="filtrs/CheckBox_DEBUG" to="." method="_on_check_box_pressed"]
|
||||
[connection signal="pressed" from="filtrs/CheckBox_WARNING" to="." method="_on_check_box_pressed"]
|
||||
[connection signal="pressed" from="filtrs/CheckBox_ERROR" to="." method="_on_check_box_pressed"]
|
||||
[connection signal="pressed" from="filtrs/CheckBox_FATAL" to="." method="_on_check_box_pressed"]
|
||||
[connection signal="pressed" from="filtrs/CheckBox_THREAT" to="." method="_on_check_box_pressed"]
|
||||
[connection signal="pressed" from="filtrs/CheckBox_CONTROL" to="." method="_on_check_box_pressed"]
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://b276iygic5itk"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_cirhg"]
|
||||
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_5lsre"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="3_rfr42"]
|
||||
[ext_resource type="Script" path="res://scenes/scroll-threats.gd" id="4_olvla"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="5_04ppt"]
|
||||
[ext_resource type="Script" path="res://scenes/scroll-params.gd" id="6_l01tb"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="7_ex1qt"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="8_2hm8b"]
|
||||
[ext_resource type="FontFile" uid="uid://befva8r034a4v" path="res://data/DSEG7Classic-Regular.ttf" id="9_tmklf"]
|
||||
[ext_resource type="Script" path="res://scenes/работа.gd" id="1_vmjjl"]
|
||||
[ext_resource type="PackedScene" uid="uid://nl1vklubr5kr" path="res://scenes/bip.tscn" id="2_ew6j4"]
|
||||
[ext_resource type="Texture2D" uid="uid://cs6i1xwx0pmdk" path="res://data/рамка-панели.png" id="3_38cyn"]
|
||||
[ext_resource type="Script" path="res://scenes/scroll-threats.gd" id="4_6pit6"]
|
||||
[ext_resource type="Script" path="res://table/table.gd" id="5_0lwxu"]
|
||||
[ext_resource type="Script" path="res://scenes/scroll-params.gd" id="6_v4chn"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5kjdyxuwsot5" path="res://scenes/canvas.tscn" id="7_pvt8f"]
|
||||
[ext_resource type="PackedScene" uid="uid://da7w3vkhadfwe" path="res://scenes/button-flat.tscn" id="8_r2k1p"]
|
||||
[ext_resource type="FontFile" uid="uid://befva8r034a4v" path="res://data/DSEG7Classic-Regular.ttf" id="9_lr4kl"]
|
||||
|
||||
[node name="Работа" type="Panel"]
|
||||
script = ExtResource("1_cirhg")
|
||||
Bip = ExtResource("2_5lsre")
|
||||
script = ExtResource("1_vmjjl")
|
||||
Bip = ExtResource("2_ew6j4")
|
||||
col_grey = Color(0.34902, 0.643137, 0.772549, 0.168627)
|
||||
col_red = Color(1, 0.568627, 0.431373, 0.239216)
|
||||
drag_scale_band = 0.05
|
||||
@@ -40,7 +40,7 @@ offset_bottom = 1169.0
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("3_rfr42")
|
||||
texture = ExtResource("3_38cyn")
|
||||
patch_margin_left = 15
|
||||
patch_margin_top = 30
|
||||
patch_margin_right = 15
|
||||
@@ -64,18 +64,18 @@ offset_left = 4.0
|
||||
offset_top = 51.0
|
||||
offset_right = 476.0
|
||||
offset_bottom = 282.0
|
||||
script = ExtResource("4_olvla")
|
||||
script = ExtResource("4_6pit6")
|
||||
|
||||
[node name="table" type="GridContainer" parent="grd_side/frm_threats/scroll"]
|
||||
layout_mode = 2
|
||||
columns = 4
|
||||
script = ExtResource("5_04ppt")
|
||||
script = ExtResource("5_0lwxu")
|
||||
|
||||
[node name="frm_params" type="NinePatchRect" parent="grd_side"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("3_rfr42")
|
||||
texture = ExtResource("3_38cyn")
|
||||
patch_margin_left = 15
|
||||
patch_margin_top = 30
|
||||
patch_margin_right = 15
|
||||
@@ -99,17 +99,17 @@ offset_left = 4.0
|
||||
offset_top = 27.0
|
||||
offset_right = 476.0
|
||||
offset_bottom = 282.0
|
||||
script = ExtResource("6_l01tb")
|
||||
script = ExtResource("6_v4chn")
|
||||
|
||||
[node name="table" type="GridContainer" parent="grd_side/frm_params/scroll"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("5_04ppt")
|
||||
script = ExtResource("5_0lwxu")
|
||||
|
||||
[node name="frm_ecm_list" type="NinePatchRect" parent="grd_side"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("3_rfr42")
|
||||
texture = ExtResource("3_38cyn")
|
||||
patch_margin_left = 15
|
||||
patch_margin_top = 30
|
||||
patch_margin_right = 15
|
||||
@@ -136,13 +136,13 @@ offset_bottom = 285.0
|
||||
|
||||
[node name="table" type="GridContainer" parent="grd_side/frm_ecm_list/scroll"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("5_04ppt")
|
||||
script = ExtResource("5_0lwxu")
|
||||
|
||||
[node name="frm_ecm_params" type="NinePatchRect" parent="grd_side"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
texture = ExtResource("3_rfr42")
|
||||
texture = ExtResource("3_38cyn")
|
||||
patch_margin_left = 15
|
||||
patch_margin_top = 30
|
||||
patch_margin_right = 15
|
||||
@@ -169,12 +169,12 @@ offset_bottom = 282.0
|
||||
|
||||
[node name="table" type="GridContainer" parent="grd_side/frm_ecm_params/scroll"]
|
||||
layout_mode = 2
|
||||
script = ExtResource("5_04ppt")
|
||||
script = ExtResource("5_0lwxu")
|
||||
|
||||
[node name="canvas" parent="." instance=ExtResource("7_ex1qt")]
|
||||
[node name="canvas" parent="." instance=ExtResource("7_pvt8f")]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
[node name="btn_auto_threat" parent="." instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_auto_threat" parent="." instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 912.0
|
||||
offset_top = 67.0
|
||||
@@ -182,7 +182,7 @@ offset_right = 1102.0
|
||||
offset_bottom = 117.0
|
||||
text = "Автоматически"
|
||||
|
||||
[node name="btn_strobe" parent="." instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_strobe" parent="." instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 912.0
|
||||
offset_top = 6.0
|
||||
@@ -190,7 +190,7 @@ offset_right = 1102.0
|
||||
offset_bottom = 56.0
|
||||
text = "Строб"
|
||||
|
||||
[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p5" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_left = 980.0
|
||||
@@ -202,7 +202,7 @@ grow_vertical = 2
|
||||
text = "ОЗП-1"
|
||||
metadata/rfi_name = "ozp1"
|
||||
|
||||
[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p6" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 840.0
|
||||
offset_top = 1118.0
|
||||
@@ -211,7 +211,7 @@ offset_bottom = 1168.0
|
||||
text = "СВ-М2"
|
||||
metadata/rfi_name = "svm2"
|
||||
|
||||
[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p7" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 910.0
|
||||
offset_top = 1118.0
|
||||
@@ -220,7 +220,7 @@ offset_bottom = 1168.0
|
||||
text = "K1"
|
||||
metadata/rfi_name = "k1"
|
||||
|
||||
[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p8" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 770.0
|
||||
offset_top = 1118.0
|
||||
@@ -229,7 +229,7 @@ offset_bottom = 1168.0
|
||||
text = "СВ-И1"
|
||||
metadata/rfi_name = "svi1"
|
||||
|
||||
[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p9" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 700.0
|
||||
offset_top = 1118.0
|
||||
@@ -238,7 +238,7 @@ offset_bottom = 1168.0
|
||||
text = "ПД-ЧМ"
|
||||
metadata/rfi_name = "pdchm"
|
||||
|
||||
[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p10" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_left = 630.0
|
||||
@@ -250,7 +250,7 @@ grow_vertical = 2
|
||||
text = "ПД-М4С"
|
||||
metadata/rfi_name = "pdm4s"
|
||||
|
||||
[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p11" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 350.0
|
||||
offset_top = 1118.0
|
||||
@@ -259,7 +259,7 @@ offset_bottom = 1168.0
|
||||
text = "ЛЧМ-1"
|
||||
metadata/rfi_name = "lchm1"
|
||||
|
||||
[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p12" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_left = 420.0
|
||||
@@ -271,7 +271,7 @@ grow_vertical = 2
|
||||
text = "МЧМ-1"
|
||||
metadata/rfi_name = "mchm1"
|
||||
|
||||
[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p13" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_left = 490.0
|
||||
@@ -283,7 +283,7 @@ grow_vertical = 2
|
||||
text = "ПД-М2"
|
||||
metadata/rfi_name = "pdm2"
|
||||
|
||||
[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p14" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_left = 560.0
|
||||
@@ -295,7 +295,7 @@ grow_vertical = 2
|
||||
text = "ПД-М4"
|
||||
metadata/rfi_name = "pdm4"
|
||||
|
||||
[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p15" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
offset_left = 280.0
|
||||
@@ -307,7 +307,7 @@ grow_vertical = 2
|
||||
text = "СРН-М2"
|
||||
metadata/rfi_name = "srnm2"
|
||||
|
||||
[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_p16" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 210.0
|
||||
offset_top = 1118.0
|
||||
@@ -316,7 +316,7 @@ offset_bottom = 1168.0
|
||||
text = "СРН-И1"
|
||||
metadata/rfi_name = "srni1"
|
||||
|
||||
[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_off" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 140.0
|
||||
offset_top = 1118.0
|
||||
@@ -326,7 +326,7 @@ text = "Откл."
|
||||
pressed = true
|
||||
metadata/rfi_name = "<off>"
|
||||
|
||||
[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_2hm8b")]
|
||||
[node name="btn_auto_rfi" parent="." groups=["группа-режим-помехи"] instance=ExtResource("8_r2k1p")]
|
||||
layout_mode = 0
|
||||
offset_left = 10.0
|
||||
offset_top = 1118.0
|
||||
@@ -342,7 +342,7 @@ offset_left = 96.0
|
||||
offset_top = 109.0
|
||||
offset_right = 164.0
|
||||
offset_bottom = 142.0
|
||||
theme_override_fonts/font = ExtResource("9_tmklf")
|
||||
theme_override_fonts/font = ExtResource("9_lr4kl")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "88"
|
||||
vertical_alignment = 1
|
||||
@@ -351,7 +351,7 @@ vertical_alignment = 1
|
||||
layout_mode = 0
|
||||
offset_right = 68.0
|
||||
offset_bottom = 33.0
|
||||
theme_override_fonts/font = ExtResource("9_tmklf")
|
||||
theme_override_fonts/font = ExtResource("9_lr4kl")
|
||||
theme_override_font_sizes/font_size = 20
|
||||
text = "00"
|
||||
vertical_alignment = 1
|
||||
@@ -363,7 +363,7 @@ offset_left = 96.0
|
||||
offset_top = 29.0
|
||||
offset_right = 188.0
|
||||
offset_bottom = 88.0
|
||||
theme_override_fonts/font = ExtResource("9_tmklf")
|
||||
theme_override_fonts/font = ExtResource("9_lr4kl")
|
||||
theme_override_font_sizes/font_size = 56
|
||||
text = "88"
|
||||
|
||||
@@ -371,7 +371,7 @@ text = "88"
|
||||
layout_mode = 0
|
||||
offset_right = 92.0
|
||||
offset_bottom = 59.0
|
||||
theme_override_fonts/font = ExtResource("9_tmklf")
|
||||
theme_override_fonts/font = ExtResource("9_lr4kl")
|
||||
theme_override_font_sizes/font_size = 56
|
||||
text = "00"
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ func on_timer_interfer():
|
||||
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.set_dest_address(repsettings.UnitProfiles['уарэп-капсрпб-отп'][1], repsettings.UnitProfiles['уарэп-капсрпб-отп'][2])
|
||||
sock_capsrpb.put_packet(pac)
|
||||
|
||||
var msg_type8 = {}
|
||||
@@ -92,7 +92,7 @@ func on_timer_interfer():
|
||||
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.set_dest_address(repsettings.UnitProfiles['уарэп-капсрпб-отп'][1], repsettings.UnitProfiles['уарэп-капсрпб-отп'][2])
|
||||
sock_capsrpb.put_packet(pac)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user