Skip to content

Commit 9904f04

Browse files
V1.6.56 - Updates
- Fixed a bug where Parking did not stop tracking.
1 parent 96342e5 commit 9904f04

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

Software/Arduino code/OpenAstroTracker/Mount.cpp

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,15 +1036,14 @@ void Mount::loop() {
10361036

10371037
if (_stepperWasRunning) {
10381038
#ifdef DEBUG_MODE
1039-
logv("Loop: Reached target.");
1039+
logv("Loop: Reached target.");
10401040
#endif
10411041
// Mount is at Target!
10421042
// If we we're parking, we just reached home. Clear the flag, reset the motors and stop tracking.
10431043
if (isParking()) {
10441044
#ifdef DEBUG_MODE
1045-
logv("Loop: Was Parking.");
1045+
logv("Loop: Was Parking, stop tracking and set home.");
10461046
#endif
1047-
_mountStatus &= ~STATUS_PARKING;
10481047
stopSlewing(TRACKING);
10491048
setHome();
10501049
}
@@ -1053,29 +1052,40 @@ void Mount::loop() {
10531052
_currentRAStepperPosition = _stepperRA->currentPosition();
10541053
if (_correctForBacklash) {
10551054
#ifdef DEBUG_MODE
1056-
logv("Loop: Reached target at %d. Compensating by %d", _currentRAStepperPosition, _backlashCorrectionSteps);
1055+
logv("Loop: Reached target at %d. Compensating by %d", _currentRAStepperPosition, _backlashCorrectionSteps);
10571056
#endif
10581057
_currentRAStepperPosition += _backlashCorrectionSteps;
10591058
_stepperRA->runToNewPosition(_currentRAStepperPosition);
10601059
_correctForBacklash = false;
10611060
#ifdef DEBUG_MODE
1062-
logv("Loop: Backlash correction done. Pos: %d", _currentRAStepperPosition);
1061+
logv("Loop: Backlash correction done. Pos: %d", _currentRAStepperPosition);
10631062
#endif
10641063
}
10651064
else
10661065
{
10671066
#ifdef DEBUG_MODE
1068-
logv("Loop: Reached target at %d, no backlash compensation needed", _currentRAStepperPosition);
1067+
logv("Loop: Reached target at %d, no backlash compensation needed", _currentRAStepperPosition);
10691068
#endif
10701069
}
10711070

10721071
if (_slewingToHome) {
10731072
#ifdef DEBUG_MODE
1074-
logv("Loop: Was Slewing home, so setting stepper RA and TRK to zero.");
1073+
logv("Loop: Was Slewing home, so setting stepper RA and TRK to zero.");
10751074
#endif
10761075
_stepperRA->setCurrentPosition(0);
10771076
_stepperTRK->setCurrentPosition(0);
1078-
startSlewing(TRACKING);
1077+
if (isParking()) {
1078+
#ifdef DEBUG_MODE
1079+
logv("Loop: Was parking, so no tracking.");
1080+
#endif
1081+
_mountStatus &= ~STATUS_PARKING;
1082+
}
1083+
else {
1084+
#ifdef DEBUG_MODE
1085+
logv("Loop: Restart tracking.");
1086+
#endif
1087+
startSlewing(TRACKING);
1088+
}
10791089
_slewingToHome = false;
10801090
}
10811091
_totalDECMove = _totalRAMove = 0;

Software/Arduino code/OpenAstroTracker/OpenAstroTracker.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
#include "Globals.h"
1818

19-
String version = "V1.6.55";
19+
String version = "V1.6.56";
2020

2121
///////////////////////////////////////////////////////////////////////////
2222
// Please see the Globals.h file for configuration of the firmware.

0 commit comments

Comments
 (0)