Skip to content

Commit 15935fc

Browse files
Another configuration error fixed.
1 parent a7ffa24 commit 15935fc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Software/Arduino code/OpenAstroTracker/src/Mount.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "Mount.hpp"
55
#include "Utility.hpp"
66
#include "EPROMStore.hpp"
7-
#include "Sidereal.hpp"
87
#include "../Configuration_adv.hpp"
98
#include "../Configuration_pins.hpp"
109
#include "inc/Globals.hpp"
@@ -652,7 +651,7 @@ void Mount::setSpeedCalibration(float val, bool saveToStorage) {
652651
// The tracker simply needs to rotate at 15degrees/hour, adjusted for sidereal
653652
// time (i.e. the 15degrees is per 23h56m04s. 86164s/86400 = 0.99726852. 3590/3600 is the same ratio) So we only go 15 x 0.99726852 in an hour.
654653
#if RA_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART
655-
_trackingSpeed = _trackingSpeedCalibration * ((_stepsPerRADegree / SET_MICROSTEPPING) * TRACKING_MICROSTEPPING) * siderealDegreesInHour / 3600.0f;
654+
_trackingSpeed = _trackingSpeedCalibration * _stepsPerRADegree * TRACKING_MICROSTEPPING * siderealDegreesInHour / (3600.0f * SET_MICROSTEPPING);
656655
#else
657656
_trackingSpeed = _trackingSpeedCalibration * _stepsPerRADegree * siderealDegreesInHour / 3600.0f;
658657
#endif
@@ -1123,10 +1122,9 @@ void Mount::guidePulse(byte direction, int duration) {
11231122
#if RA_STEPPER_TYPE == STEPPER_TYPE_28BYJ48
11241123
float raTrackingSpeed = _stepsPerRADegree * siderealDegreesInHour / 3600.0f;
11251124
#else
1126-
float raTrackingSpeed = ((_stepsPerRADegree / SET_MICROSTEPPING) * TRACKING_MICROSTEPPING) * siderealDegreesInHour / 3600.0f;
1125+
float raTrackingSpeed = 1.0 * _stepsPerRADegree * TRACKING_MICROSTEPPING * siderealDegreesInHour / (3600.0f * SET_MICROSTEPPING);
11271126
#endif
11281127

1129-
11301128
// TODO: Do we need to track how many steps the steppers took and add them to the GoHome calculation?
11311129
// If so, we need to remember where we were when we started the guide pulse. Then at the end,
11321130
// we can calculate the difference.

Software/Arduino code/OpenAstroTracker/src/c65_startup.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#pragma once
22
#include "../Configuration_adv.hpp"
33

4+
#if USE_GPS == 1
5+
#include "Sidereal.hpp"
6+
#endif
7+
48
#if HEADLESS_CLIENT == 0
59
#if SUPPORT_GUIDED_STARTUP == 1
610

7-
#include "Sidereal.hpp"
8-
911
//////////////////////////////////////////////////////////////
1012
// This file contains the Starup 'wizard' that guides you through initial setup
1113

0 commit comments

Comments
 (0)