From 300734db385496a0a9281bd97a148eea56485af6 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 19 Nov 2012 15:30:55 +0100 Subject: [PATCH] Emit M106 S0 instead of M107 for Teacup --- lib/Slic3r/GCode.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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' : '');