use floorf isntead of floor
[clinton/Smoothieware.git] / src / libs / SlowTicker.h
index 133dd78..242273b 100644 (file)
@@ -36,7 +36,7 @@ class SlowTicker : public Module{
         // TODO replace this with std::function()
         template<typename T> 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->interval = floorf((SystemCoreClock/4)/frequency);
             hook->attach(optr, fptr);
             hook->countdown = hook->interval;