X-Git-Url: https://git.hcoop.net/clinton/Smoothieware.git/blobdiff_plain/423df6df53c193a9e2e9558b1dd1f72f1e3276e9..feb204be4ed66733bf3d36209555e4d3ffd12429:/src/libs/StepTicker.h diff --git a/src/libs/StepTicker.h b/src/libs/StepTicker.h index 79465010..c614a04f 100644 --- a/src/libs/StepTicker.h +++ b/src/libs/StepTicker.h @@ -15,44 +15,25 @@ using namespace std; #include "libs/nuts_bolts.h" #include "libs/Module.h" #include "libs/Kernel.h" - +#include "libs/StepperMotor.h" class StepTicker{ public: StepTicker(); void set_frequency( double frequency ); void tick(); + StepperMotor* add_stepper_motor(StepperMotor* stepper_motor); void set_reset_delay( double seconds ); void reset_tick(); - // For some reason this can't go in the .cpp, see : http://mbed.org/forum/mbed/topic/2774/?page=1#comment-14221 - template void attach( T *optr, void ( T::*fptr )( void ) ){ - FunctionPointer* hook = new FunctionPointer(); - hook->attach(optr, fptr); - this->hooks.push_back(hook); - } - - template void reset_attach( T *optr, void ( T::*fptr )( void ) ){ - FunctionPointer* reset_hook = new FunctionPointer(); - reset_hook->attach(optr, fptr); - this->reset_hooks.push_back(reset_hook); - } - - - vector hooks; - vector reset_hooks; double frequency; - + vector stepper_motors; + uint32_t delay; + uint32_t period; + uint32_t debug; + uint32_t last_duration; }; - - - - - - - - #endif