ENH: handle legacy for ASA-Aero
1.Change ASA-Aero to ASA-AERO jira:none Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I49c4c31b9928e07b67b9893a4b204c2418089f17
This commit is contained in:
parent
e79ba2f1ec
commit
a13c472816
|
@ -15,7 +15,7 @@
|
||||||
"PPA-CF",
|
"PPA-CF",
|
||||||
"PPA-GF",
|
"PPA-GF",
|
||||||
"ABS-GF",
|
"ABS-GF",
|
||||||
"ASA-Aero"
|
"ASA-AERO"
|
||||||
],
|
],
|
||||||
"low_temp_filament": [
|
"low_temp_filament": [
|
||||||
"PLA",
|
"PLA",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "Bambulab",
|
"name": "Bambulab",
|
||||||
"url": "http://www.bambulab.com/Parameters/vendor/BBL.json",
|
"url": "http://www.bambulab.com/Parameters/vendor/BBL.json",
|
||||||
"version": "02.00.00.42",
|
"version": "02.00.00.43",
|
||||||
"force_update": "0",
|
"force_update": "0",
|
||||||
"description": "the initial version of BBL configurations",
|
"description": "the initial version of BBL configurations",
|
||||||
"machine_model_list": [
|
"machine_model_list": [
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"1.5"
|
"1.5"
|
||||||
],
|
],
|
||||||
"filament_type": [
|
"filament_type": [
|
||||||
"ASA-Aero"
|
"ASA-AERO"
|
||||||
],
|
],
|
||||||
"filament_vendor": [
|
"filament_vendor": [
|
||||||
"Bambu Lab"
|
"Bambu Lab"
|
||||||
|
|
|
@ -1838,7 +1838,7 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->enum_values.push_back("PPA-CF");
|
def->enum_values.push_back("PPA-CF");
|
||||||
def->enum_values.push_back("PPA-GF");
|
def->enum_values.push_back("PPA-GF");
|
||||||
def->enum_values.push_back("ABS-GF");
|
def->enum_values.push_back("ABS-GF");
|
||||||
def->enum_values.push_back("ASA-Aero");
|
def->enum_values.push_back("ASA-AERO");
|
||||||
def->enum_values.push_back("PE");
|
def->enum_values.push_back("PE");
|
||||||
def->enum_values.push_back("PP");
|
def->enum_values.push_back("PP");
|
||||||
def->enum_values.push_back("EVA");
|
def->enum_values.push_back("EVA");
|
||||||
|
@ -5469,6 +5469,29 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
|
||||||
} else if (opt_key == "filament_map_mode") {
|
} else if (opt_key == "filament_map_mode") {
|
||||||
if (value == "Auto") value = "Auto For Flush";
|
if (value == "Auto") value = "Auto For Flush";
|
||||||
}
|
}
|
||||||
|
else if (opt_key == "filament_type"){
|
||||||
|
std::vector<std::string> type_list;
|
||||||
|
std::stringstream ss(value);
|
||||||
|
std::string token;
|
||||||
|
bool rebuild_value = false;
|
||||||
|
while (std::getline(ss, token, ';')) {
|
||||||
|
if (token.size() >= 2 && token.front() == '"' && token.back() == '"')
|
||||||
|
token = token.substr(1, token.size() - 2);
|
||||||
|
if (token == "ASA-Aero") {
|
||||||
|
token = "ASA-AERO";
|
||||||
|
rebuild_value = true;
|
||||||
|
}
|
||||||
|
type_list.emplace_back(token);
|
||||||
|
}
|
||||||
|
if (rebuild_value) {
|
||||||
|
value.clear();
|
||||||
|
for (size_t idx = 0; idx < type_list.size(); ++idx) {
|
||||||
|
if (idx != 0)
|
||||||
|
value += ';';
|
||||||
|
value += "\"" + type_list[idx] + "\"";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Ignore the following obsolete configuration keys:
|
// Ignore the following obsolete configuration keys:
|
||||||
static std::set<std::string> ignore = {
|
static std::set<std::string> ignore = {
|
||||||
|
|
Loading…
Reference in New Issue