Skip to content

Commit 60d07fd

Browse files
V1.13.13 - Updates (#259)
1 parent d523367 commit 60d07fd

File tree

4 files changed

+55
-45
lines changed

4 files changed

+55
-45
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
**V1.13.13 - Updates**
2+
- Improved Meade command documentation
3+
- Fixed a bug that was not correctly showing the stepper direction in the :GX# command reply./
4+
15
**V1.13.12 - Updates**
26
- Parallelize matrix_build.py for faster CI builds
37
- Added basic test mode that can be run via terminal connection.

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.13.12"
6+
#define VERSION "V1.13.13"

src/MeadeCommandProcessor.cpp

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
180180
// Parameters:
181181
// "s" is the sign
182182
// "HH" is the number of hours
183-
// Remarks
183+
// Remarks:
184184
// Note that this is NOT simply the timezone offset you are in (like -8 for Pacific Standard Time), it is the negative of it. So how many hours need to be added to your local time to get to UTC.
185185
//
186186
// :Ga#
@@ -271,25 +271,28 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
271271
// Description:
272272
// Get Mount Status
273273
// Information:
274-
// String reflecting the mounts' status. The string is a comma-delimited list of statuses
274+
// String reflecting the mounts' status. The string is a comma-delimited list of statuses.
275275
// Returns:
276-
// "Idle,--T--,11219,0,927,071906,+900000,#"
276+
// "Idle,--T--,11219,0,927,071906,+900000,,#"
277277
// Parameters:
278278
// [0] The mount status. One of 'Idle', 'Parked', 'Parking', 'Guiding', 'SlewToTarget', 'FreeSlew', 'ManualSlew', 'Tracking', 'Homing'
279-
// [1] The motion state.
279+
// [1] The motion state (see Remarks below).
280280
// [2] The RA stepper position
281281
// [3] The DEC stepper position
282282
// [4] The Tracking stepper position
283-
// [5] The current RA position
284-
// [6] The current DEC position
283+
// [5] The current RA coordinate
284+
// [6] The current DEC coordinate
285+
// [7] The FOC stepper position (if FOC enabled, else empty)
285286
// Remarks:
286-
// The motion state
287+
// The motion state consists of 6 characters. If the character is a '-', the corresponding axis is not moving.
287288
// First character is RA slewing state ('R' is East, 'r' is West, '-' is stopped).
288289
// Second character is DEC slewing state ('d' is North, 'D' is South, '-' is stopped).
289290
// Third character is TRK slewing state ('T' is Tracking, '-' is stopped).
290291
// Fourth character is AZ slewing state ('Z' and 'z' is adjusting, '-' is stopped).
291292
// Fifth character is ALT slewing state ('A' and 'a' is adjusting, '-' is stopped).
292-
// Az and Alt are optional. The string may only be 3 characters long
293+
// Sixth character is FOC slewing state ('F' and 'f' is adjusting, '-' is stopped).
294+
// AZ, ALT, and FOC are only set if the corresponding axis is enabled. If not, the character is always '-'.
295+
// Since AZ/ALT rarely move, their positions are not returned here. To get the AZ and ALT stepper positions, use the ":XGAA#" command.
293296
//
294297
//------------------------------------------------------------------
295298
// SET FAMILY
@@ -424,7 +427,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
424427
// Description:
425428
// Synchronize Declination and Right Ascension.
426429
// Information:
427-
// This tells the scope what it is currently pointing at.
430+
// This tells the scope what exact coordinates it is currently pointing at. These coordinates become the new current RA/DEC coordinates of the mount.
428431
// Returns:
429432
// "1" if successfully set
430433
// "0" otherwise
@@ -464,7 +467,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
464467
// Description:
465468
// Run a Guide pulse
466469
// Information:
467-
// This runs the motors at increased speed for a short period of time.
470+
// This runs the RA or DEC steppers at an increased or decreased speed (in the case of RA) or a constant speed (in the case of DEC) for a short period of time. It is used for guiding.
468471
// Parameters:
469472
// "d" is one of 'N', 'E', 'W', or 'S'
470473
// "nnnn" is the duration in ms
@@ -485,7 +488,8 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
485488
// Description:
486489
// Start slewing
487490
// Information:
488-
// This starts slewing the mount in the given direction.
491+
// This starts slewing the mount in the given direction. You must issue a stop command (such as the corresponding ":Qc#",
492+
// where 'c' is the same direction as passed to this command) or ":Q#" (stops all steppers) to stop it.
489493
// Parameters:
490494
// "c" is one of 'n', 'e', 'w', or 's'
491495
// Returns:
@@ -495,7 +499,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
495499
// Description:
496500
// Move stepper
497501
// Information:
498-
// This starts moving one of the steppers by the given amount of steps and returns immediately.
502+
// This starts moving one of the steppers by the given amount of steps and returns immediately. Steps can be positive or negative.
499503
// Parameters:
500504
// "x" is the stepper to move (r for RA, d for DEC, f for FOC, z for AZ, t for ALT)
501505
// "nnnn" is the number of steps
@@ -521,7 +525,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
521525
// specified direction.
522526
// Returns:
523527
// "1" if search is started
524-
// "0" if homing has not been enabled in the local config
528+
// "0" if homing has not been enabled in the local configuration file
525529
//
526530
// :MHDxn#
527531
// Description:
@@ -542,13 +546,13 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
542546
// specified direction.
543547
// Returns:
544548
// "1" if search is started
545-
// "0" if homing has not been enabled in the local config
549+
// "0" if homing has not been enabled in the local configuration file
546550
//
547551
// :MAAH#
548552
// Description:
549553
// Move Azimuth and Altitude to home
550554
// Information:
551-
// If the scope supports automated azimuth and altitutde operations, move AZ and ALT axis to their zero positions.
555+
// If the scope supports automated azimuth and altitude operations, move AZ and ALT axis to their zero positions.
552556
// Returns:
553557
// "1"
554558
//
@@ -644,7 +648,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
644648
// nothing
645649
//
646650
//------------------------------------------------------------------
647-
// EXTRA OAT FAMILY - These are meant for the PC control app
651+
// EXTRA OAT FAMILY - These are used by the PC control application OATControl
648652
//
649653
// :XFR#
650654
// Description:
@@ -723,7 +727,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
723727
// Sets the reference pitch value of the mount (Digital Level addon). This is the value
724728
// at which the mount is level.
725729
// Returns:
726-
// "1#" if succsessful
730+
// "1#" if successful
727731
// "0#" if there is no Digital Level
728732
//
729733
// :XGAA#
@@ -895,12 +899,12 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
895899
// "<Stepper Info>" is a pipe-delimited string of Motor type (NEMA or 28BYJ), Pulley Teeth, Steps per revolution)
896900
// "<GPS info>" is either NO_GPS or GPS, depending on whether a GPS module is present
897901
// "<AzAlt info>" is either NO_AZ_ALT, AUTO_AZ_ALT, AUTO_AZ, or AUTO_ALT, depending on which AutoPA stepper motors are present
898-
// "<Gyro info>" is either NO_GYRO or GYRO depending on whether the Digial level is present
902+
// "<Gyro info>" is either NO_GYRO or GYRO depending on whether the Digital level is present
899903
// "<Display info>" is either NO_LCD or LCD_display_type depending on whether LCD is present and if so, which one
900904
// "<Focuser info>" is either NO_FOC or FOC depending on whether the focuser motor is enabled
901905
// "<RAHallSensor info>" is either NO_HSAH or HSAH depending on whether the Hall sensor based auto homing for RA is enabled
902906
// "<Endswitch info>" is either NO_ENDSW or ENDS_RA, ENDSW_DEC, or ENDSW_RA_DEC depending on which axis have end switches installed
903-
// Remarks
907+
// Remarks:
904908
// As OAT/OAM firmware supports more features, these may be appended, separated by a comma. Any further features will
905909
// have a 'NO_xxxxx' if the feature is not supported.
906910
// To differentiate between OAT and OAM, use the Get Product Name (#GVP) command.
@@ -952,7 +956,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
952956
// This offset is added to the position of the RA ring when it is centered on the hall sensor triggered range after running.
953957
// the RA homing command (:MHRx#)
954958
// Parameters:
955-
// "n" is the (positive or negative) number of steps that are needed from the center of the Hall senser trigger range to the actual home position.
959+
// "n" is the (positive or negative) number of steps that are needed from the center of the Hall sensor trigger range to the actual home position.
956960
// Returns:
957961
// nothing
958962
//
@@ -963,7 +967,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
963967
// This offset is added to the position of the DEC ring when it is centered on the hall sensor triggered range after running.
964968
// the DEC homing command (:MHDx#)
965969
// Parameters:
966-
// "n" is the (positive or negative) number of steps that are needed from the center of the Hall senser trigger range to the actual home position.
970+
// "n" is the (positive or negative) number of steps that are needed from the center of the Hall sensor trigger range to the actual home position.
967971
// Returns:
968972
// nothing
969973
//
@@ -995,7 +999,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
995999
// otherwise to the given angle (in degrees from the home position).
9961000
// Parameters:
9971001
// "nnnnn" is the number of steps from home that the DEC ring can travel upwards. Passing 0 will reset it to the
998-
// limits defined in your config file. Omitting this parameter sets it to the current DEC position.
1002+
// limits defined in your configuration file. Omitting this parameter sets it to the current DEC position.
9991003
// Returns:
10001004
// nothing
10011005
//
@@ -1004,7 +1008,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
10041008
// Clear DEC upper limit
10051009
// Information:
10061010
// Resets the upper limit for the DEC axis to the configuration-defined position.
1007-
// If unconfigured, the limit is cleared.
1011+
// If not configured, the limit is cleared.
10081012
// Returns:
10091013
// nothing
10101014
//
@@ -1016,7 +1020,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
10161020
// otherwise to the given angle (in degrees from the home position).
10171021
// Parameters:
10181022
// "nnnnn" is the number of steps from home that the DEC ring can travel downwards. Passing 0 will reset it to the
1019-
// limits defined in your config file. Omitting this parameter sets it to the current DEC position.
1023+
// limits defined in your configuration file. Omitting this parameter sets it to the current DEC position.
10201024
// Returns:
10211025
// nothing
10221026
//
@@ -1025,7 +1029,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
10251029
// Clear DEC lower limit
10261030
// Information:
10271031
// Resets the lower limit for the DEC axis to the configuration-defined position.
1028-
// If unconfigured, the limit is cleared.
1032+
// If not configured, the limit is cleared.
10291033
// Returns:
10301034
// nothing
10311035
//
@@ -1034,7 +1038,8 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
10341038
// Set DEC parking position offset
10351039
// Information:
10361040
// This stores the number of steps needed to move from home to the parking position.
1037-
// Returns: nothing
1041+
// Returns:
1042+
// nothing
10381043
//
10391044
// :XSSn.nnn#
10401045
// Description:
@@ -1109,7 +1114,7 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
11091114
// Description:
11101115
// Set speed factor
11111116
// Information:
1112-
// Set focuser speed to <n> where <n> is an ASCII digit 1..4. 1 is slowest, 4 i fastest
1117+
// Set focuser speed to <n> where <n> is an ASCII digit 1..4. 1 is slowest, 4 is fastest
11131118
// Returns:
11141119
// nothing
11151120
//
@@ -1137,7 +1142,6 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
11371142
// Returns:
11381143
// "nnn#" "nnn" is the current position of the stepper
11391144
//
1140-
//
11411145
// :FPnnn#
11421146
// Description:
11431147
// Set position

src/Mount.cpp

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,13 @@ PUSH_NO_WARNINGS
2828
#endif
2929
POP_NO_WARNINGS
3030

31-
// slewingStatus()
31+
// slewStatus()
3232
#define SLEWING_DEC B00000010
3333
#define SLEWING_RA B00000001
3434
#define SLEWING_BOTH B00000011
3535
#define SLEWING_TRACKING B00001000
3636
#define NOT_SLEWING B00000000
37-
38-
// slewStatus
39-
#define SLEW_MASK_DEC B0011
40-
#define SLEW_MASK_NORTH B0001
41-
#define SLEW_MASK_SOUTH B0010
42-
#define SLEW_MASK_RA B1100
43-
#define SLEW_MASK_EAST B0100
44-
#define SLEW_MASK_WEST B1000
45-
#define SLEW_MASK_ANY B1111
37+
#define SLEW_MASK_ANY B1111
4638

4739
#define UART_CONNECTION_TEST_RETRIES 5
4840

@@ -2278,28 +2270,38 @@ String Mount::getStatusString()
22782270
{
22792271
byte slew = slewStatus();
22802272
if (slew & SLEWING_RA)
2281-
disp[0] = _stepperRA->speed() < 0 ? 'R' : 'r';
2273+
{
2274+
disp[0] = _stepperRA->targetPosition() < _stepperRA->currentPosition() ? 'R' : 'r';
2275+
}
22822276
if (slew & SLEWING_DEC)
2283-
disp[1] = _stepperDEC->speed() < 0 ? 'D' : 'd';
2277+
{
2278+
disp[1] = _stepperDEC->targetPosition() < _stepperDEC->currentPosition() ? 'D' : 'd';
2279+
}
22842280
if (slew & SLEWING_TRACKING)
2281+
{
22852282
disp[2] = 'T';
2283+
}
22862284
}
22872285
else if (isSlewingTRK())
22882286
{
22892287
disp[2] = 'T';
22902288
}
22912289
#if (AZ_STEPPER_TYPE != STEPPER_TYPE_NONE)
22922290
if (_stepperAZ->isRunning())
2293-
disp[3] = _stepperAZ->speed() < 0 ? 'Z' : 'z';
2291+
{
2292+
disp[3] = _stepperAZ->targetPosition() < _stepperAZ->currentPosition() ? 'Z' : 'z';
2293+
}
22942294
#endif
22952295
#if (ALT_STEPPER_TYPE != STEPPER_TYPE_NONE)
22962296
if (_stepperALT->isRunning())
2297-
disp[4] = _stepperALT->speed() < 0 ? 'A' : 'a';
2297+
{
2298+
disp[4] = _stepperALT->targetPosition() < _stepperALT->currentPosition() ? 'A' : 'a';
2299+
}
22982300
#endif
22992301

23002302
#if (FOCUS_STEPPER_TYPE != STEPPER_TYPE_NONE)
23012303
if (_stepperFocus->isRunning())
2302-
disp[5] = _stepperFocus->speed() < 0 ? 'F' : 'f';
2304+
disp[5] = _stepperFocus->targetPosition() < _stepperFocus->currentPosition() ? 'F' : 'f';
23032305
#endif
23042306

23052307
status += disp;
@@ -2320,7 +2322,7 @@ String Mount::getStatusString()
23202322

23212323
/////////////////////////////////
23222324
//
2323-
// slewingStatus
2325+
// slewStatus
23242326
//
23252327
// Returns the current state of the motors and is a bitfield with these flags:
23262328
// NOT_SLEWING is all zero. SLEWING_DEC, SLEWING_RA, SLEWING_BOTH, SLEWING_TRACKING are bits.

0 commit comments

Comments
 (0)