mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-23 21:05:31 -07:00
ENH: support dynamic size ams panel list in upgrade panel
jira: none adjust accessories display text Change-Id: I1de6872325b17bd5cfb11e750608d5f420055ee4 (cherry picked from commit 6ba1518c24b4dcba01eabb6d1d0ce3a0ce69576c)
This commit is contained in:
parent
21c69a99e6
commit
1f41e18d7f
2 changed files with 52 additions and 14 deletions
|
|
@ -1325,12 +1325,11 @@ wxString MachineObject::get_upgrade_result_str(int err_code)
|
|||
|
||||
std::map<int, MachineObject::ModuleVersionInfo> MachineObject::get_ams_version()
|
||||
{
|
||||
std::vector<std::string> ams_type = {"ams", "n3f", "n3s"};
|
||||
|
||||
std::vector<std::string> multi_tray_ams_type = {"ams", "n3f"};
|
||||
std::map<int, ModuleVersionInfo> result;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
std::string ams_id;
|
||||
for (auto type : ams_type )
|
||||
for (auto type : multi_tray_ams_type)
|
||||
{
|
||||
ams_id = type + "/" + std::to_string(i);
|
||||
auto it = module_vers.find(ams_id);
|
||||
|
|
@ -1339,6 +1338,17 @@ std::map<int, MachineObject::ModuleVersionInfo> MachineObject::get_ams_version()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string single_tray_ams_type = "n3s";
|
||||
int n3s_start_id = 128;
|
||||
for (int i = n3s_start_id; i < n3s_start_id + 8; i++) {
|
||||
std::string ams_id;
|
||||
ams_id = single_tray_ams_type + "/" + std::to_string(i);
|
||||
auto it = module_vers.find(ams_id);
|
||||
if (it != module_vers.end()) {
|
||||
result.emplace(std::pair(i, it->second));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue