commit release

This commit is contained in:
lepshiy
2025-02-05 11:31:30 +03:00
parent b361b692c6
commit 496572e03a
4 changed files with 14 additions and 6 deletions

View File

@@ -3,5 +3,6 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="library" name="GdSdk Master" level="project" />
</component>
</module>

View File

@@ -1 +0,0 @@
[]

View File

@@ -33,7 +33,7 @@ window/size/viewport_height=940
[editor]
run/main_run_args="-- testsave-path D://PRD-TU-MP550//testsave//"
run/main_run_args="-- testsave-path D://PRD-TU-MP550//"
[rendering]

View File

@@ -12,7 +12,7 @@ var CONTROL_TABLE: Array
var isa_from_yau07b: Dictionary = {}
var JSOON = JSON.new()
var status_pribor = null
var save_path = "D://PRD-TU-MP550//save//"
var save_path = "D://temp//"
var need_port: Array = [
0x122,
@@ -30,7 +30,6 @@ func _ready() -> void:
if args[i] == "testsave-path" and i + 1 < args.size():
save_path = args[i + 1]
break
print("путь сохранения: ", save_path)
# Таблица УКП_1
node_select1 = $TabContainer/PRD/body_grid/litera_2_4_6/table_ukp_1
@@ -194,11 +193,18 @@ func _on_mfs_select() -> void:
func _on_save_config():
var da = DirAccess.open(save_path)
var base_path = save_path + "save//"
if da == null:
return
else:
da.dir_exists(base_path)
da.make_dir_recursive(base_path)
var file_dialog = FileDialog.new()
file_dialog.title = "Сохранить файл как"
file_dialog.set_size(Vector2(600, 400))
file_dialog.mode = FileDialog.FILE_MODE_SAVE_FILE
file_dialog.current_dir = save_path
file_dialog.current_dir = base_path
file_dialog.set_current_file("ЭМС-Г" + "-" + status_pribor)
file_dialog.connect("file_selected", Callable(self, "_save_selected_file"))
add_child(file_dialog)
@@ -206,6 +212,7 @@ func _on_save_config():
func _save_selected_file(file_path: String):
var data = Constants.EMS_G_PORT_DATA_HOLDER
var param_ems_g: Dictionary = {}
var other_data: Dictionary = {}
@@ -263,10 +270,11 @@ func _on_file_selected(file_path: String):
func _on_load_config():
var file_dialog = FileDialog.new()
var base_path = save_path + "save//"
file_dialog.set_title("Выберите файл")
file_dialog.set_size(Vector2(600, 400))
file_dialog.current_dir = save_path
file_dialog.access = FileDialog.ACCESS_FILESYSTEM
file_dialog.current_dir = base_path
add_child(file_dialog)
file_dialog.popup_centered()