From 39360790c7ccb99c197b256b6801e958613bdb86 Mon Sep 17 00:00:00 2001 From: hemai Date: Fri, 6 Jun 2025 11:06:32 +0800 Subject: [PATCH] ENH: add new error message for AMS change filament jira: STUDIO-12391 Change-Id: I358f8b09f0ce5d7d0efe91eb6dea1d89509033da (cherry picked from commit 811823be0f5ef0e919f1084eac84c491e27971ac) --- src/slic3r/GUI/DeviceManager.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 37deff9cfc..3212c6872f 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -3689,10 +3689,20 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_ if (jj["command"].get() == "ams_change_filament") { if (jj.contains("errno")) { if (jj["errno"].is_number()) { - if (jj["errno"].get() == -2) { - wxString text = _L("The current chamber temperature or the target chamber temperature exceeds 45\u2103. " /* 45°C */ - "In order to avoid extruder clogging, low temperature filament (PLA/PETG/TPU) is not allowed to be loaded."); - GUI::wxGetApp().push_notification(this, text); + if (jj.contains("soft_temp")) { + int soft_temp = jj["soft_temp"].get(); + if (jj["errno"].get() == -2) { + wxString text = wxString::Format(_L("The chamber temperature is too high, which may cause the filament to soften. Please wait until the chamber temperature drops below %d\u2103. You may open the front door or enable fans to cool down."), soft_temp); + GUI::wxGetApp().push_notification(this, text); + } else if (jj["errno"].get() == -4) { + wxString text = wxString::Format(_L("AMS temperature is too high, which may cause the filament to soften. Please wait until the AMS temperature drops below %d\u2103."), soft_temp); + GUI::wxGetApp().push_notification(this, text); + } + } else { + if (jj["errno"].get() == -2) { + wxString text = _L("The current chamber temperature or the target chamber temperature exceeds 45\u2103. In order to avoid extruder clogging,low temperature filament(PLA/PETG/TPU) is not allowed to be loaded."); + GUI::wxGetApp().push_notification(this, text); + } } } }