ENH: add printable check before cali

jira: 8816
Change-Id: I7df5676ecc80c27b516f47efe00ac40d04a4a5c9
(cherry picked from commit 13a4edc97c5ba0fc5f8a0a7263608597ce923548)
This commit is contained in:
zhimin.zeng
2024-12-07 17:50:22 +08:00
committed by Noisyfox
parent 31b65dfbe9
commit 7a04d8d1fb
4 changed files with 140 additions and 38 deletions

View File

@@ -414,7 +414,7 @@ void CalibrationWizard::cache_preset_info(MachineObject* obj, float nozzle_dia)
if (obj->is_multi_extruders()) {
int ams_id, slot_id, tray_id;
get_tray_ams_and_slot_id(result.extruder_id, ams_id, slot_id, tray_id);
get_tray_ams_and_slot_id(result.tray_id, ams_id, slot_id, tray_id);
result.extruder_id = preset_page->get_extruder_id(ams_id);
result.nozzle_volume_type = preset_page->get_nozzle_volume_type(result.extruder_id);
}
@@ -1201,9 +1201,7 @@ void FlowRateWizard::on_cali_start(CaliPresetStage stage, float cali_value, Flow
}
wxString wx_err_string;
std::string error_message;
CalibUtils::calib_flowrate_X1C(calib_infos, error_message);
wx_err_string = from_u8(error_message);
CalibUtils::calib_flowrate_X1C(calib_infos, wx_err_string);
if (!wx_err_string.empty()) {
MessageDialog msg_dlg(nullptr, wx_err_string, wxEmptyString, wxICON_WARNING | wxOK);
msg_dlg.ShowModal();