Extrusion Rate Smoothing: Round speed values to prevent needless & trivial speed fluctuations (#5911)

* Update pressure equalizer to address rounding

* Merge branch 'SoftFever:main' into Extrusion-Rate-Smoothing-Round-speed-values-to-prevent-unecessary-minor-speed-fluctuations
This commit is contained in:
Ioannis Giannakas 2024-06-29 15:11:45 +01:00 committed by GitHub
parent edb9ec9dd7
commit b47810435a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -769,6 +769,7 @@ void PressureEqualizer::push_line_to_output(const size_t line_idx, float new_fee
// Orca: sanity check, 1 mm/s is the minimum feedrate.
if (new_feedrate < 60)
new_feedrate = 60;
new_feedrate = std::round(new_feedrate);
const GCodeLine &line = m_gcode_lines[line_idx];
if (line_idx > 0 && output_buffer_length > 0) {
const std::string prev_line_str = std::string(output_buffer.begin() + int(this->output_buffer_prev_length),