ENH: support ams remain in popup

jira: [STUDIO-9942]
Change-Id: I8514d1a1ac8e893ed46f18e1a42261c3af3f294c
(cherry picked from commit 9fff7967f36d7692767aeb3f03d4434b1d84a484)
This commit is contained in:
xin.zhang
2025-03-14 15:58:25 +08:00
committed by Noisyfox
parent 2806a25f33
commit 8e658d13fb
5 changed files with 133 additions and 57 deletions

View File

@@ -379,6 +379,32 @@ public:
int nozzle;
int type{1}; // 0:dummy 1:ams 2:ams-lite 3:n3f 4:n3s
public:
wxString get_ams_device_name() const
{
wxString ams_device_name;
if (type == 1) {
ams_device_name = "AMS-%d";
} else if (type == 2) {
ams_device_name = "AMS Lite-%d";
} else if (type == 3) {
ams_device_name = "AMS 2 PRO-%d";
} else if (type == 4) {
ams_device_name = "AMS HT-%d";
} else {
assert(0);
ams_device_name = "AMS-%d";
}
int num_id;
try {
num_id = std::stoi(id);
} catch (...) {}
int loc = (num_id > 127) ? (num_id - 127) : (num_id + 1);
return wxString::Format(ams_device_name, loc);
};
};
enum PrinterFirmwareType {