Merge branch 'main' into pr/Noisyfox/13712

This commit is contained in:
SoftFever
2026-06-22 10:56:11 +08:00
2782 changed files with 331956 additions and 215963 deletions

View File

@@ -462,10 +462,10 @@ std::string GCodeWriter::set_input_shaping(char axis, float damp, float freq, st
break;
}
case gcfMarlinLegacy: {
throw std::runtime_error(_u8L("Input shaping is not supported by Marlin < 2.1.2.\nCheck your firmware version and update your G-code flavor to ´Marlin 2´"));
throw std::runtime_error(_u8L("Input shaping is not supported by Marlin < 2.1.2.\nCheck your firmware version and update your G-code flavor to ´Marlin 2´."));
}
default:
throw std::runtime_error(_u8L("Input shaping is only supported by Klipper, RepRapFirmware and Marlin 2"));
throw std::runtime_error(_u8L("Input shaping is only supported by Klipper, RepRapFirmware and Marlin 2."));
}
if (!gcode.str().empty()) {
if (GCodeWriter::full_gcode_comment) {
@@ -1154,13 +1154,19 @@ std::string GCodeWriter::set_additional_fan(unsigned int speed)
return gcode.str();
}
std::string GCodeWriter::set_exhaust_fan( int speed,bool add_eol)
std::string GCodeWriter::set_exhaust_fan(int speed)
{
std::ostringstream gcode;
gcode << "M106" << " P3" << " S" << (int)(speed / 100.0 * 255);
if(add_eol)
gcode << "\n";
if (GCodeWriter::full_gcode_comment) {
if (speed == 0)
gcode << " ; disable exhaust fan ";
else
gcode << " ; enable exhaust fan ";
}
gcode << "\n";
return gcode.str();
}