ENH: add nozzle initialization check

jira: none
Change-Id: I9378295113c78c1775fa396d592501758d888182
(cherry picked from commit 9c1d6b206722523d79cf07bec25d7866844e4eae)
This commit is contained in:
zhimin.zeng
2024-12-24 20:10:09 +08:00
committed by Noisyfox
parent e5e121a036
commit 50daf0b5ca
3 changed files with 52 additions and 13 deletions

View File

@@ -173,7 +173,7 @@ static bool is_same_nozzle_type(const DynamicPrintConfig &full_config, const Mac
if (abs(filament_nozzle_hrc) > abs(printer_nozzle_hrc)) {
BOOST_LOG_TRIVIAL(info) << "filaments hardness mismatch: printer_nozzle_hrc = " << printer_nozzle_hrc << ", filament_nozzle_hrc = " << filament_nozzle_hrc;
std::string filament_type = full_config.opt_string("filament_type", 0);
error_msg = wxString::Format(_L("*Printing %s material with %s may cause nozzle damage"), filament_type, to_wstring_name(NozzleTypeEumnToStr[obj->m_extder_data.extders[0].current_nozzle_type]));
error_msg = wxString::Format(_L("Printing %1s material with %2s nozzle may cause nozzle damage."), filament_type, to_wstring_name(NozzleTypeEumnToStr[obj->m_extder_data.extders[0].current_nozzle_type]));
error_msg += "\n";
MessageDialog msg_dlg(nullptr, error_msg, wxEmptyString, wxICON_WARNING | wxOK | wxCANCEL);
@@ -205,6 +205,9 @@ static bool check_nozzle_diameter_and_type(const DynamicPrintConfig &full_config
return false;
}
if (!check_printer_initialized(obj))
return false;
// P1P/S
if (obj->m_extder_data.extders[0].current_nozzle_type == NozzleType::ntUndefine)
return true;