File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -266,10 +266,20 @@ class GCodeExport
266
266
{
267
267
if (currentFanSpeed == speed)
268
268
return ;
269
- if (speed > 0 )
270
- fprintf (f, " M106 S%d\n " , speed * 255 / 100 );
271
- else
272
- fprintf (f, " M107\n " );
269
+ if (speed > 0 )
270
+ {
271
+ if (flavor == GCODE_FLAVOR_MAKERBOT)
272
+ fprintf (f, " M126 T0 ; value = %d\n " , speed * 255 / 100 );
273
+ else
274
+ fprintf (f, " M106 S%d\n " , speed * 255 / 100 );
275
+ }
276
+ else
277
+ {
278
+ if (flavor == GCODE_FLAVOR_MAKERBOT)
279
+ fprintf (f, " M127 T0\n " );
280
+ else
281
+ fprintf (f, " M107\n " );
282
+ }
273
283
currentFanSpeed = speed;
274
284
}
275
285
Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ class _ConfigSettingIndex
37
37
* M106 Sxxx and M107 are used to turn the fan on/off.
38
38
**/
39
39
#define GCODE_FLAVOR_ULTIGCODE 1
40
+ /* *
41
+ * Makerbot flavored GCode.
42
+ * Looks a lot like RepRap GCode with a few changes. Requires MakerWare to convert to X3G files.
43
+ * Heating needs to be done with M104 Sxxx T0
44
+ * No G21 or G90
45
+ * Fan ON is M126 T0 (No fan strength control?)
46
+ * Fan OFF is M127 T0
47
+ * Homing is done with G162 X Y F2000
48
+ **/
49
+ #define GCODE_FLAVOR_MAKERBOT 2
40
50
41
51
class ConfigSettings
42
52
{
You can’t perform that action at this time.
0 commit comments