X-Git-Url: http://git.hcoop.net/clinton/Smoothieware.git/blobdiff_plain/7d97a80e3f3ab003b3b879361e4d76c9a3e90703..1af84f6d7f188f1cae1667c390b05d4f03ddcc96:/src/main.cpp?ds=sidebyside diff --git a/src/main.cpp b/src/main.cpp index 7a8fcadd..50fa6c49 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,7 +8,7 @@ #include "libs/Kernel.h" #include "modules/tools/laser/Laser.h" -#include "modules/tools/spindle/Spindle.h" +#include "modules/tools/spindle/SpindleMaker.h" #include "modules/tools/extruder/ExtruderMaker.h" #include "modules/tools/temperaturecontrol/TemperatureControlPool.h" #include "modules/tools/endstops/Endstops.h" @@ -112,7 +112,7 @@ void init() { #ifdef DISABLEMSD // attempt to be able to disable msd in config - if(sdok && !kernel->config->value( disable_msd_checksum )->by_default(false)->as_bool()){ + if(sdok && !kernel->config->value( disable_msd_checksum )->by_default(true)->as_bool()){ // HACK to zero the memory USBMSD uses as it and its objects seem to not initialize properly in the ctor size_t n= sizeof(USBMSD); void *v = AHB0.alloc(n); @@ -132,10 +132,6 @@ void init() { kernel->add_module( new(AHB0) PlayLed() ); // these modules can be completely disabled in the Makefile by adding to EXCLUDE_MODULES - #ifndef NO_TOOLS_ENDSTOPS - kernel->add_module( new(AHB0) Endstops() ); - #endif - #ifndef NO_TOOLS_SWITCH SwitchPool *sp= new SwitchPool(); sp->load_tools(); @@ -153,11 +149,17 @@ void init() { tp->load_tools(); delete tp; #endif + #ifndef NO_TOOLS_ENDSTOPS + kernel->add_module( new(AHB0) Endstops() ); + #endif #ifndef NO_TOOLS_LASER kernel->add_module( new Laser() ); #endif #ifndef NO_TOOLS_SPINDLE - kernel->add_module( new(AHB0) Spindle() ); + SpindleMaker *sm= new SpindleMaker(); + sm->load_spindle(); + delete sm; + //kernel->add_module( new(AHB0) Spindle() ); #endif #ifndef NO_UTILS_PANEL kernel->add_module( new(AHB0) Panel() );