ENH: update some check jobs of SelectMachineDialog

jira: [STUDIO-11883]
Change-Id: I730030c06fa819f06390583a666029b8d7b670f5
This commit is contained in:
xin.zhang 2025-05-15 10:37:32 +08:00 committed by lane.wei
parent a209330b7a
commit b59fac3687
3 changed files with 20 additions and 21 deletions

View File

@ -83,7 +83,7 @@ wxString PrePrintChecker::get_pre_state_msg(PrintDialogStatus status)
case PrintStatusWarningKvalueNotUsed: return _L("Set dynamic flow calibration to 'OFF' to enable custom dynamic flow value."); case PrintStatusWarningKvalueNotUsed: return _L("Set dynamic flow calibration to 'OFF' to enable custom dynamic flow value.");
case PrintStatusNotSupportedPrintAll: return _L("This printer does not support printing all plates"); case PrintStatusNotSupportedPrintAll: return _L("This printer does not support printing all plates");
case PrintStatusWarningTpuRightColdPulling: return _L("Please cold pull before printing TPU to avoid clogging. You may use cold pull maintenance on the printer."); case PrintStatusWarningTpuRightColdPulling: return _L("Please cold pull before printing TPU to avoid clogging. You may use cold pull maintenance on the printer.");
case PrintStatusFilamentHighChamberTempCloseDoor: return _L("High chamber temperature is required. Please close the door."); case PrintStatusFilamentWarningHighChamberTempCloseDoor: return _L("High chamber temperature is required. Please close the door.");
} }
return wxEmptyString; return wxEmptyString;
} }

View File

@ -87,9 +87,9 @@ enum PrintDialogStatus : unsigned int {
PrintStatusWarningKvalueNotUsed, PrintStatusWarningKvalueNotUsed,
PrintStatusWarningTpuRightColdPulling, PrintStatusWarningTpuRightColdPulling,
PrintStatusHasFilamentInBlackListWarning, PrintStatusHasFilamentInBlackListWarning,
PrintStatusFilamentHighChamberTempCloseDoor, PrintStatusFilamentWarningHighChamberTempCloseDoor,
PrintStatusFilamentHighChamberTempSoft, PrintStatusFilamentWarningHighChamberTempSoft,
PrintStatusUnknownFilamentHighChamberTempSoft, PrintStatusFilamentWarningUnknownHighChamberTempSoft,
PrintStatusFilamentWarningEnd, PrintStatusFilamentWarningEnd,
PrintStatusWarningEnd,//->end error<- PrintStatusWarningEnd,//->end error<-
@ -123,12 +123,12 @@ public:
static ::std::string get_print_status_info(PrintDialogStatus status); static ::std::string get_print_status_info(PrintDialogStatus status);
wxString get_pre_state_msg(PrintDialogStatus status); wxString get_pre_state_msg(PrintDialogStatus status);
bool is_error(PrintDialogStatus status) { return (PrintStatusErrorBegin < status) && (PrintStatusErrorEnd > status); }; static bool is_error(PrintDialogStatus status) { return (PrintStatusErrorBegin < status) && (PrintStatusErrorEnd > status); };
bool is_error_printer(PrintDialogStatus status) { return (PrintStatusPrinterErrorBegin < status) && (PrintStatusPrinterErrorEnd > status); }; static bool is_error_printer(PrintDialogStatus status) { return (PrintStatusPrinterErrorBegin < status) && (PrintStatusPrinterErrorEnd > status); };
bool is_error_filament(PrintDialogStatus status) { return (PrintStatusFilamentErrorBegin < status) && (PrintStatusFilamentErrorEnd > status); }; static bool is_error_filament(PrintDialogStatus status) { return (PrintStatusFilamentErrorBegin < status) && (PrintStatusFilamentErrorEnd > status); };
bool is_warning(PrintDialogStatus status) { return (PrintStatusWarningBegin < status) && (PrintStatusWarningEnd > status); }; static bool is_warning(PrintDialogStatus status) { return (PrintStatusWarningBegin < status) && (PrintStatusWarningEnd > status); };
bool is_warning_printer(PrintDialogStatus status) { return (PrintStatusPrinterWarningBegin < status) && (PrintStatusPrinterWarningEnd > status); }; static bool is_warning_printer(PrintDialogStatus status) { return (PrintStatusPrinterWarningBegin < status) && (PrintStatusPrinterWarningEnd > status); };
bool is_warning_filament(PrintDialogStatus status) { return (PrintStatusFilamentWarningBegin < status) && (PrintStatusFilamentWarningEnd > status); }; static bool is_warning_filament(PrintDialogStatus status) { return (PrintStatusFilamentWarningBegin < status) && (PrintStatusFilamentWarningEnd > status); };
}; };
//class PrePrintMsgBoard : public wxWindow //class PrePrintMsgBoard : public wxWindow
//{ //{

View File

@ -1740,10 +1740,10 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
} else if (status == PrintStatusWarningTpuRightColdPulling) { } else if (status == PrintStatusWarningTpuRightColdPulling) {
Enable_Refresh_Button(true); Enable_Refresh_Button(true);
Enable_Send_Button(true); Enable_Send_Button(true);
} else if (status == PrintStatusFilamentHighChamberTempCloseDoor) { } else if (status == PrintStatusFilamentWarningHighChamberTempCloseDoor) {
Enable_Refresh_Button(true); Enable_Refresh_Button(true);
Enable_Send_Button(true); Enable_Send_Button(true);
} else if (status == PrintDialogStatus::PrintStatusFilamentHighChamberTempSoft || status == PrintDialogStatus::PrintStatusUnknownFilamentHighChamberTempSoft) { } else if (status == PrintDialogStatus::PrintStatusFilamentWarningHighChamberTempSoft || status == PrintDialogStatus::PrintStatusFilamentWarningUnknownHighChamberTempSoft) {
Enable_Refresh_Button(true); Enable_Refresh_Button(true);
Enable_Send_Button(true); Enable_Send_Button(true);
} }
@ -3573,14 +3573,13 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
{ {
try try
{ {
int fila_id = atoi(item.filament_id.c_str()); int chamber_temp = chamber_temperatures->values[item.id];
int chamber_temp = chamber_temperatures->values[fila_id];
// check close door // check close door
if (obj_->is_support_chamber_edit && chamber_temp >= obj_->chamber_temp_switch_heat) if (chamber_temp >= obj_->chamber_temp_switch_heat)
{ {
show_status(PrintDialogStatus::PrintStatusFilamentHighChamberTempCloseDoor); show_status(PrintDialogStatus::PrintStatusFilamentWarningHighChamberTempCloseDoor);
// return; if (PrePrintChecker::is_error(PrintDialogStatus::PrintStatusFilamentWarningHighChamberTempCloseDoor)) { return; }
} }
// check vitrification // check vitrification
@ -3607,15 +3606,15 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
if (!known_fila_soften_extruders.empty()) { if (!known_fila_soften_extruders.empty()) {
const wxString& msg = wxString::Format(_L("The filament on %s may soften. Please unload."), const wxString& msg = wxString::Format(_L("The filament on %s may soften. Please unload."),
_get_ext_loc_str(known_fila_soften_extruders, obj_->m_extder_data.total_extder_count)); _get_ext_loc_str(known_fila_soften_extruders, obj_->m_extder_data.total_extder_count));
show_status(PrintDialogStatus::PrintStatusFilamentHighChamberTempSoft, std::vector<wxString> {msg}); show_status(PrintDialogStatus::PrintStatusFilamentWarningHighChamberTempSoft, std::vector<wxString> {msg});
return; if (PrePrintChecker::is_error(PrintDialogStatus::PrintStatusFilamentWarningHighChamberTempSoft)) { return; }
} }
if (!unknown_fila_soften_extruders.empty()) { if (!unknown_fila_soften_extruders.empty()) {
const wxString& msg = wxString::Format(_L("The filament on %s is unknown and may soften. Please set filament."), const wxString& msg = wxString::Format(_L("The filament on %s is unknown and may soften. Please set filament."),
_get_ext_loc_str(unknown_fila_soften_extruders, obj_->m_extder_data.total_extder_count)); _get_ext_loc_str(unknown_fila_soften_extruders, obj_->m_extder_data.total_extder_count));
show_status(PrintDialogStatus::PrintStatusUnknownFilamentHighChamberTempSoft, std::vector<wxString> {msg}); show_status(PrintDialogStatus::PrintStatusFilamentWarningUnknownHighChamberTempSoft, std::vector<wxString> {msg});
return; if (PrePrintChecker::is_error(PrintDialogStatus::PrintStatusFilamentWarningUnknownHighChamberTempSoft)) { return; }
} }
/** normal check **/ /** normal check **/