File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11** V1.9.34 - Updates**
2+ - Added two Meade commands: : XGDP # and : XSDPnnn # to retrieve and set the DEC parking offset.
3+ - Fixed a bug that incorrectly returned a Homing status when the Hall sensor was enabled.
24- Removing support for bluetooth
35- Removing support for running steppers in main loop
46
Original file line number Diff line number Diff line change @@ -725,6 +725,14 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
725725// Returns:
726726// "integer|integer#"
727727//
728+ // :XGDP#
729+ // Description:
730+ // Get DEC parking position
731+ // Information:
732+ // Gets the number of steps from the home position to the parking position for DEC
733+ // Returns:
734+ // "long#"
735+ //
728736// :XGS#
729737// Description:
730738// Get Tracking speed adjustment
@@ -871,6 +879,13 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
871879// Clear the lower limit for the DEC stepper motor
872880// Returns: nothing
873881//
882+ // :XSDPnnnn#
883+ // Description:
884+ // Set DEC parking position offset
885+ // Information:
886+ // This stores the number of steps needed to move from home to the parking position.
887+ // Returns: nothing
888+ //
874889// :XSSn.nnn#
875890// Description:
876891// Set Tracking speed adjustment
@@ -1545,6 +1560,10 @@ String MeadeCommandProcessor::handleMeadeExtraCommands(String inCmd)
15451560 sprintf (scratchBuffer, " %ld|%ld#" , loLimit, hiLimit);
15461561 return String (scratchBuffer);
15471562 }
1563+ if (inCmd[2 ] == ' P' ) // :XGDP#
1564+ {
1565+ return String (_mount->getDecParkingOffset ()) + " #" ;
1566+ }
15481567 }
15491568 else // :XGD#
15501569 {
@@ -1647,6 +1666,10 @@ String MeadeCommandProcessor::handleMeadeExtraCommands(String inCmd)
16471666 _mount->clearDecLimitPosition (true );
16481667 }
16491668 }
1669+ else if ((inCmd.length () > 3 ) && (inCmd[2 ] == ' P' )) // :XSDP
1670+ {
1671+ _mount->setDecParkingOffset (inCmd.substring (3 ).toInt ());
1672+ }
16501673 else
16511674 {
16521675 _mount->setStepsPerDegree (DEC_STEPS, inCmd.substring (2 ).toFloat ());
Original file line number Diff line number Diff line change @@ -111,7 +111,9 @@ void Mount::initializeVariables()
111111 _totalRAMove = 0 ;
112112 _homeOffsetRA = 0 ;
113113 _homeOffsetDEC = 0 ;
114-
114+ #if USE_HALL_SENSOR_RA_AUTOHOME == 1
115+ _homing.state = HomingState::HOMING_NOT_ACTIVE;
116+ #endif
115117 _moveRate = 4 ;
116118 _backlashCorrectionSteps = 0 ;
117119 _correctForBacklash = false ;
@@ -3084,6 +3086,26 @@ void Mount::setParkingPosition()
30843086 EEPROMStore::storeDECParkingPos (_decParkingPos);
30853087}
30863088
3089+ // ///////////////////////////////
3090+ //
3091+ // getDecParkingOffset
3092+ //
3093+ // ///////////////////////////////
3094+ long Mount::getDecParkingOffset ()
3095+ {
3096+ return EEPROMStore::getDECParkingPos ();
3097+ }
3098+
3099+ // ///////////////////////////////
3100+ //
3101+ // setDecParkingOffset
3102+ //
3103+ // ///////////////////////////////
3104+ void Mount::setDecParkingOffset (long offset)
3105+ {
3106+ EEPROMStore::storeDECParkingPos (offset);
3107+ }
3108+
30873109// ///////////////////////////////
30883110//
30893111// setDecLimitPosition
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ enum HomingState
3333{
3434 HOMING_PIN_FINDING_START,
3535 HOMING_PIN_FINDING_END,
36- HOMING_PIN_FOUND
36+ HOMING_PIN_FOUND,
37+ HOMING_NOT_ACTIVE
3738};
3839
3940struct HomingData {
@@ -308,6 +309,10 @@ class Mount
308309 // Set the current stepper positions to be parking position.
309310 void setParkingPosition ();
310311
312+ // Get and set the offset from home to the parking position for DEC.
313+ long getDecParkingOffset ();
314+ void setDecParkingOffset (long offset);
315+
311316 // Set the DEC limit position to the current stepper position. If upper is true, sets the upper limit, else the lower limit.
312317 void setDecLimitPosition (bool upper);
313318
You can’t perform that action at this time.
0 commit comments