Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
moduleexample [2017/03/22 11:23]
88.4.193.55 [What is a module] Fix typo and add bold to a word
moduleexample [2018/05/10 02:09] (current)
81.92.251.152 register_for_event comment to fit on line
Line 66: Line 66:
         ​         ​
         void on_module_loaded() {         void on_module_loaded() {
-            this->​register_for_event(ON_GCODE_EXECUTE); ​      ​// Tell the kernel to call us whenever a gcode is executed ( not received )+            this->​register_for_event(ON_GCODE_EXECUTE); ​     // Tell the kernel to call us whenever a gcode is executed (not received)
         }         }
  
-        void on_gcode_execute(void* argument){ ​               // Callback function +        void on_gcode_execute(void* argument){ ​              ​// Callback function 
-            Gcode* gcode = static_cast<​Gcode*>​(argument); ​    ​// Casting of the argument ( a Gcode object )+            Gcode* gcode = static_cast<​Gcode*>​(argument); ​   // Casting of the argument ( a Gcode object )
         }         }
 }; };