Allow printing even if nozzle info isn't reported by firmware. (#12814)

* Don't assume 0.4mm nozzle; format as "unknown" if not defined.

* Skip nozzle diameter and hardness checks if nozzle info unknown.

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Kevin Lynagh
2026-04-06 06:40:36 +02:00
committed by GitHub
parent 5308fb5961
commit 5ba71e1198
6 changed files with 42 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
#include "GUI.hpp"
#include "GUI_Utils.hpp"
#include "GUI_App.hpp"
#include "I18N.hpp"
#include <algorithm>
#include <boost/lexical_cast.hpp>
@@ -32,6 +33,15 @@ wxDEFINE_EVENT(EVT_VOLUME_ATTACHED, VolumeAttachedEvent);
wxDEFINE_EVENT(EVT_VOLUME_DETACHED, VolumeDetachedEvent);
#endif // _WIN32
wxString format_nozzle_diameter(float diameter)
{
if (diameter <= 0.0f) {
return _L("Unknown");
}
return wxString::Format("%smm", wxString::FromDouble(diameter));
}
CopyFileResult copy_file_gui(const std::string &from, const std::string &to, std::string& error_message, const bool with_check)
{
#ifdef WIN32