Fix of a G-code comment. Fixes

Incorrect filament profile being used during purge - always set to PLA. #1691
This commit is contained in:
bubnikv 2019-01-29 18:28:52 +01:00
parent 7bfc60e805
commit 49bb90523a
2 changed files with 19 additions and 16 deletions

View File

@ -381,22 +381,7 @@ public:
Writer& comment_material(WipeTowerPrusaMM::material_type material)
{
m_gcode += "; material : ";
switch (material)
{
case WipeTowerPrusaMM::PVA:
m_gcode += "#8 (PVA)";
break;
case WipeTowerPrusaMM::SCAFF:
m_gcode += "#5 (Scaffold)";
break;
case WipeTowerPrusaMM::FLEX:
m_gcode += "#4 (Flex)";
break;
default:
m_gcode += "DEFAULT (PLA)";
break;
}
m_gcode += "\n";
m_gcode += WipeTowerPrusaMM::to_string(material) + "\n";
return *this;
};
@ -487,6 +472,23 @@ WipeTowerPrusaMM::material_type WipeTowerPrusaMM::parse_material(const char *nam
return INVALID;
}
std::string WipeTowerPrusaMM::to_string(material_type material)
{
switch (material) {
case PLA: return "PLA";
case ABS: return "ABS";
case PET: return "PET";
case HIPS: return "HIPS";
case FLEX: return "FLEX";
case SCAFF: return "SCAFF";
case EDGE: return "EDGE";
case NGEN: return "NGEN";
case PVA: return "PVA";
case INVALID:
default: return "INVALID";
}
}
// Returns gcode to prime the nozzles at the front edge of the print bed.
WipeTower::ToolChangeResult WipeTowerPrusaMM::prime(
// print_z of the first layer.

View File

@ -38,6 +38,7 @@ public:
// Parse material name into material_type.
static material_type parse_material(const char *name);
static std::string to_string(material_type material);
// x -- x coordinates of wipe tower in mm ( left bottom corner )
// y -- y coordinates of wipe tower in mm ( left bottom corner )