Skip to content

Commit 366931e

Browse files
V1.12.3 - Updates (#209)
- Fixed a bug that incorrectly calculated minimum stepper frequency. This caused Tracking to never run.
1 parent 6f8634a commit 366931e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
**V1.12.3 - Updates**
2+
- Fixed a bug that incorrectly calculated minimum stepper frequency. This caused Tracking to never run.
3+
14
**V1.12.2 - Updates**
25
- Fixed a bug that caused Focuser stepper to misbehave after booting.
36

Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// Also, numbers are interpreted as simple numbers. _ __ _
44
// So 1.8 is actually 1.08, meaning that 1.12 is a later version than 1.8. \_(..)_/
55

6-
#define VERSION "V1.12.2"
6+
#define VERSION "V1.12.3"

src/InterruptAccelStepper.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define SIGN(x) ((x >= 0) ? 1 : -1)
1212

1313
// minimal stepping frequency (steps/s) based on cpu frequency, timer counter overflow and max amount of overflows
14-
#define MIN_STEPS_PER_SEC (static_cast<float>(F_CPU) / (UINT16_MAX * UINT8_MAX))
14+
#define MIN_STEPS_PER_SEC (static_cast<float>(F_CPU) / (static_cast<long>(UINT16_MAX) * static_cast<long>(UINT8_MAX)))
1515

1616
template <typename STEPPER> class InterruptAccelStepper
1717
{
@@ -68,6 +68,7 @@ template <typename STEPPER> class InterruptAccelStepper
6868

6969
if (fabsf(speed) < MIN_STEPS_PER_SEC)
7070
{
71+
LOG(DEBUG_STEPPERS, "[IAS-%d] setSpeed(%f) - speed is too low (%f). Stopping.", STEPPER::TIMER_ID, speed, MIN_STEPS_PER_SEC);
7172
STEPPER::stop();
7273
}
7374
else
@@ -113,7 +114,7 @@ template <typename STEPPER> class InterruptAccelStepper
113114

114115
void runToPosition()
115116
{
116-
LOG(DEBUG_STEPPERS, "[IAS-%d] runToPosition(%l)", STEPPER::TIMER_ID);
117+
LOG(DEBUG_STEPPERS, "[IAS-%d] runToPosition(%l)", STEPPER::TIMER_ID, _target);
117118
while (isRunning())
118119
{
119120
yield();

0 commit comments

Comments
 (0)