ENH:SD card printing using cloud service

jira:[for sdcard print]

Change-Id: I9b3f3cc5db1b5c1c63d4e9e016cdd81db6893b65
This commit is contained in:
tao wang 2024-05-21 11:52:19 +08:00 committed by SoftFever
parent 0886610160
commit 8e7d1694f9
4 changed files with 36 additions and 13 deletions

View file

@ -497,7 +497,12 @@ void PrintJob::process(Ctl &ctl)
//use ftp only
if (!wxGetApp().app_config->get("lan_mode_only").empty() && wxGetApp().app_config->get("lan_mode_only") == "1") {
if (m_print_type == "from_sdcard_view") {
BOOST_LOG_TRIVIAL(info) << "print_job: try to send with cloud, model is sdcard view";
ctl.update_status(curr_percent, _u8L("Sending print job through cloud service"));
result = m_agent->start_sdcard_print(params, update_fn, cancel_fn);
}
else if (!wxGetApp().app_config->get("lan_mode_only").empty() && wxGetApp().app_config->get("lan_mode_only") == "1") {
if (params.password.empty() || params.dev_ip.empty()) {
error_text = wxString::Format("Access code:%s Ip address:%s", params.password, params.dev_ip);