Skip to content

Commit

Permalink
load machine pic by machine_type
Browse files Browse the repository at this point in the history
  • Loading branch information
womendoushihaoyin committed Jan 18, 2025
1 parent 15297b4 commit 50ea79a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/slic3r/GUI/SSWCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,16 @@ void SSWCP_MachineFind_Instance::sw_StartMachineFind()
}

// 模拟一下
machine_data["cover"] = LOCALHOST_URL + std::to_string(PAGE_HTTP_PORT) +
"/profiles/Snapmaker/Snapmaker A350 Dual BKit_cover.png";
/* machine_data["cover"] = LOCALHOST_URL + std::to_string(PAGE_HTTP_PORT) +
"/profiles/Snapmaker/Snapmaker A350 Dual BKit_cover.png";*/

if (reply.txt_data.count("machine_type")) {
std::string machine_type = reply.txt_data["machine_type"];
size_t vendor_pos = machine_type.find_first_of(" ");
if (vendor_pos != std::string::npos) {
std::string vendor = machine_type.substr(0, vendor_pos);
std::string machine_cover = LOCALHOST_URL + std::to_string(PAGE_HTTP_PORT) + "/profiles/" +
vendor + machine_type + "_cover.png";
vendor + "/" + machine_type + "_cover.png";

machine_data["cover"] = machine_cover;
}
Expand Down

0 comments on commit 50ea79a

Please sign in to comment.