mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
Input Shaping Frequency
Input Shaping calibration based in https://marlinfw.org/docs/gcode/M593.html
This commit is contained in:
parent
bf9cce4800
commit
19dae83e40
14 changed files with 217 additions and 8 deletions
|
@ -333,6 +333,25 @@ std::string GCodeWriter::set_pressure_advance(double pa) const
|
|||
return gcode.str();
|
||||
}
|
||||
|
||||
std::string GCodeWriter::set_input_shaping(float freq, float damp) const
|
||||
{
|
||||
std::ostringstream gcode;
|
||||
if (FLAVOR_IS(gcfKlipper))
|
||||
{
|
||||
throw std::runtime_error("M593 - ZV Input Shaping is NOT supported by Klipper");
|
||||
}
|
||||
if (freq < 0.0f || damp < 0.f || damp > 1.0f)
|
||||
{
|
||||
throw std::runtime_error("Invalid input shaping parameters: freq=" + std::to_string(freq) + ", damp=" + std::to_string(damp));
|
||||
}
|
||||
gcode << "M593 F" << freq;
|
||||
if (damp != 0.0f)
|
||||
{
|
||||
gcode << " D" << damp;
|
||||
}
|
||||
gcode << "; Override input shaping value\n";
|
||||
return gcode.str();
|
||||
}
|
||||
|
||||
|
||||
std::string GCodeWriter::reset_e(bool force)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue