Skip to content

Tutorial : add a module in Fabmodule

Cdriko edited this page Mar 26, 2015 · 1 revision

how to add a output module to the fabmodule

If you have a machine that's not listed in the interface, but you know the specs of file format for this machine it's easy to add a module for it in fabmodule.

conventions

For this example, wee will use **myModule** as name of module. Later, you can adapt this name according to the machine you whant (in my repo is Smoothie_G)

This example talk about output module but I suppose that for others modules it's the same.

Creating the module

wee will do that by duplicating the module most semblable , for example mod_G :

cp outputs/mod_G.js outputs/mod_myModule.js

Open the mod_myModule.js file in your favorite editor and change :

  • everywhere mod_G_path by mod_myModule_path
  • in function mod_load_handler() change globals.output to the name of your module : globals.output="myModule"
  • in all the processes seted with mod_add_process set correctly ["module", "myModule"]
  • Finaly in the function mod_myModule_path(path) set the file output construction according to your machine

Made the module displayed in the menu

it's done in the file outputs/mod_outputs.js

in the var output_array add a line containing the description and the filename of your module :

["myModule display text (.gcode)", "outputs/mod_myModule.js"]