ENH: detect printer uses ssl for local connection

Change-Id: I6131bf5ed1f6d44f0bd761ad6bc3a492ba4945b7
(cherry picked from commit c68d48ecf290e5abd37a97654c5b1f7779f061e2)
This commit is contained in:
chunmao.guo 2023-01-03 11:58:01 +08:00 committed by Lane.Wei
parent 5fc3694e08
commit aa880e34a7
8 changed files with 13 additions and 1 deletions

View File

@ -1284,6 +1284,11 @@ void MachineObject::parse_version_func()
is_support_ai_monitoring = true;
is_support_ams_humidity = true;
}
if (ota_version->second.sw_ver.compare("01.03.00.00") <= 0) {
local_use_ssl = false;
} else {
local_use_ssl = true;
}
}
}
}

View File

@ -380,6 +380,7 @@ public:
std::string dev_name;
std::string dev_ip;
std::string dev_id;
bool local_use_ssl { false };
std::string access_code;
std::string dev_connection_type; /* lan | cloud */
std::string connection_type() { return dev_connection_type; }

View File

@ -164,6 +164,7 @@ void PrintJob::process()
// local print access
params.dev_ip = m_dev_ip;
params.use_ssl = m_local_use_ssl;
params.username = "bblp";
params.password = m_access_code;
wxString error_text;

View File

@ -39,6 +39,7 @@ public:
std::string m_project_name;
std::string m_dev_ip;
bool m_local_use_ssl { true };
std::string m_access_code;
std::string task_bed_type;
bool task_bed_leveling;

View File

@ -163,6 +163,7 @@ void SendJob::process()
params.dev_ip = m_dev_ip;
params.username = "bblp";
params.password = m_access_code;
params.use_ssl = m_local_use_ssl;
wxString error_text;
wxString msg_text;

View File

@ -34,6 +34,7 @@ public:
std::string m_project_name;
std::string m_dev_ip;
std::string m_access_code;
bool m_local_use_ssl{false};
std::string task_bed_type;
std::string task_ams_mapping;
std::string connection_type;

View File

@ -2131,6 +2131,7 @@ void SelectMachineDialog::on_ok()
m_print_job = std::make_shared<PrintJob>(m_status_bar, m_plater, m_printer_last_select);
m_print_job->m_dev_ip = obj_->dev_ip;
m_print_job->m_access_code = obj_->access_code;
m_print_job->m_local_use_ssl = obj_->local_use_ssl;
m_print_job->connection_type = obj_->connection_type();
m_print_job->set_project_name(m_current_project_name.utf8_string());

View File

@ -648,6 +648,7 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
m_send_job = std::make_shared<SendJob>(m_status_bar, m_plater, m_printer_last_select);
m_send_job->m_dev_ip = obj_->dev_ip;
m_send_job->m_access_code = obj_->access_code;
m_send_job->m_local_use_ssl = obj_->local_use_ssl;
m_send_job->connection_type = obj_->connection_type();
m_send_job->cloud_print_only = true;
m_send_job->has_sdcard = obj_->has_sdcard();