ENH: add back use_relative_e for third party printer

Useless for BambuPrinter. But used by third party printer

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: Ib6a63e78816b25696c25952508f76c3d9221e363
This commit is contained in:
salt.wei 2023-06-21 15:51:01 +08:00 committed by Lane.Wei
parent 9bd0e3e85b
commit 766abf92fa
13 changed files with 31 additions and 23 deletions

View file

@ -60,11 +60,9 @@ std::string GCodeWriter::preamble()
FLAVOR_IS(gcfSmoothie) ||
FLAVOR_IS(gcfKlipper))
{
if (RELATIVE_E_AXIS) {
gcode << "M83 ; only support relative e\n";
if (this->config.use_relative_e_distances) {
gcode << "M83 ; use relative distances for extrusion\n";
} else {
//BBS: don't support absolute e distance
assert(0);
gcode << "M82 ; use absolute distances for extrusion\n";
}
gcode << this->reset_e(true);
@ -243,7 +241,7 @@ std::string GCodeWriter::reset_e(bool force)
m_extruder->reset_E();
}
if (! RELATIVE_E_AXIS) {
if (!this->config.use_relative_e_distances) {
std::ostringstream gcode;
gcode << "G92 E0";
//BBS