ENH:display error msg when connecting to the printer fails

Change-Id: I483d6c00bdd623e34bce5b087bfbcb9a5e876fa3
This commit is contained in:
tao wang 2023-05-22 15:07:33 +08:00 committed by Lane.Wei
parent 4fd8a2b957
commit 6f2839b641
25 changed files with 378 additions and 127 deletions

View file

@ -618,8 +618,15 @@ void CalibUtils::send_to_print(const std::string& dev_id, const std::string& sel
print_job->m_dev_ip = obj_->dev_ip;
print_job->m_ftp_folder = obj_->get_ftp_folder();
print_job->m_access_code = obj_->get_access_code();
#if !BBL_RELEASE_TO_PUBLIC
print_job->m_local_use_ssl_for_ftp = wxGetApp().app_config->get("enable_ssl_for_mqtt") == "true" ? true : false;
print_job->m_local_use_ssl_for_mqtt = wxGetApp().app_config->get("enable_ssl_for_ftp") == "true" ? true : false;
#else
print_job->m_local_use_ssl_for_ftp = obj_->local_use_ssl_for_ftp;
print_job->m_local_use_ssl_for_mqtt = obj_->local_use_ssl_for_mqtt;
#endif
print_job->connection_type = obj_->connection_type();
print_job->cloud_print_only = obj_->is_cloud_print_only;
print_job->set_print_job_finished_event(wxGetApp().plater()->get_send_calibration_finished_event());

View file

@ -35,8 +35,9 @@ namespace BBL {
#define BAMBU_NETWORK_ERR_BIND_GET_PRINTER_TICKET_TIMEOUT -1040 //timeout to get ticket from printer
#define BAMBU_NETWORK_ERR_BIND_GET_CLOUD_TICKET_TIMEOUT -1050 //timeout to get ticket from cloud server
#define BAMBU_NETWORK_ERR_BIND_POST_TICKET_TO_CLOUD_FAILED -1060 //failed to post ticket to cloud server
#define BAMBU_NETWORK_ERR_BIND_PARSE_LOGIN_REPORT_FAILED -1070 //failed to parse login report reason
#define BAMBU_NETWORK_ERR_BIND_RECEIVE_LOGIN_REPORT_TIMEOUT -1080 //timeout to receive login report
#define BAMBU_NETWORK_ERR_BIND_PARSE_LOGIN_REPORT_FAILED -1070 //failed to parse login report reason no error code
#define BAMBU_NETWORK_ERR_BIND_ECODE_LOGIN_REPORT_FAILED -1080 //failed to parse login report reason has error code
#define BAMBU_NETWORK_ERR_BIND_RECEIVE_LOGIN_REPORT_TIMEOUT -1090 //timeout to receive login report
//start_local_print_with_record error
#define BAMBU_NETWORK_ERR_PRINT_WR_REQUEST_PROJECT_ID_FAILED -2010 //failed to request project id
@ -76,6 +77,10 @@ namespace BBL {
//start_send_gcode_to_sdcard error
#define BAMBU_NETWORK_ERR_PRINT_SG_UPLOAD_FTP_FAILED -5010 //failed to upload ftp
//connection to printer failed
#define BAMBU_NETWORK_ERR_CONNECTION_TO_PRINTER_FAILED -6010 //Connection to printer failed
#define BAMBU_NETWORK_ERR_CONNECTION_TO_SERVER_FAILED -6020 //Connection to server failed
#define BAMBU_NETWORK_LIBRARY "bambu_networking"
#define BAMBU_NETWORK_AGENT_NAME "bambu_network_agent"