mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 09:02:06 +00:00
ENH: delete useless function, delay start_device_subscribe after mqtt_connect called
jira: [STUDIO-13135] Change-Id: Ibce80b043d08f6c1c7baa6611c3cfa2f0c85f2f5 (cherry picked from commit c2ff073525937fb571ea8d3bfae55231adaa691d)
This commit is contained in:
@@ -6003,6 +6003,7 @@ std::string MachineObject::get_string_from_fantype(int type)
|
||||
|
||||
void MachineObject::nt_condition_local_tunnel()
|
||||
{
|
||||
return;
|
||||
int full_msg_count_limit = 2;
|
||||
if (!nt_try_local_tunnel && nt_cloud_full_msg_count == full_msg_count_limit) {
|
||||
connect(Slic3r::GUI::wxGetApp().app_config->get("enable_ssl_for_mqtt") == "true" ? true : false);
|
||||
@@ -7495,8 +7496,6 @@ bool DeviceManager::set_selected_machine(std::string dev_id, bool need_disconnec
|
||||
if (last_selected->second->connection_type() == "lan") {
|
||||
if (last_selected->second->is_connecting() && !need_disconnect)
|
||||
return false;
|
||||
|
||||
if (!need_disconnect) {m_agent->disconnect_printer(); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7514,7 +7513,6 @@ bool DeviceManager::set_selected_machine(std::string dev_id, bool need_disconnec
|
||||
} else {
|
||||
// lan mode printer reconnect printer
|
||||
if (m_agent) {
|
||||
if (!need_disconnect) {m_agent->disconnect_printer();}
|
||||
it->second->reset();
|
||||
#if !BBL_RELEASE_TO_PUBLIC
|
||||
it->second->connect(Slic3r::GUI::wxGetApp().app_config->get("enable_ssl_for_mqtt") == "true" ? true : false);
|
||||
@@ -7574,28 +7572,6 @@ MachineObject* DeviceManager::get_selected_machine()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void DeviceManager::add_user_subscribe()
|
||||
{
|
||||
/* user machine */
|
||||
std::vector<std::string> dev_list;
|
||||
for (auto it = userMachineList.begin(); it != userMachineList.end(); it++) {
|
||||
dev_list.push_back(it->first);
|
||||
BOOST_LOG_TRIVIAL(trace) << "add_user_subscribe: " << it->first;
|
||||
}
|
||||
m_agent->add_subscribe(dev_list);
|
||||
}
|
||||
|
||||
void DeviceManager::del_user_subscribe()
|
||||
{
|
||||
/* user machine */
|
||||
std::vector<std::string> dev_list;
|
||||
for (auto it = userMachineList.begin(); it != userMachineList.end(); it++) {
|
||||
dev_list.push_back(it->first);
|
||||
BOOST_LOG_TRIVIAL(trace) << "del_user_subscribe: " << it->first;
|
||||
}
|
||||
m_agent->del_subscribe(dev_list);
|
||||
}
|
||||
|
||||
void DeviceManager::subscribe_device_list(std::vector<std::string> dev_list)
|
||||
{
|
||||
std::vector<std::string> unsub_list;
|
||||
|
||||
Reference in New Issue
Block a user