From f4809e78880e58c8f25e6c0f17223d977fa00810 Mon Sep 17 00:00:00 2001 From: vlapa Date: Sat, 13 Jun 2026 22:51:53 +0300 Subject: First --- SOURCE/Viewer_vesy/LoadSetup.pde | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 SOURCE/Viewer_vesy/LoadSetup.pde (limited to 'SOURCE/Viewer_vesy/LoadSetup.pde') diff --git a/SOURCE/Viewer_vesy/LoadSetup.pde b/SOURCE/Viewer_vesy/LoadSetup.pde new file mode 100644 index 0000000..b7c4a49 --- /dev/null +++ b/SOURCE/Viewer_vesy/LoadSetup.pde @@ -0,0 +1,32 @@ +//***************************************************** +// чтение файла настроек и данных +// все настройки, клиенты, камазы и 1 взвешивания = data/ + +void loadSetup() { + JSONArray values; + + // Считываем путь до папки с настройками из put/sourse.json: + try { + values = loadJSONArray(put + "source.json"); // = data/ + ... // Ядиск + for (int i = 0; i < values.size(); i++) { + JSONObject animal = values.getJSONObject(i); + filePath = animal.getString("filePath"); // адрес папки с Ядиск + println(filePath); + } + } + catch (Exception e) { + printFileLog("File 'source.json' - undetected"); + selectFolder("Select a folder to process:", "folderSelected"); + while (!flagWork) { + delay(100); + } + } + + values = new JSONArray(); + JSONObject animal = new JSONObject(); + animal.setString("filePath", filePath); + values.setJSONObject(0, animal); + saveJSONArray(values, "data/" + "source.json"); + + println("NEXT--->>>"); +} -- cgit v1.2.3