diff --git a/src/slic3r/GUI/Jobs/PrintJob.cpp b/src/slic3r/GUI/Jobs/PrintJob.cpp index db760503ad..715bbdf20e 100644 --- a/src/slic3r/GUI/Jobs/PrintJob.cpp +++ b/src/slic3r/GUI/Jobs/PrintJob.cpp @@ -221,9 +221,19 @@ void PrintJob::process() return was_canceled(); }; + NetworkAgent* m_agent = wxGetApp().getAgent(); if (params.connection_type != "lan") { + if (params.dev_ip.empty()) + params.comments = "no_ip"; + else if (this->cloud_print_only) + params.comments = "low_version"; + else if (!this->has_sdcard) + params.comments = "no_sdcard"; + else if (params.password.empty()) + params.comments = "no_password"; + if (!this->cloud_print_only && !params.password.empty() && !params.dev_ip.empty() @@ -232,6 +242,13 @@ void PrintJob::process() BOOST_LOG_TRIVIAL(info) << "print_job: try to start local print with record"; this->update_status(curr_percent, _L("Sending print job over LAN")); result = m_agent->start_local_print_with_record(params, update_fn, cancel_fn); + if (result == BAMBU_NETWORK_ERR_FTP_LOGIN_DENIED) { + params.comments = "wrong_code"; + } else if (result == BAMBU_NETWORK_ERR_FTP_UPLOAD_FAILED) { + params.comments = "upload_failed"; + } else { + params.comments = (boost::format("failed(%1%)") % result).str(); + } if (result < 0) { // try to send with cloud BOOST_LOG_TRIVIAL(warning) << "print_job: try to send with cloud"; diff --git a/src/slic3r/Utils/bambu_networking.hpp b/src/slic3r/Utils/bambu_networking.hpp index da246a10b7..0df84d2038 100644 --- a/src/slic3r/Utils/bambu_networking.hpp +++ b/src/slic3r/Utils/bambu_networking.hpp @@ -113,6 +113,7 @@ struct PrintParams { std::string ftp_file_md5; std::string ams_mapping; std::string connection_type; + std::string comments; /* access options */ std::string dev_ip;