Bugfix: use P instead of S for Mach3 for M106 too. #286

This commit is contained in:
Alessandro Ranellucci 2012-03-27 10:26:10 +02:00
parent 7a786844f6
commit e3a9adae4d

View File

@ -349,7 +349,8 @@ sub set_fan {
if ($speed == 0) {
return sprintf "M107%s\n", ($Slic3r::gcode_comments ? ' ; disable fan' : '');
} else {
return sprintf "M106 S%d%s\n", (255 * $speed / 100), ($Slic3r::gcode_comments ? ' ; enable fan' : '');
return sprintf "M106 %s%d%s\n", ($Slic3r::gcode_flavor eq 'mach3' ? 'P' : 'S'),
(255 * $speed / 100), ($Slic3r::gcode_comments ? ' ; enable fan' : '');
}
}
return "";