ENH:change SD card to external storage

jira:[none ]

Change-Id: Ia8fb38151f75433344a085196728752d2fe6f159
(cherry picked from commit 6c7b61fcd8aefd9ad9da56da8b55e0c06865a677)
This commit is contained in:
tao wang
2024-12-11 11:46:29 +08:00
committed by Noisyfox
parent e340573415
commit a88beb02d1
9 changed files with 35 additions and 31 deletions

View File

@@ -123,7 +123,7 @@ wxString PrintJob::get_http_error_msg(unsigned int status, std::string body)
;
}
return wxEmptyString;
}
}
void PrintJob::process(Ctl &ctl)
{
@@ -269,8 +269,8 @@ void PrintJob::process(Ctl &ctl)
params.preset_name = profile_name->second;
}
catch (...) {}
}
}
auto model_name = model_info->metadata_items.find(BBL_DESIGNER_MODEL_TITLE_TAG);
if (model_name != model_info->metadata_items.end()) {
try {
@@ -355,9 +355,9 @@ void PrintJob::process(Ctl &ctl)
auto update_fn = [this, &ctl,
&is_try_lan_mode,
&is_try_lan_mode_failed,
&msg,
&error_str,
&curr_percent,
&msg,
&error_str,
&curr_percent,
&error_text,
StagePercentPoint
](int stage, int code, std::string info) {
@@ -420,7 +420,7 @@ void PrintJob::process(Ctl &ctl)
}
}
//get errors
//get errors
if (code > 100 || code < 0 || stage == BBL::SendingPrintJobStage::PrintingStageERROR) {
if (code == BAMBU_NETWORK_ERR_PRINT_WR_FILE_OVER_SIZE || code == BAMBU_NETWORK_ERR_PRINT_SP_FILE_OVER_SIZE) {
m_plater->update_print_error_info(code, desc_file_too_large, info);
@@ -441,7 +441,7 @@ void PrintJob::process(Ctl &ctl)
return ctl.was_canceled();
};
DeviceManager* dev = wxGetApp().getDeviceManager();
MachineObject* obj = dev->get_selected_machine();
@@ -559,13 +559,13 @@ void PrintJob::process(Ctl &ctl)
ctl.update_status(curr_percent, _u8L("Sending print job through cloud service"));
result = m_agent->start_print(params, update_fn, cancel_fn, wait_fn);
}
}
}
} else {
if (this->has_sdcard) {
ctl.update_status(curr_percent, _u8L("Sending print job over LAN"));
result = m_agent->start_local_print(params, update_fn, cancel_fn);
} else {
ctl.update_status(curr_percent, _u8L("An SD card needs to be inserted before printing via LAN."));
ctl.update_status(curr_percent, _u8L("Storage needs to be inserted before printing via LAN."));
return;
}
}
@@ -593,7 +593,7 @@ void PrintJob::process(Ctl &ctl)
if (result != BAMBU_NETWORK_ERR_CANCELED) {
ctl.show_error_info(msg_text, 0, "", "");
}
BOOST_LOG_TRIVIAL(error) << "print_job: failed, result = " << result;
} else {
// wait for printer mqtt ready the same job id