File tree Expand file tree Collapse file tree 4 files changed +54
-2
lines changed Expand file tree Collapse file tree 4 files changed +54
-2
lines changed Original file line number Diff line number Diff line change 1
1
** 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.
2
4
- Removing support for bluetooth
3
5
- Removing support for running steppers in main loop
4
6
Original file line number Diff line number Diff line change @@ -725,6 +725,14 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
725
725
// Returns:
726
726
// "integer|integer#"
727
727
//
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
+ //
728
736
// :XGS#
729
737
// Description:
730
738
// Get Tracking speed adjustment
@@ -871,6 +879,13 @@ bool gpsAqcuisitionComplete(int &indicator); // defined in c72_menuHA_GPS.hpp
871
879
// Clear the lower limit for the DEC stepper motor
872
880
// Returns: nothing
873
881
//
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
+ //
874
889
// :XSSn.nnn#
875
890
// Description:
876
891
// Set Tracking speed adjustment
@@ -1545,6 +1560,10 @@ String MeadeCommandProcessor::handleMeadeExtraCommands(String inCmd)
1545
1560
sprintf (scratchBuffer, " %ld|%ld#" , loLimit, hiLimit);
1546
1561
return String (scratchBuffer);
1547
1562
}
1563
+ if (inCmd[2 ] == ' P' ) // :XGDP#
1564
+ {
1565
+ return String (_mount->getDecParkingOffset ()) + " #" ;
1566
+ }
1548
1567
}
1549
1568
else // :XGD#
1550
1569
{
@@ -1647,6 +1666,10 @@ String MeadeCommandProcessor::handleMeadeExtraCommands(String inCmd)
1647
1666
_mount->clearDecLimitPosition (true );
1648
1667
}
1649
1668
}
1669
+ else if ((inCmd.length () > 3 ) && (inCmd[2 ] == ' P' )) // :XSDP
1670
+ {
1671
+ _mount->setDecParkingOffset (inCmd.substring (3 ).toInt ());
1672
+ }
1650
1673
else
1651
1674
{
1652
1675
_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()
111
111
_totalRAMove = 0 ;
112
112
_homeOffsetRA = 0 ;
113
113
_homeOffsetDEC = 0 ;
114
-
114
+ #if USE_HALL_SENSOR_RA_AUTOHOME == 1
115
+ _homing.state = HomingState::HOMING_NOT_ACTIVE;
116
+ #endif
115
117
_moveRate = 4 ;
116
118
_backlashCorrectionSteps = 0 ;
117
119
_correctForBacklash = false ;
@@ -3084,6 +3086,26 @@ void Mount::setParkingPosition()
3084
3086
EEPROMStore::storeDECParkingPos (_decParkingPos);
3085
3087
}
3086
3088
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
+
3087
3109
// ///////////////////////////////
3088
3110
//
3089
3111
// setDecLimitPosition
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ enum HomingState
33
33
{
34
34
HOMING_PIN_FINDING_START,
35
35
HOMING_PIN_FINDING_END,
36
- HOMING_PIN_FOUND
36
+ HOMING_PIN_FOUND,
37
+ HOMING_NOT_ACTIVE
37
38
};
38
39
39
40
struct HomingData {
@@ -308,6 +309,10 @@ class Mount
308
309
// Set the current stepper positions to be parking position.
309
310
void setParkingPosition ();
310
311
312
+ // Get and set the offset from home to the parking position for DEC.
313
+ long getDecParkingOffset ();
314
+ void setDecParkingOffset (long offset);
315
+
311
316
// Set the DEC limit position to the current stepper position. If upper is true, sets the upper limit, else the lower limit.
312
317
void setDecLimitPosition (bool upper);
313
318
You can’t perform that action at this time.
0 commit comments