Skip to content

Commit 2aec8fa

Browse files
V1.7.10 - Updates
- Make GoTo command use full speed slew rate at all times.
1 parent 83bd703 commit 2aec8fa

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

Software/Arduino code/OpenAstroTracker/Mount.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Mount::Mount(int stepsPerRADegree, int stepsPerDECDegree, LcdMenu* lcdMenu) {
7878
_stepperWasRunning = false;
7979
_totalDECMove = 0;
8080
_totalRAMove = 0;
81+
_moveRate = 4;
8182
#if RA_Stepper_TYPE == 0
8283
_backlashCorrectionSteps = 16;
8384
#else
@@ -404,13 +405,13 @@ void Mount::setBacklashCorrection(int steps) {
404405
/////////////////////////////////
405406
void Mount::setSlewRate(int rate)
406407
{
407-
rate = clamp(rate, 1, 4);
408+
_moveRate = clamp(rate, 1, 4);
408409
float speedFactor[] = { 0, 0.05, 0.2, 0.5, 1.0};
409410
#if DEBUG_LEVEL&DEBUG_MOUNT
410-
logv("Mount::setSlewRate: rate is %d -> %f",rate, speedFactor[rate]);
411+
logv("Mount::setSlewRate: rate is %d -> %f",_moveRate , speedFactor[_moveRate ]);
411412
#endif
412-
_stepperDEC->setMaxSpeed(speedFactor[rate] * _maxDECSpeed);
413-
_stepperRA->setMaxSpeed(speedFactor[rate] * _maxRASpeed);
413+
_stepperDEC->setMaxSpeed(speedFactor[_moveRate ] * _maxDECSpeed);
414+
_stepperRA->setMaxSpeed(speedFactor[_moveRate ] * _maxRASpeed);
414415
#if DEBUG_LEVEL&DEBUG_MOUNT
415416
logv("Mount::setSlewRate: new speeds are RA: %f DEC: %f",_stepperRA->maxSpeed(), _stepperDEC->maxSpeed());
416417
#endif
@@ -623,6 +624,10 @@ void Mount::startSlewingToTarget() {
623624
stopGuiding();
624625
}
625626

627+
// Make sure we're slewing at full speed on a GoTo
628+
_stepperDEC->setMaxSpeed(_maxDECSpeed);
629+
_stepperRA->setMaxSpeed(_maxRASpeed);
630+
626631
// Calculate new RA stepper target (and DEC)
627632
_currentDECStepperPosition = _stepperDEC->currentPosition();
628633
_currentRAStepperPosition = _stepperRA->currentPosition();
@@ -1051,6 +1056,10 @@ void Mount::startSlewing(int direction) {
10511056
}
10521057
else {
10531058
int sign = NORTHERN_HEMISPHERE ? 1 : -1;
1059+
1060+
// Set move rate to last commanded slew rate
1061+
setSlewRate(_moveRate);
1062+
10541063
if (direction & NORTH) {
10551064
_stepperDEC->moveTo(sign * 30000);
10561065
_mountStatus |= STATUS_SLEWING;

Software/Arduino code/OpenAstroTracker/Mount.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ class Mount {
221221
int _maxRAAcceleration;
222222
int _maxDECAcceleration;
223223
int _backlashCorrectionSteps;
224+
int _moveRate;
224225

225226
long _lastHASet;
226227
DayTime _LST;

Software/Arduino code/OpenAstroTracker/OpenAstroTracker.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "Globals.hpp"
2020

21-
String version = "V1.7.09";
21+
String version = "V1.7.10";
2222

2323
///////////////////////////////////////////////////////////////////////////
2424
// Please see the Globals.h file for configuration of the firmware.

0 commit comments

Comments
 (0)