add some options to filamentType

This commit is contained in:
supermerill 2019-02-14 17:51:24 +01:00
parent 430d023ede
commit c77a21e0b3
4 changed files with 67 additions and 6 deletions

View File

@ -466,9 +466,29 @@ WipeTowerPrusaMM::material_type WipeTowerPrusaMM::parse_material(const char *nam
if (strcasecmp(name, "EDGE") == 0)
return EDGE;
if (strcasecmp(name, "NGEN") == 0)
return NGEN;
if (strcasecmp(name, "PVA") == 0)
return PVA;
return NGEN;
if (strcasecmp(name, "PVA") == 0)
return PVA;
if (strcasecmp(name, "other0") == 0)
return other0;
if (strcasecmp(name, "other1") == 0)
return other1;
if (strcasecmp(name, "other2") == 0)
return other2;
if (strcasecmp(name, "other3") == 0)
return other3;
if (strcasecmp(name, "other4") == 0)
return other4;
if (strcasecmp(name, "other5") == 0)
return other5;
if (strcasecmp(name, "other6") == 0)
return other6;
if (strcasecmp(name, "other7") == 0)
return other7;
if (strcasecmp(name, "other8") == 0)
return other8;
if (strcasecmp(name, "other9") == 0)
return other9;
return INVALID;
}
@ -482,8 +502,18 @@ std::string WipeTowerPrusaMM::to_string(material_type material)
case FLEX: return "FLEX";
case SCAFF: return "SCAFF";
case EDGE: return "EDGE";
case NGEN: return "NGEN";
case PVA: return "PVA";
case NGEN: return "NGEN";
case PVA: return "PVA";
case other0: return "other0";
case other1: return "other1";
case other2: return "other2";
case other3: return "other3";
case other4: return "other4";
case other5: return "other5";
case other6: return "other6";
case other7: return "other7";
case other8: return "other8";
case other9: return "other9";
case INVALID:
default: return "INVALID";
}

View File

@ -34,7 +34,17 @@ public:
SCAFF = 5, // E:215C B:55C
EDGE = 6, // E:240C B:80C
NGEN = 7, // E:230C B:80C
PVA = 8 // E:210C B:80C
PVA = 8, // E:210C B:80C
other0 = 10,
other1 = 11,
other2 = 12,
other3 = 13,
other4 = 14,
other5 = 15,
other6 = 16,
other7 = 17,
other8 = 18,
other9 = 19,
};
// Parse material name into material_type.

View File

@ -871,6 +871,16 @@ void PrintConfigDef::init_fff_params()
def->enum_values.push_back("EDGE");
def->enum_values.push_back("NGEN");
def->enum_values.push_back("PVA");
def->enum_values.push_back("other0");
def->enum_values.push_back("other1");
def->enum_values.push_back("other2");
def->enum_values.push_back("other3");
def->enum_values.push_back("other4");
def->enum_values.push_back("other5");
def->enum_values.push_back("other6");
def->enum_values.push_back("other7");
def->enum_values.push_back("other8");
def->enum_values.push_back("other9");
def->mode = comAdvanced;
def->default_value = new ConfigOptionStrings { "PLA" };

View File

@ -64,6 +64,7 @@ enum SeamPosition {
enum FilamentType {
ftPLA, ftABS, ftPET, ftHIPS, ftFLEX, ftSCAFF, ftEDGE, ftNGEN, ftPVA
, ftOther0, ftOther1, ftOther2, ftOther3, ftOther4, ftOther5, ftOther6, ftOther7, ftOther8, ftOther9
};
enum DenseInfillAlgo {
@ -190,6 +191,16 @@ template<> inline const t_config_enum_values& ConfigOptionEnum<FilamentType>::ge
keys_map["EDGE"] = ftEDGE;
keys_map["NGEN"] = ftNGEN;
keys_map["PVA"] = ftPVA;
keys_map["other0"] = ftOther0;
keys_map["other1"] = ftOther1;
keys_map["other2"] = ftOther2;
keys_map["other3"] = ftOther3;
keys_map["other4"] = ftOther4;
keys_map["other5"] = ftOther5;
keys_map["other6"] = ftOther6;
keys_map["other7"] = ftOther7;
keys_map["other8"] = ftOther8;
keys_map["other9"] = ftOther9;
}
return keys_map;
}