Skip to content

Commit d630d79

Browse files
Merge pull request #85 from OpenAstroTech/seperate-dec-guider
V1.9.03 - Updates
2 parents 6ba5570 + b751eb3 commit d630d79

File tree

9 files changed

+153
-66
lines changed

9 files changed

+153
-66
lines changed

Changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
**V1.9.03 - Updates**
2+
- Removed connection test check and made it standard.
3+
- Switched motors to normal mode (better perf), but allowed silent mode through XX_UART_STEALTH_MODE defines.
4+
- Made DEC driver be in Guide microstep mode unless slewing.
5+
- Added command to Meade protocol to calculate stepper positions for stellar coordinates.
6+
- Fixed an overflow bug in the CAL LCD menu for RA/DEC steps (esoteric mounts).
7+
18
**V1.9.00 - Updates**
29
- Fixes RMS current setting for TMC2209 UART to be more accurate and consistent
310
- Disables i_scale_analog (aka "USE_VREF") by default so that results are more consistent between users. rms_current will no longer depend on Vref, unless specifically configured by the user.

ConfigurationValidation.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,21 @@
4848
// Serial bus address must be specified for TMC2209 in UART mode
4949
#error RA driver address for DRIVER_TYPE_TMC2209_UART not specified.
5050
#endif
51+
#if (RA_UART_STEALTH_MODE != 0) && (RA_UART_STEALTH_MODE != 1)
52+
// Stealth mode must be zero or 1
53+
#error RA stealth mode must be 0 (off) or 1 (on)
54+
#endif
5155
#endif
5256

5357
#if (DEC_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
5458
#ifndef DEC_DRIVER_ADDRESS
5559
// Serial bus address must be specified for TMC2209 in UART mode
5660
#error DEC driver address for DRIVER_TYPE_TMC2209_UART not specified.
5761
#endif
62+
#if (DEC_UART_STEALTH_MODE != 0) && (DEC_UART_STEALTH_MODE != 1)
63+
// Stealth mode must be zero or 1
64+
#error DEC stealth mode must be 0 (off) or 1 (on)
65+
#endif
5866
#endif
5967

6068
#if (AZIMUTH_ALTITUDE_MOTORS == 0)

Configuration_adv.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@
9797
#ifndef RA_TRACKING_MICROSTEPPING
9898
#define RA_TRACKING_MICROSTEPPING 8 // The fine microstep mode for tracking RA axis
9999
#endif
100+
#ifndef RA_UART_STEALTH_MODE
101+
#define RA_UART_STEALTH_MODE 0
102+
#endif
100103
#elif (RA_DRIVER_TYPE == DRIVER_TYPE_A4988_GENERIC) || (RA_DRIVER_TYPE == DRIVER_TYPE_TMC2209_STANDALONE)
101104
#define RA_SLEW_MICROSTEPPING 8 // Microstep mode set by MS pin strapping. Use the same microstep mode for both slewing & tracking
102105
#define RA_TRACKING_MICROSTEPPING RA_SLEW_MICROSTEPPING
@@ -114,6 +117,9 @@
114117
#ifndef DEC_GUIDE_MICROSTEPPING
115118
#define DEC_GUIDE_MICROSTEPPING 16 // The fine microstep mode used for guiding DEC only
116119
#endif
120+
#ifndef DEC_UART_STEALTH_MODE
121+
#define DEC_UART_STEALTH_MODE 0
122+
#endif
117123
#elif (DEC_DRIVER_TYPE == DRIVER_TYPE_A4988_GENERIC) || (DEC_DRIVER_TYPE == DRIVER_TYPE_TMC2209_STANDALONE)
118124
#define DEC_SLEW_MICROSTEPPING 16 // Only UART drivers support dynamic switching. Use the same microstep mode for both slewing & guiding
119125
#define DEC_GUIDE_MICROSTEPPING DEC_SLEW_MICROSTEPPING
@@ -155,7 +161,7 @@
155161
#endif
156162
#ifndef UART_CONNECTION_TEST_TX
157163
#define UART_CONNECTION_TEST_TX 0
158-
#endif
164+
#endif
159165
#endif
160166

161167
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// So 1.8.99 is ok, but 1.8.234 is not. Neither is 1.123.22
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. \_(..)_/
5-
#define VERSION "V1.9.00"
5+
#define VERSION "V1.9.03"

src/MeadeCommandProcessor.cpp

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,15 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
396396
// Get the number of steps the RA stepper motor needs to overshoot and backtrack when slewing east.
397397
// Returns: integer#
398398
//
399+
// :XGCn.nn*m.mm#
400+
// Get stepper motor positions for target
401+
// Get the positions of stepper motors when pointed at the given coordinates.
402+
// Where n.nn is the RA coordinate (0.0 - 23.999)
403+
// m.mm is the DEC coordinate (-90.00 - +90.00)
404+
// Returns: ralong,declong#
405+
// Where ralong is the stepper position of the RA stepper
406+
// declong is the stepper position of the DEC stepper
407+
//
399408
// :XGR#
400409
// Get RA steps
401410
// Get the number of steps the RA stepper motor needs to take to rotate RA by one degree
@@ -1055,10 +1064,25 @@ String MeadeCommandProcessor::handleMeadeExtraCommands(String inCmd)
10551064
{
10561065
return String(_mount->getBacklashCorrection()) + "#";
10571066
}
1058-
else if (inCmd[1] == 'M')
1067+
else if (inCmd[1] == 'C') // :XGCn.nn*m.mm#
1068+
{
1069+
String coords = inCmd.substring(2);
1070+
int star = coords.indexOf('*');
1071+
if (star > 0)
1072+
{
1073+
long raPos, decPos;
1074+
float raCoord = coords.substring(0, star).toFloat();
1075+
float decCoord = coords.substring(star + 1).toFloat();
1076+
_mount->calculateStepperPositions(raCoord, decCoord, raPos, decPos);
1077+
char scratchBuffer[20];
1078+
sprintf(scratchBuffer, "%ld|%ld#", raPos, decPos);
1079+
return String(scratchBuffer);
1080+
}
1081+
}
1082+
else if (inCmd[1] == 'M')
10591083
{
10601084
if ((inCmd.length() > 2) && (inCmd[2] == 'S')) // :XGMS#
1061-
{
1085+
{
10621086
return _mount->getStepperInfo() + "#";
10631087
}
10641088
return _mount->getMountHardwareInfo() + "#"; // :XGM#

0 commit comments

Comments
 (0)