From b0943a2d0b8e4b2b2a1ce9e805ce808a7e4ccd78 Mon Sep 17 00:00:00 2001 From: "xin.zhang" Date: Tue, 11 Mar 2025 11:00:48 +0800 Subject: [PATCH] FIX: update the flow calibration options jira: [STUDIO-10784] Change-Id: I75c5319daf01da52ae521632d71d32813bcbb32f (cherry picked from commit 57245bd45620cffdcfce8ef623d79b284d60b3eb) --- resources/printers/BL-P001.json | 1 + resources/printers/BL-P002.json | 1 + resources/printers/C11.json | 1 + resources/printers/C12.json | 1 + resources/printers/C13.json | 1 + resources/printers/N1.json | 1 + resources/printers/N2S.json | 1 + resources/printers/version.txt | 2 +- src/slic3r/GUI/DeviceManager.cpp | 12 ++++++++---- src/slic3r/GUI/DeviceManager.hpp | 2 +- src/slic3r/GUI/SelectMachine.cpp | 23 +++++++++++++---------- 11 files changed, 30 insertions(+), 16 deletions(-) diff --git a/resources/printers/BL-P001.json b/resources/printers/BL-P001.json index e2c36e8781..5557aae3ef 100644 --- a/resources/printers/BL-P001.json +++ b/resources/printers/BL-P001.json @@ -33,6 +33,7 @@ "support_print_all": true, "support_print_without_sd": true, "support_flow_calibration": true, + "support_auto_flow_calibration": false, "support_build_plate_marker_detect": false, "support_lidar_calibration": true, "support_ai_monitoring": false, diff --git a/resources/printers/BL-P002.json b/resources/printers/BL-P002.json index ab2ea157d9..1f178d67cc 100644 --- a/resources/printers/BL-P002.json +++ b/resources/printers/BL-P002.json @@ -33,6 +33,7 @@ "support_print_all": true, "support_print_without_sd": true, "support_flow_calibration": true, + "support_auto_flow_calibration": false, "support_build_plate_marker_detect": false, "support_lidar_calibration": true, "support_ai_monitoring": false, diff --git a/resources/printers/C11.json b/resources/printers/C11.json index bc7384020d..b35ec09b27 100644 --- a/resources/printers/C11.json +++ b/resources/printers/C11.json @@ -28,6 +28,7 @@ "support_print_all": false, "support_print_without_sd": false, "support_flow_calibration": false, + "support_auto_flow_calibration": false, "support_build_plate_marker_detect": false, "support_lidar_calibration": false, "support_ai_monitoring": false, diff --git a/resources/printers/C12.json b/resources/printers/C12.json index 9461a57923..df7d28a8c6 100644 --- a/resources/printers/C12.json +++ b/resources/printers/C12.json @@ -28,6 +28,7 @@ "support_print_all": false, "support_print_without_sd": false, "support_flow_calibration": false, + "support_auto_flow_calibration": false, "support_build_plate_marker_detect": false, "support_lidar_calibration": false, "support_ai_monitoring": false, diff --git a/resources/printers/C13.json b/resources/printers/C13.json index 21efb584ad..43576f996a 100644 --- a/resources/printers/C13.json +++ b/resources/printers/C13.json @@ -34,6 +34,7 @@ "support_print_all": true, "support_print_without_sd": true, "support_flow_calibration": true, + "support_auto_flow_calibration": true, "support_build_plate_marker_detect": true, "support_lidar_calibration": true, "support_ai_monitoring": true, diff --git a/resources/printers/N1.json b/resources/printers/N1.json index ea2ad4abf9..379060d736 100644 --- a/resources/printers/N1.json +++ b/resources/printers/N1.json @@ -29,6 +29,7 @@ "support_print_all": false, "support_print_without_sd": false, "support_flow_calibration": true, + "support_auto_flow_calibration": false, "support_lidar_calibration": false, "support_ai_monitoring": false, "support_first_layer_inspect": false, diff --git a/resources/printers/N2S.json b/resources/printers/N2S.json index 7b07918247..717191314c 100644 --- a/resources/printers/N2S.json +++ b/resources/printers/N2S.json @@ -29,6 +29,7 @@ "support_print_all": false, "support_print_without_sd": false, "support_flow_calibration": true, + "support_auto_flow_calibration": false, "support_lidar_calibration": false, "support_ai_monitoring": false, "support_first_layer_inspect": false, diff --git a/resources/printers/version.txt b/resources/printers/version.txt index c9d25e727e..c042b59094 100644 --- a/resources/printers/version.txt +++ b/resources/printers/version.txt @@ -1 +1 @@ -02.00.00.04 \ No newline at end of file +02.00.00.05 \ No newline at end of file diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 344d5996a4..2520ef97a4 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -3397,10 +3397,14 @@ int MachineObject::parse_json(std::string payload, bool key_field_only) } } - if (jj.contains("support_flow_calibration")) { - if (jj["support_flow_calibration"].is_boolean()) { - is_support_auto_flow_calibration = jj["support_flow_calibration"].get(); - } + if (jj.contains("support_flow_calibration") && jj["support_flow_calibration"].is_boolean()) + { + is_support_flow_calibration = jj["support_flow_calibration"].get(); + } + + if (jj.contains("support_auto_flow_calibration") && jj["support_auto_flow_calibration"].is_boolean()) + { + is_support_auto_flow_calibration = jj["support_auto_flow_calibration"].get(); } if (jj.contains("support_print_without_sd")) { diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp index 3b4433e3f5..a10e1d0660 100644 --- a/src/slic3r/GUI/DeviceManager.hpp +++ b/src/slic3r/GUI/DeviceManager.hpp @@ -1003,7 +1003,7 @@ public: bool is_support_build_plate_marker_detect{false}; bool is_support_pa_calibration{false}; bool is_support_flow_calibration{false}; - bool is_support_auto_flow_calibration{false}; + bool is_support_auto_flow_calibration{false};/*The flag is used to distinguish auto/on/off or on/off */ bool is_support_print_without_sd{false}; bool is_support_print_all{false}; bool is_support_send_to_sdcard {false}; diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 83d01136f8..6f5302a093 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -985,27 +985,34 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj) m_checkbox_list["nozzle_offset_cali"]->Show(); m_checkbox_list["nozzle_offset_cali"]->update_options(ops_auto); m_checkbox_list["bed_leveling"]->update_options(ops_auto); - m_checkbox_list["flow_cali"]->update_options(ops_auto); m_checkbox_list["nozzle_offset_cali"]->setValue("auto"); m_checkbox_list["bed_leveling"]->setValue("auto"); - m_checkbox_list["flow_cali"]->setValue("auto"); } else { m_checkbox_list["bed_leveling"]->update_options(ops_no_auto); - m_checkbox_list["flow_cali"]->update_options(ops_auto); if (config && config->get("print", "bed_leveling") == "0") { m_checkbox_list["bed_leveling"]->setValue("off"); } else { m_checkbox_list["bed_leveling"]->setValue("on"); } + } - if (config && config->get("print", "flow_cali") == "0") { - m_checkbox_list["flow_cali"]->setValue("off"); + if (obj->is_support_flow_calibration) { + if (obj->is_support_auto_flow_calibration) { + m_checkbox_list["flow_cali"]->update_options(ops_auto); + m_checkbox_list["flow_cali"]->setValue("auto"); } else { - m_checkbox_list["flow_cali"]->setValue("on"); + m_checkbox_list["flow_cali"]->update_options(ops_no_auto); + if (config && config->get("print", "flow_cali") == "0") { + m_checkbox_list["flow_cali"]->setValue("off"); + } else { + m_checkbox_list["flow_cali"]->setValue("on"); + } } + + m_checkbox_list["flow_cali"]->Show(); } update_timelapse_enable_status(); @@ -1016,10 +1023,6 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj) m_checkbox_list["timelapse"]->setValue("on"); } - if (obj && obj->is_support_auto_flow_calibration) { - m_checkbox_list["flow_cali"]->Show(); - } - if (obj && obj->is_support_auto_leveling) { m_checkbox_list["bed_leveling"]->Show(); }