From 9552d738c220c861a03761ee29ffea23ccc30dee Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Fri, 25 Aug 2023 12:34:21 -0400 Subject: [PATCH] Use int64 in place of the int32 --- IteadDualStepperShield.cpp | 4 ++-- IteadDualStepperShield.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/IteadDualStepperShield.cpp b/IteadDualStepperShield.cpp index f564e9b..7e9bfd9 100644 --- a/IteadDualStepperShield.cpp +++ b/IteadDualStepperShield.cpp @@ -61,7 +61,7 @@ void IteadDualStepperShield::_both () { delayMicroseconds(_usStepA); } } -void IteadDualStepperShield::step (uint8_t motor, uint16_t steps, uint8_t dir) { +void IteadDualStepperShield::step (uint8_t motor, uint64_t steps, uint8_t dir) { uint8_t stepPin = motor == 0 ? _stepA : _stepB; setDir(motor, dir); for (int i = 0; i < steps; i++) { @@ -74,7 +74,7 @@ void IteadDualStepperShield::onestep (uint8_t motor, uint8_t dir) { _single(stepPin); } -void IteadDualStepperShield::stepBoth (uint16_t steps) { +void IteadDualStepperShield::stepBoth (uint64_t steps) { for (int i = 0; i < steps; i++) { _both(); } diff --git a/IteadDualStepperShield.h b/IteadDualStepperShield.h index cf69790..85f2f7b 100644 --- a/IteadDualStepperShield.h +++ b/IteadDualStepperShield.h @@ -1,7 +1,6 @@ #ifndef IteadDualStepperShield_h #define IteadDualStepperShield_h - #include class IteadDualStepperShield { @@ -32,8 +31,8 @@ class IteadDualStepperShield { void setSpeed(uint8_t motor, uint16_t speed); //full - void step(uint8_t motor, uint16_t steps, uint8_t dir); - void stepBoth(uint16_t steps); + void step(uint8_t motor, uint64_t steps, uint8_t dir); + void stepBoth(uint64_t steps); void onestep(uint8_t motor, uint8_t dir); void release();