ENH: limit chamber temperature setting in cooling filt mode

Jira: [STUDIO-14035]
Change-Id: I894ecc3f1628bbdaa86fcfd8a4420e59111af7bb
(cherry picked from commit 5e95c6bcc8aa0b89661f27a4f123442857f7fec7)
This commit is contained in:
hemai
2025-09-18 14:14:01 +08:00
committed by Noisyfox
parent 2c675b1365
commit c6db0f0f85
3 changed files with 61 additions and 48 deletions

View File

@@ -161,6 +161,7 @@ void Slic3r::DevFan::ParseV2_0(const json &print_json) {
void Slic3r::DevFan::ParseV3_0(const json &device) void Slic3r::DevFan::ParseV3_0(const json &device)
{ {
if (device.contains("airduct")) { if (device.contains("airduct")) {
is_support_airduct = true;
m_air_duct_data.curren_mode = -1; m_air_duct_data.curren_mode = -1;
m_air_duct_data.modes.clear(); m_air_duct_data.modes.clear();
m_air_duct_data.parts.clear(); m_air_duct_data.parts.clear();
@@ -216,4 +217,3 @@ void Slic3r::DevFan::ParseV2_0(const json &print_json) {
} }
} }

View File

@@ -108,6 +108,7 @@ public:
}; };
bool is_at_heating_mode() const { return m_air_duct_data.curren_mode == AIR_DUCT_HEATING_INTERNAL_FILT; }; bool is_at_heating_mode() const { return m_air_duct_data.curren_mode == AIR_DUCT_HEATING_INTERNAL_FILT; };
bool is_at_cooling_mode() const { return m_air_duct_data.curren_mode == AIR_DUCT_COOLING_FILT; };
void SetSupportCoolingFilter(bool enable) { m_air_duct_data.m_support_cooling_filter = enable; } void SetSupportCoolingFilter(bool enable) { m_air_duct_data.m_support_cooling_filter = enable; }
AirDuctData GetAirDuctData() { return m_air_duct_data; }; AirDuctData GetAirDuctData() { return m_air_duct_data; };
@@ -123,6 +124,7 @@ public:
void ParseV3_0(const json &print_json); void ParseV3_0(const json &print_json);
public: public:
bool GetSupportAirduct() { return is_support_airduct; };
bool GetSupportAuxFanData() { return is_support_aux_fan; }; bool GetSupportAuxFanData() { return is_support_aux_fan; };
bool GetSupportChamberFan() { return is_support_aux_fan; }; bool GetSupportChamberFan() { return is_support_aux_fan; };
int GetHeatBreakFanSpeed() { return heatbreak_fan_speed; } int GetHeatBreakFanSpeed() { return heatbreak_fan_speed; }
@@ -137,6 +139,7 @@ private:
bool is_support_aux_fan{false}; bool is_support_aux_fan{false};
bool is_support_chamber_fan{false}; bool is_support_chamber_fan{false};
bool is_support_airduct{false};
int heatbreak_fan_speed = 0; int heatbreak_fan_speed = 0;
int cooling_fan_speed = 0; int cooling_fan_speed = 0;

View File

@@ -4092,7 +4092,17 @@ void StatusPanel::on_set_chamber_temp()
m_tempCtrl_chamber->Warning(false); m_tempCtrl_chamber->Warning(false);
} }
if (!obj->GetFan()->is_at_heating_mode() && chamber_temp >= obj->GetConfig()->GetChamberTempSwitchHeat()) if(obj->is_in_printing() && obj->GetFan()->GetSupportAirduct() && obj->GetFan()->is_at_cooling_mode())
{
#ifndef __APPLE__
MessageDialog champer_switch_head_dlg(this, _L("Chamber temperature cannot be changed in cooling mode while printing."), wxEmptyString, wxICON_WARNING | wxOK);
#else
wxMessageDialog champer_switch_head_dlg(this, _L("Chamber temperature cannot be changed in cooling mode while printing."), wxEmptyString, wxICON_WARNING | wxOK);
#endif
champer_switch_head_dlg.ShowModal();
return;
}
else if (!obj->GetFan()->is_at_heating_mode() && chamber_temp >= obj->GetConfig()->GetChamberTempSwitchHeat())
{ {
#ifndef __APPLE__ #ifndef __APPLE__
MessageDialog champer_switch_head_dlg(this, _L("If the chamber temperature exceeds 40\u2103, the system will automatically switch to heating mode. " MessageDialog champer_switch_head_dlg(this, _L("If the chamber temperature exceeds 40\u2103, the system will automatically switch to heating mode. "