mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 06:33:57 -06:00
ENH:AMS mapping is supported by default
jira:[STUDIO-4778] Change-Id: I578d8f5867c38e8dd301860bff695fc06751027c
This commit is contained in:
parent
8d74732348
commit
af5c58574a
2 changed files with 1 additions and 49 deletions
|
@ -757,54 +757,7 @@ bool MachineObject::can_unload_filament()
|
|||
|
||||
bool MachineObject::is_support_ams_mapping()
|
||||
{
|
||||
if (get_printer_series() == PrinterSeries::SERIES_X1) {
|
||||
AppConfig* config = Slic3r::GUI::wxGetApp().app_config;
|
||||
if (config) {
|
||||
if (config->get("check_ams_version") == "0")
|
||||
return true;
|
||||
}
|
||||
bool need_upgrade = false;
|
||||
if (has_ams()) {
|
||||
// compare ota version and ams version
|
||||
auto ota_ver_it = module_vers.find("ota");
|
||||
if (ota_ver_it != module_vers.end()) {
|
||||
if (!MachineObject::is_support_ams_mapping_version("ota", ota_ver_it->second.sw_ver)) {
|
||||
need_upgrade = true;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
std::string ams_id = (boost::format("ams/%1%") % i).str();
|
||||
auto ams_ver_it = module_vers.find(ams_id);
|
||||
if (ams_ver_it != module_vers.end()) {
|
||||
if (!MachineObject::is_support_ams_mapping_version("ams", ams_ver_it->second.sw_ver)) {
|
||||
need_upgrade = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return !need_upgrade;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool MachineObject::is_support_ams_mapping_version(std::string module, std::string version)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
if (module == "ota") {
|
||||
if (version.compare("00.01.04.03") < 0)
|
||||
return false;
|
||||
}
|
||||
else if (module == "ams") {
|
||||
// omit ams version is empty
|
||||
if (version.empty())
|
||||
return true;
|
||||
if (version.compare("00.00.04.10") < 0)
|
||||
return false;
|
||||
}
|
||||
return result;
|
||||
return true;
|
||||
}
|
||||
|
||||
static float calc_color_distance(wxColour c1, wxColour c2)
|
||||
|
|
|
@ -507,7 +507,6 @@ public:
|
|||
bool has_ams() { return ams_exist_bits != 0; }
|
||||
bool can_unload_filament();
|
||||
bool is_support_ams_mapping();
|
||||
static bool is_support_ams_mapping_version(std::string module, std::string version);
|
||||
|
||||
int ams_filament_mapping(std::vector<FilamentInfo> filaments, std::vector<FilamentInfo> &result, std::vector<int> exclude_id = std::vector<int>());
|
||||
bool is_valid_mapping_result(std::vector<FilamentInfo>& result, bool check_empty_slot = false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue