Added new Panel stuff
[clinton/Smoothieware.git] / src / libs / Kernel.h
index 92d261c..1fd3dcb 100644 (file)
 #include "libs/StepTicker.h"
 #include "libs/Adc.h"
 #include "libs/Pauser.h"
+#include "libs/PublicData.h"
 #include "modules/communication/SerialConsole.h"
 #include "modules/communication/GcodeDispatch.h"
 #include "modules/robot/Planner.h"
 #include "modules/robot/Robot.h"
 #include "modules/robot/Stepper.h"
+#include "modules/tools/endstops/Endstops.h"
 #include <array>
 
+#define THEKERNEL Kernel::instance
+
 //Module manager
 class Module;
-class Player;
+class Conveyor;
 class SlowTicker;
 class Kernel {
     public:
         Kernel();
+        static Kernel* instance; // the Singleton instance of Kernel usable anywhere
+
         void add_module(Module* module);
         void register_for_event(_EVENT_ENUM id_event, Module* module);
         void call_event(_EVENT_ENUM id_event);
@@ -42,14 +48,15 @@ class Kernel {
         Stepper*          stepper;
         Planner*          planner;
         Config*           config;
-        Player*           player;
+        Conveyor*         conveyor;
         Pauser*           pauser;
 
         int debug;
         SlowTicker*       slow_ticker;
         StepTicker*       step_ticker;
         Adc*              adc;
-
+        PublicData*       public_data;
+        
     private:
         std::array<std::vector<Module*>, NUMBER_OF_DEFINED_EVENTS> hooks; // When a module asks to be called for a specific event ( a hook ), this is where that request is remembered