remove print bed temp 0 degree check

This commit is contained in:
SoftFever 2022-11-08 13:04:45 +08:00
parent 69e9a7454e
commit 19ca3fee68

View file

@ -1079,28 +1079,28 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
} }
const ConfigOptionDef* bed_type_def = print_config_def.get("curr_bed_type"); // const ConfigOptionDef* bed_type_def = print_config_def.get("curr_bed_type");
assert(bed_type_def != nullptr); // assert(bed_type_def != nullptr);
//
const t_config_enum_values* bed_type_keys_map = bed_type_def->enum_keys_map; // const t_config_enum_values* bed_type_keys_map = bed_type_def->enum_keys_map;
for (unsigned int extruder_id : extruders) { // for (unsigned int extruder_id : extruders) {
const ConfigOptionInts* bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_key(m_config.curr_bed_type)); // const ConfigOptionInts* bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_key(m_config.curr_bed_type));
for (unsigned int extruder_id : extruders) { // for (unsigned int extruder_id : extruders) {
int curr_bed_temp = bed_temp_opt->get_at(extruder_id); // int curr_bed_temp = bed_temp_opt->get_at(extruder_id);
if (curr_bed_temp == 0 && bed_type_keys_map != nullptr) { // if (curr_bed_temp == 0 && bed_type_keys_map != nullptr) {
std::string bed_type_name; // std::string bed_type_name;
for (auto item : *bed_type_keys_map) { // for (auto item : *bed_type_keys_map) {
if (item.second == m_config.curr_bed_type) { // if (item.second == m_config.curr_bed_type) {
bed_type_name = item.first; // bed_type_name = item.first;
break; // break;
} // }
} // }
//
return { format(L("Plate %d: %s does not support filament %s.\n"), this->get_plate_index() + 1, // return { format(L("Plate %d: %s does not support filament %s.\n"), this->get_plate_index() + 1,
L(bed_type_name), extruder_id + 1) }; // L(bed_type_name), extruder_id + 1) };
} // }
} // }
} // }
return {}; return {};
} }