mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
FIX: use actual printer_type when connecting with ip&access_code
jira: [STUDIO-13841] Change-Id: Iff594cd1f6dcd5c6485ab0aa67c98f422a75fd6c (cherry picked from commit f8d0f62a1b3f3379de40a3b845c06fe61d907d82)
This commit is contained in:
@@ -314,7 +314,9 @@ namespace Slic3r
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineObject* DeviceManager::insert_local_device(const BBLocalMachine& machine, std::string connection_type, std::string bind_state, std::string version, std::string access_code)
|
MachineObject* DeviceManager::insert_local_device(const BBLocalMachine& machine,
|
||||||
|
std::string connection_type, std::string bind_state,
|
||||||
|
std::string version, std::string access_code)
|
||||||
{
|
{
|
||||||
MachineObject* obj;
|
MachineObject* obj;
|
||||||
auto it = localMachineList.find(machine.dev_id);
|
auto it = localMachineList.find(machine.dev_id);
|
||||||
@@ -324,6 +326,9 @@ namespace Slic3r
|
|||||||
obj = new MachineObject(this, m_agent, machine.dev_name, machine.dev_id, machine.dev_ip);
|
obj = new MachineObject(this, m_agent, machine.dev_name, machine.dev_id, machine.dev_ip);
|
||||||
localMachineList.insert(std::make_pair(machine.dev_id, obj));
|
localMachineList.insert(std::make_pair(machine.dev_id, obj));
|
||||||
}
|
}
|
||||||
|
if (machine.printer_type.empty())
|
||||||
|
obj->printer_type = _parse_printer_type("C11");
|
||||||
|
else
|
||||||
obj->printer_type = _parse_printer_type(machine.printer_type);
|
obj->printer_type = _parse_printer_type(machine.printer_type);
|
||||||
obj->dev_connection_type = connection_type == "farm" ? "lan":connection_type;
|
obj->dev_connection_type = connection_type == "farm" ? "lan":connection_type;
|
||||||
obj->bind_state = connection_type == "farm" ? "free":bind_state;
|
obj->bind_state = connection_type == "farm" ? "free":bind_state;
|
||||||
|
|||||||
@@ -100,7 +100,9 @@ private:
|
|||||||
/*TODO*/
|
/*TODO*/
|
||||||
public:
|
public:
|
||||||
// to remove
|
// to remove
|
||||||
MachineObject* insert_local_device(const BBLocalMachine& machine, std::string connection_type, std::string bind_state, std::string version, std::string access_code);
|
MachineObject* insert_local_device(const BBLocalMachine& machine,
|
||||||
|
std::string connection_type, std::string bind_state, std::string version,
|
||||||
|
std::string access_code);
|
||||||
static void update_local_machine(const MachineObject& m);
|
static void update_local_machine(const MachineObject& m);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2105,7 +2105,9 @@ void InputIpAddressDialog::workerThreadFunc(std::string str_ip, std::string str_
|
|||||||
machine.dev_ip = str_ip;
|
machine.dev_ip = str_ip;
|
||||||
machine.dev_id = detectData.dev_id;
|
machine.dev_id = detectData.dev_id;
|
||||||
machine.printer_type = detectData.model_id;
|
machine.printer_type = detectData.model_id;
|
||||||
m_obj = dev->insert_local_device(machine, detectData.connect_type, detectData.bind_state, detectData.version, str_access_code);
|
m_obj = dev->insert_local_device(machine,
|
||||||
|
detectData.connect_type, detectData.bind_state, detectData.version,
|
||||||
|
str_access_code);
|
||||||
|
|
||||||
|
|
||||||
if (w.expired()) return;
|
if (w.expired()) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user