Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
End of goto soundAlert() moved to end of tracking sync
  • Loading branch information
hjd1964 committed Jan 16, 2019
1 parent ee77af9 commit 31abbdc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 9 additions & 0 deletions Astro.ino
Expand Up @@ -352,7 +352,15 @@ void horToEqu(double Alt, double Azm, double *HA, double *Dec) {
double _deltaAxis1=15.0,_deltaAxis2=0.0;

boolean trackingSyncInProgress() {
static int lastTrackingSyncSeconds=0;

if ((trackingSyncSeconds > 0) && (trackingState!=TrackingSidereal)) trackingSyncSeconds=0;

// sound goto done
if ((trackingSyncSeconds==0) and (lastTrackingSyncSeconds!=trackingSyncSeconds)) soundAlert();

lastTrackingSyncSeconds=trackingSyncSeconds;

return trackingSyncSeconds > 0;
}

Expand All @@ -361,6 +369,7 @@ void setDeltaTrackingRate() {

if (trackingSyncInProgress()) {
trackingSyncSeconds--;

#ifdef MOUNT_TYPE_ALTAZM
double a,z,d1,d2,newTargetAlt,newTargetAzm;
getHor(&a,&z);
Expand Down
7 changes: 3 additions & 4 deletions MoveTo.ino
Expand Up @@ -249,16 +249,16 @@ void moveTo() {
// wrap it up
parkFinish();
} else {
// sound goto done
soundAlert();

// restore last tracking state
cli();
timerRateAxis1=SiderealRate;
timerRateAxis2=SiderealRate;
sei();

if (homeMount) {
// sound goto done
soundAlert();

// clear the backlash
if (parkClearBacklash()==-1) return; // working, no error flagging

Expand Down Expand Up @@ -305,4 +305,3 @@ uint32_t isqrt32 (uint32_t n) {
void stopLimit() {
if (trackingState==TrackingMoveTo) { if (!abortSlew) abortSlew=StartAbortSlew; } else trackingState=TrackingNone;
}

0 comments on commit 31abbdc

Please sign in to comment.