X-Git-Url: https://git.hcoop.net/clinton/Smoothieware.git/blobdiff_plain/adc927a8b8365dd74c143dc8b0b2c44d417fd3ad..1fcb3a2afb1807f229719f2556b0ed82e68ab1a2:/src/libs/SlowTicker.h diff --git a/src/libs/SlowTicker.h b/src/libs/SlowTicker.h index a2888649..cde1ad24 100644 --- a/src/libs/SlowTicker.h +++ b/src/libs/SlowTicker.h @@ -28,11 +28,12 @@ class SlowTicker : public Module{ void on_module_loaded(void); void on_idle(void*); + void on_gcode_execute(void*); void set_frequency( int frequency ); void tick(); // For some reason this can't go in the .cpp, see : http://mbed.org/forum/mbed/topic/2774/?page=1#comment-14221 - template Hook* attach( int frequency, T *optr, uint32_t ( T::*fptr )( uint32_t ) ){ + template Hook* attach( uint32_t frequency, T *optr, uint32_t ( T::*fptr )( uint32_t ) ){ Hook* hook = new Hook(); hook->interval = int(floor((SystemCoreClock/4)/frequency)); hook->attach(optr, fptr); @@ -48,8 +49,11 @@ class SlowTicker : public Module{ bool flag_1s(); vector hooks; - int max_frequency; - int interval; + uint32_t max_frequency; + uint32_t interval; + + uint32_t g4_ticks; + bool g4_pause; Pin ispbtn; protected: