diff --git a/Align.h b/Align.h index ee5dd6b4f..795c85b6f 100644 --- a/Align.h +++ b/Align.h @@ -8,9 +8,6 @@ #pragma once -byte alignNumStars = 0; -byte alignThisStar = 0; - // ----------------------------------------------------------------------------------- // ADVANCED GEOMETRIC ALIGN FOR ALT/AZM MOUNTS (GOTO ASSIST) @@ -46,7 +43,7 @@ class TGeoAlignH bool addStar(int I, int N, double RA, double Dec); void horToInstr(double Alt, double Azm, double *Alt1, double *Azm1, int PierSide); void instrToHor(double Alt, double Azm, double *Alt1, double *Azm1, int PierSide); - void autoModel(int n, bool start); + void autoModel(int n); private: boolean geo_ready; @@ -106,7 +103,8 @@ class TGeoAlign bool addStar(int I, int N, double RA, double Dec); void equToInstr(double Lat, double HA, double Dec, double *HA1, double *Dec1, int PierSide); void instrToEqu(double Lat, double HA, double Dec, double *HA1, double *Dec1, int PierSide); - void autoModel(int n, bool start); + void autoModel(int n); + void model(int n); private: boolean geo_ready; @@ -133,3 +131,23 @@ class TGeoAlign TGeoAlign Align; #endif +byte alignNumStars = 0; +byte alignThisStar = 0; + +// checks to see if an alignment is active +boolean alignActive() { + return (alignNumStars>0) && (alignThisStar <= alignNumStars); +} + +// adds an alignment star, returns true on success +boolean alignStar() { + // after last star turn meridian flips off when align is done + if ((alignNumStars == alignThisStar) && (meridianFlip == MeridianFlipAlign)) meridianFlip=MeridianFlipNever; + + if (alignThisStar <= alignNumStars) { + if (Align.addStar(alignThisStar,alignNumStars,newTargetRA,newTargetDec)) alignThisStar++; else return false; + } else return false; + + return true; +} + diff --git a/AlignEq.ino b/AlignEq.ino index 04fb21d2a..f714b5970 100644 --- a/AlignEq.ino +++ b/AlignEq.ino @@ -63,10 +63,7 @@ bool TGeoAlign::isReady() { bool TGeoAlign::addStar(int I, int N, double RA, double Dec) { // First star, just sync - if (I==1) { - // set the indexAxis1/2 offset - if (syncEqu(RA,Dec)!=0) return true; - } + if (I==1) { if (syncEqu(RA,Dec)!=GOTO_ERR_NONE) return false; } mount[I-1].ha=getInstrAxis1()/Rad; mount[I-1].dec=getInstrAxis2()/Rad; @@ -76,16 +73,20 @@ bool TGeoAlign::addStar(int I, int N, double RA, double Dec) { if (getInstrPierSide()==PierSideEast) { actual[I-1].side=1; mount[I-1].side=1; } else { actual[I-1].side=0; mount[I-1].side=0; } // two or more stars and finished - if ((I>=2) && (I==N)) { -#ifdef GOTO_ASSIST_DEBUG_ON - DL(""); -#endif - autoModel(N,true); - } + if ((I>=2) && (I==N)) model(N); return true; } +// kick off modeling +void TGeoAlign::model(int n) { + static bool busy=false; + static int numStars=0; + if (busy) return; // busy + if (n>0) { numStars=n; return; } // command + if (numStars>0) { busy=true; autoModel(numStars); busy=false; numStars=0; } // waiting to solve +} + // returns the correction to be added to the requested RA,Dec to yield the actual RA,Dec that we will arrive at void TGeoAlign::correct(double ha, double dec, double pierSide, double sf, double _deo, double _pd, double _pz, double _pe, double _da, double _ff, double _tf, double *h1, double *d1) { double DO1,DOh; @@ -239,110 +240,91 @@ void TGeoAlign::do_search(double sf, int p1, int p2, int p3, int p4, int p5, int if (p9!=0) best_ohw=ohw*Rad*3600.0; if (p9!=0) best_ohe=ohe*Rad*3600.0; } + + // keep the main loop running + loop2(); } } -void TGeoAlign::autoModel(int n, bool start) { - static int step=51; - if (start) step=0; - if (step>50) return; - step++; +void TGeoAlign::autoModel(int n) { + + num=n; // how many stars? + + lat=latitude/Rad; + cosLat=cos(lat); + sinLat=sin(lat); + + best_dist =3600.0*180.0; + best_deo =0.0; + best_pd =0.0; + best_pz =0.0; + best_pe =0.0; + best_tf =0.0; + best_ff =0.0; + best_df =0.0; + best_ode =0.0; + best_ohe =0.0; + + // figure out the average HA offset as a starting point + ohe=0; + for (l=1; lPI) h1=h1-PI*2.0; + if (h1<-PI) h1=h1+PI*2.0; + ohe=ohe+h1; + } + ohe=ohe/num; best_ohe=round(ohe*Rad*3600.0); best_ohw=best_ohe; - if (step==1) { - num=n; // how many stars? - - lat=latitude/Rad; - cosLat=cos(lat); - sinLat=sin(lat); - - best_dist =3600.0*180.0; - best_deo =0.0; - best_pd =0.0; - best_pz =0.0; - best_pe =0.0; - best_tf =0.0; - best_ff =0.0; - best_df =0.0; - best_ode =0.0; - best_ohe =0.0; - - // figure out the average HA offset as a starting point - ohe=0; - for (l=1; lPI) h1=h1-PI*2.0; - if (h1<-PI) h1=h1+PI*2.0; - ohe=ohe+h1; - } - ohe=ohe/num; best_ohe=round(ohe*Rad*3600.0); best_ohw=best_ohe; - #if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM) - Ff=1; Df=0; + Ff=1; Df=0; #else - Ff=0; Df=1; + Ff=0; Df=1; #endif - } + // search, this can handle about 9 degrees of polar misalignment, and 4 degrees of cone error + // DoPdPzPeTfFf Df OdOh + do_search(16384,0,0,1,1,0, 0, 0,1,1); + do_search( 8192,1,0,1,1,0, 0, 0,1,1); + do_search( 4096,1,0,1,1,0, 0, 0,1,1); + do_search( 2048,1,0,1,1,0, 0, 0,1,1); + do_search( 1024,1,0,1,1,0, 0, 0,1,1); + do_search( 512,1,0,1,1,0, 0, 0,1,1); #ifdef HAL_SLOW_PROCESSOR - // search, this can handle about 9 degrees of polar misalignment, and 2 degree of cone error - // DoPdPzPeTfFfDfOdOh - if (step==2) do_search(16384,0,0,1,1,0,0,0,1,0); - if (step==10) do_search( 8192,0,0,1,1,0,0,0,1,0); - if (step==15) do_search( 4096,1,0,1,1,0,0,0,1,0); - if (step==20) do_search( 2048,1,0,1,1,0,0,0,1,0); - if (step==25) do_search( 1024,1,0,1,1,0,0,0,1,0); - if (step==30) do_search( 512,0,0,1,1,0,0,0,1,1); - if (step==40) do_search( 256,0,0,1,1,0,0,0,1,1); -#elif HAL_FAST_PROCESSOR - // search, this can handle about 9 degrees of polar misalignment, and 4 degrees of cone error, 8' of FF/DF/PD - // DoPdPzPeTfFf Df OdOh - if (step==2) do_search(16384,0,0,1,1,0, 0, 0,1,1); - if (step==4) do_search( 8192,1,0,1,1,0, 0, 0,1,1); - if (step==6) do_search( 4096,1,0,1,1,0, 0, 0,1,1); - if (step==8) do_search( 2048,1,0,1,1,0, 0, 0,1,1); - if (step==10) do_search( 1024,1,0,1,1,0, 0, 0,1,1); - if (step==15) do_search( 512,1,0,1,1,0, 0, 0,1,1); + // DoPdPzPeTfFf Df OdOh + do_search( 256,1,0,1,1,0, 0, 0,1,1); + do_search( 128,1,0,1,1,0, 0, 0,1,1); +#else if (num>4) { - if (step==20) do_search( 256,1,1,1,1,0,Ff,Df,1,1); - if (step==30) do_search( 128,1,1,1,1,0,Ff,Df,1,1); - if (step==40) do_search( 64,1,1,1,1,0,Ff,Df,1,1); + // DoPdPzPeTfFf Df OdOh + do_search( 256,1,1,1,1,0,Ff,Df,1,1); + do_search( 128,1,1,1,1,0,Ff,Df,1,1); + do_search( 64,1,1,1,1,0,Ff,Df,1,1); + do_search( 32,1,1,1,1,0,Ff,Df,1,1); } else { - if (step==20) do_search( 256,1,0,1,1,0, 0, 0,1,1); - if (step==30) do_search( 128,1,0,1,1,0, 0, 0,1,1); - if (step==40) do_search( 64,1,0,1,1,0, 0, 0,1,1); + do_search( 256,1,0,1,1,0, 0, 0,1,1); + do_search( 128,1,0,1,1,0, 0, 0,1,1); + do_search( 64,1,0,1,1,0, 0, 0,1,1); + do_search( 32,1,0,1,1,0, 0, 0,1,1); } -#else - // search, this can handle about 9 degrees of polar misalignment, and 4 degrees of cone error - // DoPdPzPeTfFf Df OdOh - if (step==2) do_search(16384,0,0,1,1,0, 0, 0,1,1); - if (step==5) do_search( 8192,1,0,1,1,0, 0, 0,1,1); - if (step==10) do_search( 4096,1,0,1,1,0, 0, 0,1,1); - if (step==15) do_search( 2048,1,0,1,1,0, 0, 0,1,1); - if (step==20) do_search( 1024,1,0,1,1,0, 0, 0,1,1); - if (step==25) do_search( 512,1,0,1,1,0, 0, 0,1,1); - if (step==30) do_search( 256,1,0,1,1,0, 0, 0,1,1); - if (step==40) do_search( 128,1,0,1,1,0, 0, 0,1,1); #endif - if (step==50) { - // geometric corrections - doCor=best_deo/3600.0; - pdCor=best_pd/3600.0; - azmCor=best_pz/3600.0; - altCor=best_pe/3600.0; + // geometric corrections + doCor=best_deo/3600.0; + pdCor=best_pd/3600.0; + azmCor=best_pz/3600.0; + altCor=best_pe/3600.0; - tfCor=best_tf/3600.0; + tfCor=best_tf/3600.0; #if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM) - dfCor=best_df/3600.0; + dfCor=best_df/3600.0; #else - dfCor=best_ff/3600.0; + dfCor=best_ff/3600.0; #endif - ax1Cor=best_ohw/3600.0; - ax2Cor=best_odw/3600.0; + ax1Cor=best_ohw/3600.0; + ax2Cor=best_odw/3600.0; - geo_ready=true; - } + geo_ready=true; } // takes the topocentric refracted coordinates and applies corrections to arrive at instrument equatorial coordinates @@ -470,4 +452,5 @@ void TGeoAlign::instrToEqu(double Lat, double HA, double Dec, double *HA1, doubl if (*Dec1>90.0) *Dec1=90.0; if (*Dec1<-90.0) *Dec1=-90.0; } + #endif diff --git a/AlignHor.ino b/AlignHor.ino index 8fbf5993b..e42047c0a 100644 --- a/AlignHor.ino +++ b/AlignHor.ino @@ -65,10 +65,7 @@ bool TGeoAlignH::addStar(int I, int N, double RA, double Dec) { equToHor(haRange(LST()*15.0-RA),Dec,&a,&z); // First star, just sync - if (I==1) { - // set the indexAxis1/2 offset - if (syncEqu(RA,Dec)!=0) return true; - } + if (I==1) { if (syncEqu(RA,Dec)!=GOTO_ERR_NONE) return false; } mount[I-1].azm=getInstrAxis1(); mount[I-1].alt=getInstrAxis2(); @@ -90,16 +87,20 @@ bool TGeoAlignH::addStar(int I, int N, double RA, double Dec) { if (getInstrPierSide()==PierSideEast) { actual[I-1].side=1; mount[I-1].side=1; } else { actual[I-1].side=0; mount[I-1].side=0; } // two or more stars and finished - if ((I>=2) && (I==N)) { -#ifdef GOTO_ASSIST_DEBUG_ON - DL(""); -#endif - autoModel(N,true); - } + if ((I>=2) && (I==N)) model(N); return true; } +// kick off modeling +void TGeoAlignH::model(int n) { + static bool busy=false; + static int numStars=0; + if (busy) return; // busy + if (n>0) { numStars=n; return; } // command + if (numStars>0) { busy=true; autoModel(numStars); busy=false; numStars=0; } // waiting to solve +} + // returns the correction to be added to the requested RA,Dec to yield the actual RA,Dec that we will arrive at void TGeoAlignH::correct(double azm, double alt, double pierSide, double sf, double _deo, double _pd, double _pz, double _pe, double _da, double _ff, double _tf, double *z1, double *a1) { double DO1,DOh; @@ -253,110 +254,91 @@ void TGeoAlignH::do_search(double sf, int p1, int p2, int p3, int p4, int p5, in if (p9!=0) best_ohw=ohw*Rad*3600.0; if (p9!=0) best_ohe=ohe*Rad*3600.0; } + + // keep the main loop running + loop2(); } } -void TGeoAlignH::autoModel(int n, bool start) { - static int step=51; - if (start) step=0; - if (step>50) return; - step++; - - if (step==1) { - num=n; // how many stars? +void TGeoAlignH::autoModel(int n) { + + num=n; // how many stars? + + lat=90.0/Rad; // 90 deg. latitude for Alt/Azm + cosLat=cos(lat); + sinLat=sin(lat); + + best_dist =3600.0*180.0; + best_deo =0.0; + best_pd =0.0; + best_pz =0.0; + best_pe =0.0; + best_tf =0.0; + best_ff =0.0; + best_df =0.0; + best_ode =0.0; + best_ohe =0.0; + + // figure out the average Az offset as a starting point + ohe=0; + for (l=1; lPI) z1=z1-PI*2.0; + if (z1<-PI) z1=z1+PI*2.0; + ohe=ohe+z1; + } + ohe=ohe/num; best_ohe=round(ohe*Rad*3600.0); best_ohw=best_ohe; - lat=90.0/Rad; // 90 deg. latitude for Alt/Azm - cosLat=cos(lat); - sinLat=sin(lat); - - best_dist =3600.0*180.0; - best_deo =0.0; - best_pd =0.0; - best_pz =0.0; - best_pe =0.0; - best_tf =0.0; - best_ff =0.0; - best_df =0.0; - best_ode =0.0; - best_ohe =0.0; - - // figure out the average HA offset as a starting point - ohe=0; - for (l=1; lPI) z1=z1-PI*2.0; - if (z1<-PI) z1=z1+PI*2.0; - ohe=ohe+z1; - } - ohe=ohe/num; best_ohe=round(ohe*Rad*3600.0); best_ohw=best_ohe; - #if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM) - Ff=1; Df=0; + Ff=1; Df=0; #else - Ff=0; Df=1; + Ff=0; Df=1; #endif - } + // search, this can handle about 9 degrees of polar misalignment, and 4 degrees of cone error + // DoPdPzPeTfFf Df OdOh + do_search(16384,0,0,1,1,0, 0, 0,1,1); + do_search( 8192,1,0,1,1,0, 0, 0,1,1); + do_search( 4096,1,0,1,1,0, 0, 0,1,1); + do_search( 2048,1,0,1,1,0, 0, 0,1,1); + do_search( 1024,1,0,1,1,0, 0, 0,1,1); + do_search( 512,1,0,1,1,0, 0, 0,1,1); #ifdef HAL_SLOW_PROCESSOR - // search, this can handle about 9 degrees of polar misalignment, and 2 degree of cone error - // DoPdPzPeTfFfDfOdOh - if (step==2) do_search(16384,0,0,1,1,0,0,0,1,0); - if (step==10) do_search( 8192,0,0,1,1,0,0,0,1,0); - if (step==15) do_search( 4096,1,0,1,1,0,0,0,1,0); - if (step==20) do_search( 2048,1,0,1,1,0,0,0,1,0); - if (step==25) do_search( 1024,1,0,1,1,0,0,0,1,0); - if (step==30) do_search( 512,1,0,1,1,0,0,0,1,0); - if (step==40) do_search( 256,1,0,1,1,0,0,0,1,0); -#elif HAL_FAST_PROCESSOR - // search, this can handle about 9 degrees of polar misalignment, and 4 degrees of cone error, 8' of FF/DF/PD - // DoPdPzPeTfFf Df OdOh - if (step==2) do_search(16384,0,0,1,1,0, 0, 0,1,1); - if (step==4) do_search( 8192,1,0,1,1,0, 0, 0,1,1); - if (step==6) do_search( 4096,1,0,1,1,0, 0, 0,1,1); - if (step==8) do_search( 2048,1,0,1,1,0, 0, 0,1,1); - if (step==10) do_search( 1024,1,0,1,1,0, 0, 0,1,1); - if (step==15) do_search( 512,1,0,1,1,0, 0, 0,1,1); + // DoPdPzPeTfFf Df OdOh + do_search( 256,1,0,1,1,0, 0, 0,1,1); + do_search( 128,1,0,1,1,0, 0, 0,1,1); +#else if (num>4) { - if (step==20) do_search( 256,1,1,1,1,0,Ff,Df,1,1); - if (step==30) do_search( 128,1,1,1,1,0,Ff,Df,1,1); - if (step==40) do_search( 64,1,1,1,1,0,Ff,Df,1,1); + // DoPdPzPeTfFf Df OdOh + do_search( 256,1,1,1,1,0,Ff,Df,1,1); + do_search( 128,1,1,1,1,0,Ff,Df,1,1); + do_search( 64,1,1,1,1,0,Ff,Df,1,1); + do_search( 32,1,1,1,1,0,Ff,Df,1,1); } else { - if (step==20) do_search( 256,1,0,1,1,0, 0, 0,1,1); - if (step==30) do_search( 128,1,0,1,1,0, 0, 0,1,1); - if (step==40) do_search( 64,1,0,1,1,0, 0, 0,1,1); + do_search( 256,1,0,1,1,0, 0, 0,1,1); + do_search( 128,1,0,1,1,0, 0, 0,1,1); + do_search( 64,1,0,1,1,0, 0, 0,1,1); + do_search( 32,1,0,1,1,0, 0, 0,1,1); } -#else - // search, this can handle about 9 degrees of polar misalignment, and 4 degrees of cone error - // DoPdPzPeTfFf Df OdOh - if (step==2) do_search(16384,0,0,1,1,0, 0, 0,1,1); - if (step==5) do_search( 8192,1,0,1,1,0, 0, 0,1,1); - if (step==10) do_search( 4096,1,0,1,1,0, 0, 0,1,1); - if (step==15) do_search( 2048,1,0,1,1,0, 0, 0,1,1); - if (step==20) do_search( 1024,1,0,1,1,0, 0, 0,1,1); - if (step==25) do_search( 512,1,0,1,1,0, 0, 0,1,1); - if (step==30) do_search( 256,1,0,1,1,0, 0, 0,1,1); - if (step==40) do_search( 128,1,0,1,1,0, 0, 0,1,1); #endif - if (step==50) { - // geometric corrections - doCor=best_deo/3600.0; - pdCor=best_pd/3600.0; - azmCor=best_pz/3600.0; - altCor=best_pe/3600.0; + // geometric corrections + doCor=best_deo/3600.0; + pdCor=best_pd/3600.0; + azmCor=best_pz/3600.0; + altCor=best_pe/3600.0; - tfCor=best_tf/3600.0; + tfCor=best_tf/3600.0; #if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM) - dfCor=best_df/3600.0; + dfCor=best_df/3600.0; #else - dfCor=best_ff/3600.0; + dfCor=best_ff/3600.0; #endif - ax1Cor=best_ohw/3600.0; - ax2Cor=best_odw/3600.0; + ax1Cor=best_ohw/3600.0; + ax2Cor=best_odw/3600.0; - geo_ready=true; - } + geo_ready=true; } void TGeoAlignH::horToInstr(double Alt, double Azm, double *Alt1, double *Azm1, int PierSide) { diff --git a/Command.ino b/Command.ino index 820544737..c2380faab 100644 --- a/Command.ino +++ b/Command.ino @@ -249,7 +249,7 @@ void processCommands() { if (alignActive()) { if (alignStar()) i=GOTO_ERR_NONE; else { i=GOTO_ERR_UNSPECIFIED; alignNumStars=0; alignThisStar=0; } } else { - i=syncEqu(newTargetRA,newTargetDec); + i=syncEqu(newTargetRA,newTargetDec); } if (command[1]=='M') { @@ -1466,7 +1466,7 @@ void processCommands() { case '7': Align.dfCor=(double)strtol(¶meter[3],NULL,10)/3600.0; break; // dfCor #endif case '8': Align.tfCor=(double)strtol(¶meter[3],NULL,10)/3600.0; break; // tfCor - case '9': { i=strtol(¶meter[3],NULL,10); if (i==1) { alignNumStars=star; alignThisStar=star+1; Align.autoModel(star,true); } else star=0; } break; // use 0 to start upload of stars for align, use 1 to trigger align + case '9': { i=strtol(¶meter[3],NULL,10); if (i==1) { alignNumStars=star; alignThisStar=star+1; Align.autoModel(star); } else star=0; } break; // use 0 to start upload of stars for align, use 1 to trigger align case 'A': { i=highPrecision; highPrecision=true; if (!hmsToDouble(&Align.actual[star].ha,¶meter[3])) commandError=true; else Align.actual[star].ha=(Align.actual[star].ha*15.0)/Rad; highPrecision=i; } break; // Star #n HA case 'B': { i=highPrecision; highPrecision=true; if (!dmsToDouble(&Align.actual[star].dec,¶meter[3],true)) commandError=true; else Align.actual[star].dec=Align.actual[star].dec/Rad; highPrecision=i; } break; // Star #n Dec case 'C': { i=highPrecision; highPrecision=true; if (!hmsToDouble(&Align.mount[star].ha,¶meter[3])) commandError=true; else Align.mount[star].ha=(Align.mount[star].ha*15.0)/Rad; highPrecision=i; } break; // Mount #n HA @@ -1996,19 +1996,3 @@ bool cmdReply(char *s) { return true; } -// checks to see if an alignment is active -boolean alignActive() { - return (alignNumStars>0) && (alignThisStar <= alignNumStars); -} - -// adds an alignment star, returns true on success -boolean alignStar() { - // after last star turn meridian flips off when align is done - if ((alignNumStars == alignThisStar) && (meridianFlip == MeridianFlipAlign)) meridianFlip=MeridianFlipNever; - - if (alignThisStar <= alignNumStars) { - if (Align.addStar(alignThisStar,alignNumStars,newTargetRA,newTargetDec)) alignThisStar++; else return false; - } else return false; - - return true; -} diff --git a/Goto.ino b/Goto.ino index ae98b1094..b80799037 100644 --- a/Goto.ino +++ b/Goto.ino @@ -91,6 +91,9 @@ GotoErrors syncEnc(double EncAxis1, double EncAxis2) { // validate GotoErrors f=validateGoto(); if (f!=GOTO_ERR_NONE) return f; + // no sync from encoders during an alignment! + if (alignActive()) return GOTO_ERR_NONE; + long e1=EncAxis1*(double)StepsPerDegreeAxis1; long e2=EncAxis2*(double)StepsPerDegreeAxis2; diff --git a/OnStep.ino b/OnStep.ino index 921782707..18e658273 100644 --- a/OnStep.ino +++ b/OnStep.ino @@ -259,6 +259,11 @@ void setup() { } void loop() { + loop2(); + Align.model(0); // GTA compute pointing model, this will call loop2() during extended processing +} + +void loop2() { // GUIDING ------------------------------------------------------------------------------------------- ST4(); if ((trackingState!=TrackingMoveTo) && (parkStatus==NotParked)) guide(); @@ -387,9 +392,6 @@ void loop() { double t2=(double)((cs-lst_start)/100.0)/1.00273790935; // This just needs to be accurate to the nearest second, it's about 10x better UT1=UT1_start+(t2/3600.0); - - // compute the alignment model - if (lst%2==0) Align.autoModel(0,false); } // ROTATOR/DEROTATOR/FOCUSERS ------------------------------------------------------------------------ diff --git a/Validate.h b/Validate.h index f9ca3ebad..03dde5638 100644 --- a/Validate.h +++ b/Validate.h @@ -226,26 +226,14 @@ #endif // figure out how many align star are allowed for the configuration -#ifdef HAL_SLOW_PROCESSOR - #if defined(MOUNT_TYPE_GEM) - #define MAX_NUM_ALIGN_STARS '4' - #elif defined(MOUNT_TYPE_FORK) - #define MAX_NUM_ALIGN_STARS '4' - #elif defined(MOUNT_TYPE_FORK_ALT) - #define MAX_NUM_ALIGN_STARS '4' - #elif defined(MOUNT_TYPE_ALTAZM) - #define MAX_NUM_ALIGN_STARS '4' - #endif -#else - #if defined(MOUNT_TYPE_GEM) - #define MAX_NUM_ALIGN_STARS '6' - #elif defined(MOUNT_TYPE_FORK) - #define MAX_NUM_ALIGN_STARS '6' - #elif defined(MOUNT_TYPE_FORK_ALT) - #define MAX_NUM_ALIGN_STARS '6' - #elif defined(MOUNT_TYPE_ALTAZM) - #define MAX_NUM_ALIGN_STARS '6' - #endif +#if defined(MOUNT_TYPE_GEM) + #define MAX_NUM_ALIGN_STARS '6' +#elif defined(MOUNT_TYPE_FORK) + #define MAX_NUM_ALIGN_STARS '6' +#elif defined(MOUNT_TYPE_FORK_ALT) + #define MAX_NUM_ALIGN_STARS '6' +#elif defined(MOUNT_TYPE_ALTAZM) + #define MAX_NUM_ALIGN_STARS '6' #endif // make both enable and disable values