mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
PA per filament
This commit is contained in:
parent
6fb941cf4c
commit
ec7a7ff1ff
6 changed files with 30 additions and 17 deletions
|
@ -209,6 +209,22 @@ std::string GCodeWriter::set_jerk_xy(unsigned int jerk)
|
|||
|
||||
}
|
||||
|
||||
std::string GCodeWriter::set_pressure_advance(double pa) const
|
||||
{
|
||||
std::ostringstream gcode;
|
||||
if (pa < 0)
|
||||
return gcode.str();
|
||||
|
||||
if (FLAVOR_IS(gcfKlipper))
|
||||
gcode << "SET_PRESSURE_ADVANCE ADVANCE=" << std::setprecision(4) << pa << "; Override pressure advance value\n";
|
||||
else
|
||||
gcode << "M900 K" <<std::setprecision(4)<< pa << "; Override pressure advance value\n";
|
||||
|
||||
return gcode.str();
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::string GCodeWriter::reset_e(bool force)
|
||||
{
|
||||
if (FLAVOR_IS(gcfMach3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue