Fix acceleration being set when disabled in PA line calibration (#1011)

Update GCode.cpp

Fixed issue where acceleration was being set on PA line calibration even when disabled in settings
This commit is contained in:
Mike Constantino 2023-05-09 08:50:08 -04:00 committed by GitHub
parent dedd900be4
commit aeb2b0e41d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1871,7 +1871,9 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
// SoftFever: calib
if (print.calib_params().mode == CalibMode::Calib_PA_Line) {
std::string gcode;
gcode += m_writer.set_acceleration((unsigned int)floor(m_config.outer_wall_acceleration.value + 0.5));
if ((m_config.default_acceleration.value > 0 && m_config.outer_wall_acceleration.value > 0)) {
gcode += m_writer.set_acceleration((unsigned int)floor(m_config.outer_wall_acceleration.value + 0.5));
}
if (m_config.default_jerk.value > 0) {
double jerk = m_config.outer_wall_jerk.value;