FIX: add a warning dialog

jira: [STUDIO-9715]
Change-Id: I376235de8a8569e63530eca914dc977a670a769c
This commit is contained in:
xin.zhang 2025-01-14 17:20:44 +08:00 committed by lane.wei
parent 541f91acec
commit 4f1ad8016e
6 changed files with 28 additions and 1 deletions

View File

@ -48,6 +48,7 @@
"support_first_layer_inspect": false, "support_first_layer_inspect": false,
"support_chamber_temp_edit": true, "support_chamber_temp_edit": true,
"support_chamber_temp_edit_range": [ 20, 65 ], "support_chamber_temp_edit_range": [ 20, 65 ],
"support_chamber_temp_switch_heating": 40,
"support_extrusion_cali": false, "support_extrusion_cali": false,
"support_user_preset": false "support_user_preset": false
}, },

View File

@ -1 +1 @@
02.00.00.01 02.00.00.02

View File

@ -3300,6 +3300,15 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
chamber_temp_edit_min = support_champer_range[0]; chamber_temp_edit_min = support_champer_range[0];
chamber_temp_edit_max = support_champer_range[1]; chamber_temp_edit_max = support_champer_range[1];
} }
if (jj.contains("support_chamber_temp_switch_heating"))
{
const auto& support_chamber_temp_switch_heating = jj["support_chamber_temp_switch_heating"];
if (support_chamber_temp_switch_heating.is_number())
{
chamber_temp_switch_heat = support_chamber_temp_switch_heating.get<long>();
}
}
} }
if (jj.contains("support_extrusion_cali")) { if (jj.contains("support_extrusion_cali")) {

View File

@ -732,6 +732,7 @@ public:
float chamber_temp_target; float chamber_temp_target;
float chamber_temp_edit_min = 0; float chamber_temp_edit_min = 0;
float chamber_temp_edit_max = 60; float chamber_temp_edit_max = 60;
long chamber_temp_switch_heat = LONG_MAX;/*default to LONG_MAX*/
float frame_temp; float frame_temp;
/* cooling */ /* cooling */

View File

@ -3874,6 +3874,18 @@ void StatusPanel::on_set_chamber_temp()
m_tempCtrl_chamber->SetTagTemp(wxString::Format("%d", chamber_temp)); m_tempCtrl_chamber->SetTagTemp(wxString::Format("%d", chamber_temp));
m_tempCtrl_chamber->Warning(false); m_tempCtrl_chamber->Warning(false);
} }
if (chamber_temp > obj->chamber_temp_switch_heat)
{
delete champer_switch_head_dlg;
champer_switch_head_dlg = new MessageDialog(nullptr, _L("If the chamber temperature exceeds 40\u2103, the system will automatically switch to heating mode. Please confirm whether to switch."), wxEmptyString, wxICON_WARNING | wxOK | wxCANCEL);
if (champer_switch_head_dlg->ShowModal() != wxID_OK)
{
return;
}
}
obj->command_set_chamber(chamber_temp); obj->command_set_chamber(chamber_temp);
} }
} }

View File

@ -40,6 +40,9 @@ class StepIndicator;
namespace Slic3r { namespace Slic3r {
namespace GUI { namespace GUI {
// Previous definitions
class MessageDialog;
enum CameraRecordingStatus { enum CameraRecordingStatus {
RECORDING_NONE, RECORDING_NONE,
RECORDING_OFF_NORMAL, RECORDING_OFF_NORMAL,
@ -569,6 +572,7 @@ protected:
SecondaryCheckDialog* ctrl_e_hint_dlg = nullptr; SecondaryCheckDialog* ctrl_e_hint_dlg = nullptr;
SecondaryCheckDialog* sdcard_hint_dlg = nullptr; SecondaryCheckDialog* sdcard_hint_dlg = nullptr;
SecondaryCheckDialog* axis_go_home_dlg = nullptr; SecondaryCheckDialog* axis_go_home_dlg = nullptr;
MessageDialog* champer_switch_head_dlg = nullptr;
FanControlPopupNew* m_fan_control_popup{nullptr}; FanControlPopupNew* m_fan_control_popup{nullptr};