ENH: modify Support W/G display name

Change-Id: I8fbdea4411073a74df804cbcc466027b1c3e941f
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2023-04-11 21:13:44 +08:00 committed by Lane.Wei
parent 362c365679
commit 415fb2989d
2 changed files with 23 additions and 9 deletions

View file

@ -4264,24 +4264,34 @@ std::string DynamicPrintConfig::get_filament_type(std::string &displayed_filamen
if (is_support) { if (is_support) {
if (filament_id) { if (filament_id) {
if (filament_id->get_at(id) == "GFS00") { if (filament_id->get_at(id) == "GFS00") {
displayed_filament_type = "Support W"; displayed_filament_type = "Sup.PLA";
return "PLA-S"; return "PLA-S";
} }
else if (filament_id->get_at(id) == "GFS01") { else if (filament_id->get_at(id) == "GFS01") {
displayed_filament_type = "Support G"; displayed_filament_type = "Sup.PA";
return "PA-S"; return "PA-S";
} }
else { else {
displayed_filament_type = filament_type->get_at(id); if (filament_type->get_at(id) == "PLA") {
return filament_type->get_at(id); displayed_filament_type = "Sup.PLA";
return "PLA-S";
}
else if (filament_type->get_at(id) == "PA") {
displayed_filament_type = "Sup.PA";
return "PA-S";
}
else {
displayed_filament_type = filament_type->get_at(id);
return filament_type->get_at(id);
}
} }
} }
else { else {
if (filament_type->get_at(id) == "PLA") { if (filament_type->get_at(id) == "PLA") {
displayed_filament_type = "Support W"; displayed_filament_type = "Sup.PLA";
return "PLA-S"; return "PLA-S";
} else if (filament_type->get_at(id) == "PA") { } else if (filament_type->get_at(id) == "PA") {
displayed_filament_type = "Support G"; displayed_filament_type = "Sup.PA";
return "PA-S"; return "PA-S";
} else { } else {
displayed_filament_type = filament_type->get_at(id); displayed_filament_type = filament_type->get_at(id);

View file

@ -186,9 +186,9 @@ bool AmsTray::is_unset_third_filament()
std::string AmsTray::get_display_filament_type() std::string AmsTray::get_display_filament_type()
{ {
if (type == "PLA-S") if (type == "PLA-S")
return "Support W"; return "Sup.PLA";
else if (type == "PA-S") else if (type == "PA-S")
return "Support G"; return "Sup.PA";
else else
return type; return type;
return type; return type;
@ -196,7 +196,11 @@ std::string AmsTray::get_display_filament_type()
std::string AmsTray::get_filament_type() std::string AmsTray::get_filament_type()
{ {
if (type == "Support W") { if (type == "Sup.PLA") {
return "PLA-S";
} else if (type == "Sup.PA") {
return "PA-S";
} else if (type == "Support W") {
return "PLA-S"; return "PLA-S";
} else if (type == "Support G") { } else if (type == "Support G") {
return "PA-S"; return "PA-S";