NEW:optimize printer config files

jira:[STUDIO-4051]

Change-Id: I77cb16e62546eae63a73f8d12d7f11f496555197
This commit is contained in:
tao wang
2023-09-07 16:25:03 +08:00
committed by Lane.Wei
parent aa87c4fd34
commit 1a24681885
25 changed files with 123 additions and 143 deletions

View File

@@ -759,7 +759,7 @@ BedType Preset::get_default_bed_type(PresetBundle* preset_bundle)
}
std::string model_id = this->get_printer_type(preset_bundle);
if (model_id == "BL-P001" || model_id == "BL-P002") {
if (model_id == "BL-P001" || model_id == "BL-P002" || model_id == "C13") {
return BedType::btPC;
} else if (model_id == "C11") {
return BedType::btPEI;
@@ -770,7 +770,7 @@ BedType Preset::get_default_bed_type(PresetBundle* preset_bundle)
bool Preset::has_cali_lines(PresetBundle* preset_bundle)
{
std::string model_id = this->get_printer_type(preset_bundle);
if (model_id == "BL-P001" || model_id == "BL-P002") {
if (model_id == "BL-P001" || model_id == "BL-P002" || model_id == "C13") {
return true;
}
return false;

View File

@@ -202,6 +202,11 @@ const std::string& var_dir()
std::string var(const std::string &file_name)
{
boost::system::error_code ec;
if (boost::filesystem::exists(file_name, ec)) {
return file_name;
}
auto file = (boost::filesystem::path(g_var_dir) / file_name).make_preferred();
return file.string();
}