diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index 2b3f384a2..9dd181223 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -424,7 +424,10 @@ sub set_fan { if ($self->last_fan_speed != $speed || $dont_save) { $self->last_fan_speed($speed) if !$dont_save; if ($speed == 0) { - return sprintf "M107%s\n", ($Slic3r::Config->gcode_comments ? ' ; disable fan' : ''); + my $code = $Slic3r::Config->gcode_flavor eq 'teacup' + ? 'M106 S0' + : 'M107'; + return sprintf "$code%s\n", ($Slic3r::Config->gcode_comments ? ' ; disable fan' : ''); } else { return sprintf "M106 %s%d%s\n", ($Slic3r::Config->gcode_flavor eq 'mach3' ? 'P' : 'S'), (255 * $speed / 100), ($Slic3r::Config->gcode_comments ? ' ; enable fan' : '');