diff --git a/AlignEq.ino b/AlignEq.ino index 1e0a8d849..caa016815 100644 --- a/AlignEq.ino +++ b/AlignEq.ino @@ -276,7 +276,7 @@ void TGeoAlign::autoModel(int n) { } ohe=ohe/num; best_ohe=round(ohe*Rad*3600.0); best_ohw=best_ohe; -#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) +#ifdef MOUNT_TYPE_FORK Ff=1; Df=0; #else Ff=0; Df=1; @@ -325,7 +325,7 @@ void TGeoAlign::autoModel(int n) { altCor=best_pe/3600.0; tfCor=best_tf/3600.0; -#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM) +#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_ALTAZM) dfCor=best_ff/3600.0; #else dfCor=best_df/3600.0; @@ -369,7 +369,7 @@ void TGeoAlign::equToInstr(double HA, double Dec, double *HA1, double *Dec1, int // misalignment due to Dec axis being perp. to RA axis double PDh=-pdCor*(sinDec/cosDec)*p; - #if defined (MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) + #ifdef MOUNT_TYPE_FORK // Fork flex double DFd=dfCor*cosHA; #else @@ -432,7 +432,7 @@ void TGeoAlign::instrToEqu(double HA, double Dec, double *HA1, double *Dec1, int // works on HA instead. meridian flips affect this in HA double PDh=-pdCor*(sinDec/cosDec)*p; -#if defined (MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) +#ifdef MOUNT_TYPE_FORK // Fork flex double DFd=dfCor*cosHA; #else diff --git a/AlignHor.ino b/AlignHor.ino index c72c69447..0e47187c7 100644 --- a/AlignHor.ino +++ b/AlignHor.ino @@ -335,7 +335,7 @@ void TGeoAlignH::autoModel(int n) { altCor=best_pe/3600.0; tfCor=best_tf/3600.0; -#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM) +#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_ALTAZM) dfCor=best_ff/3600.0; #else dfCor=best_df/3600.0; @@ -380,7 +380,7 @@ void TGeoAlignH::horToInstr(double Alt, double Azm, double *Alt1, double *Azm1, // misalignment due to Alt axis being perp. to Azm axis double PDh=-pdCor*(sinAlt/cosAlt)*p; - #if defined (MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM) + #if defined (MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_ALTAZM) // Fork flex double DFd=dfCor*cosAzm; #else @@ -446,7 +446,7 @@ void TGeoAlignH::instrToHor(double Alt, double Azm, double *Alt1, double *Azm1, // works on Azm instead. meridian flips affect this in Azm double PDh=-pdCor*(sinAlt/cosAlt)*p; -#if defined (MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) +#ifdef MOUNT_TYPE_FORK // Fork flex double DFd=dfCor*cosAzm; #else diff --git a/Command.ino b/Command.ino index 3b8be1ea1..1743a34c4 100644 --- a/Command.ino +++ b/Command.ino @@ -665,8 +665,6 @@ void processCommands() { reply[i++]='E'; #elif defined(MOUNT_TYPE_FORK) reply[i++]='K'; - #elif defined(MOUNT_TYPE_FORK_ALT) - reply[i++]='k'; #elif defined(MOUNT_TYPE_ALTAZM) reply[i++]='A'; #endif @@ -723,8 +721,6 @@ void processCommands() { reply[3]|=0b10000001; // GEM #elif defined(MOUNT_TYPE_FORK) reply[3]|=0b10000010; // FORK - #elif defined(MOUNT_TYPE_FORK_ALT) - reply[3]|=0b10000100; // FORK ALT #elif defined(MOUNT_TYPE_ALTAZM) reply[3]|=0b10001000; // ALTAZM #endif @@ -778,7 +774,7 @@ void processCommands() { case '3': sprintf(reply,"%ld",(long)(Align.azmCor*3600.0)); quietReply=true; break; // azmCor case '4': sprintf(reply,"%ld",(long)(Align.doCor*3600.0)); quietReply=true; break; // doCor case '5': sprintf(reply,"%ld",(long)(Align.pdCor*3600.0)); quietReply=true; break; // pdCor -#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM) +#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_ALTAZM) case '6': sprintf(reply,"%ld",(long)(Align.dfCor*3600.0)); quietReply=true; break; // ffCor case '7': sprintf(reply,"%ld",(long)(0)); quietReply=true; break; // dfCor #else @@ -1665,7 +1661,7 @@ void processCommands() { case '3': Align.azmCor=(double)strtol(¶meter[3],NULL,10)/3600.0; break; // azmCor case '4': Align.doCor=(double)strtol(¶meter[3],NULL,10)/3600.0; break; // doCor case '5': Align.pdCor=(double)strtol(¶meter[3],NULL,10)/3600.0; break; // pdCor -#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) +#ifdef MOUNT_TYPE_FORK case '6': Align.dfCor=(double)strtol(¶meter[3],NULL,10)/3600.0; break; // ffCor case '7': break; // dfCor #else diff --git a/Config.Classic.h b/Config.Classic.h index 5ca4b020a..a20068e80 100644 --- a/Config.Classic.h +++ b/Config.Classic.h @@ -19,7 +19,8 @@ // Default speed for Serial1 com port, Default=9600 #define SERIAL_B_BAUD_DEFAULT 9600 -// Mount type, default is _GEM (German Equatorial) other options are _FORK, _FORK_ALT. _FORK switches off Meridian Flips after alignment is done. _FORK_ALT disables Meridian Flips. _ALTAZM is for Alt/Azm mounted 'scopes. +// Mount type, default is _GEM (German Equatorial.) This allows Meridian flips and can be used for other mount types if that behaviour is desired. _FORK switches off Meridian Flips +// but allows travel across the Meridian. _ALTAZM is for Alt/Azm mounted 'scopes. #define MOUNT_TYPE_GEM // Strict parking, default=_OFF. Set to _ON and unparking is only allowed if successfully parked. Otherwise unparking is allowed if at home and not parked (the Home/Reset command ":hF#" sets this state.) diff --git a/Config.MaxESP2.h b/Config.MaxESP2.h index 4fdd8f34f..8e0a68456 100644 --- a/Config.MaxESP2.h +++ b/Config.MaxESP2.h @@ -32,7 +32,8 @@ // For an ESP32 SerialC is the Bluetooth port so use a name instead of a baud "ONSTEP", etc. #define SERIAL_C_BAUD_DEFAULT_OFF -// Mount type, default is _GEM (German Equatorial) other options are _FORK, _FORK_ALT. _FORK switches off Meridian Flips after alignment is done. _FORK_ALT disables Meridian Flips. _ALTAZM is for Alt/Azm mounted 'scopes. +// Mount type, default is _GEM (German Equatorial.) This allows Meridian flips and can be used for other mount types if that behaviour is desired. _FORK switches off Meridian Flips +// but allows travel across the Meridian. _ALTAZM is for Alt/Azm mounted 'scopes. #define MOUNT_TYPE_GEM // Strict parking, default=_OFF. Set to _ON and unparking is only allowed if successfully parked. Otherwise unparking is allowed if at home and not parked (the Home/Reset command ":hF#" sets this state.) diff --git a/Config.MaxPCB.h b/Config.MaxPCB.h index 335f1d896..46ec93304 100644 --- a/Config.MaxPCB.h +++ b/Config.MaxPCB.h @@ -23,8 +23,9 @@ // Pin 18 (Aux1) for GPIO0 and Pin 5 (Aux2) for Rst control. Choose only one feature on Aux1/2. #define ESP8266_CONTROL_OFF -// Mount type, default is _GEM (German Equatorial) other options are _FORK, _FORK_ALT. _FORK switches off Meridian Flips after alignment is done. _FORK_ALT disables Meridian Flips. _ALTAZM is for Alt/Azm mounted 'scopes. #define MOUNT_TYPE_GEM +// Mount type, default is _GEM (German Equatorial.) This allows Meridian flips and can be used for other mount types if that behaviour is desired. _FORK switches off Meridian Flips +// but allows travel across the Meridian. _ALTAZM is for Alt/Azm mounted 'scopes. // Strict parking, default=_OFF. Set to _ON and unparking is only allowed if successfully parked. Otherwise unparking is allowed if at home and not parked (the Home/Reset command ":hF#" sets this state.) #define STRICT_PARKING_OFF diff --git a/Config.MiniPCB.h b/Config.MiniPCB.h index c39f995fd..d6110c76c 100644 --- a/Config.MiniPCB.h +++ b/Config.MiniPCB.h @@ -22,7 +22,8 @@ // Pin 18 (Aux1) for GPIO0 and Pin 5 (Aux2) for Rst control. Choose only one feature on Aux1/2. #define ESP8266_CONTROL_OFF -// Mount type, default is _GEM (German Equatorial) other options are _FORK, _FORK_ALT. _FORK switches off Meridian Flips after alignment is done. _FORK_ALT disables Meridian Flips. _ALTAZM is for Alt/Azm mounted 'scopes. +// Mount type, default is _GEM (German Equatorial.) This allows Meridian flips and can be used for other mount types if that behaviour is desired. _FORK switches off Meridian Flips +// but allows travel across the Meridian. _ALTAZM is for Alt/Azm mounted 'scopes. #define MOUNT_TYPE_GEM // Strict parking, default=_OFF. Set to _ON and unparking is only allowed if successfully parked. Otherwise unparking is allowed if at home and not parked (the Home/Reset command ":hF#" sets this state.) diff --git a/Config.Ramps14.h b/Config.Ramps14.h index 65d24b7a3..fee49059d 100644 --- a/Config.Ramps14.h +++ b/Config.Ramps14.h @@ -25,7 +25,8 @@ // Default speed for Serial1 com port, Default=9600 #define SERIAL_B_BAUD_DEFAULT 9600 -// Mount type, default is _GEM (German Equatorial) other options are _FORK, _FORK_ALT. _FORK switches off Meridian Flips after alignment is done. _FORK_ALT disables Meridian Flips. _ALTAZM is for Alt/Azm mounted 'scopes. +// Mount type, default is _GEM (German Equatorial.) This allows Meridian flips and can be used for other mount types if that behaviour is desired. _FORK switches off Meridian Flips +// but allows travel across the Meridian. _ALTAZM is for Alt/Azm mounted 'scopes. #define MOUNT_TYPE_GEM // Strict parking, default=_OFF. Set to _ON and unparking is only allowed if successfully parked. Otherwise unparking is allowed if at home and not parked (the Home/Reset command ":hF#" sets this state.) diff --git a/Config.STM32.h b/Config.STM32.h index e5e4fcbd9..f3d4f1ce0 100644 --- a/Config.STM32.h +++ b/Config.STM32.h @@ -25,7 +25,8 @@ // Pin (Aux1) for GPIO0 and Pin (Aux2) for Rst control. Choose only one feature on Aux1/2. #define ESP8266_CONTROL_OFF -// Mount type, default is _GEM (German Equatorial) other options are _FORK, _FORK_ALT. _FORK switches off Meridian Flips after alignment is done. _FORK_ALT disables Meridian Flips. _ALTAZM is for Alt/Azm mounted 'scopes. +// Mount type, default is _GEM (German Equatorial.) This allows Meridian flips and can be used for other mount types if that behaviour is desired. _FORK switches off Meridian Flips +// but allows travel across the Meridian. _ALTAZM is for Alt/Azm mounted 'scopes. #define MOUNT_TYPE_GEM // Strict parking, default=_OFF. Set to _ON and unparking is only allowed if successfully parked. Otherwise unparking is allowed if at home and not parked (the Home/Reset command ":hF#" sets this state.) diff --git a/Globals.h b/Globals.h index cd0a5b2c0..e0aa7dcf2 100644 --- a/Globals.h +++ b/Globals.h @@ -114,7 +114,7 @@ double sinLat = 0.0; double longitude = 0.0; // fix UnderPoleLimit for fork mounts -#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) +#ifdef MOUNT_TYPE_FORK #undef UnderPoleLimit #define UnderPoleLimit 12 #endif @@ -123,7 +123,7 @@ double longitude = 0.0; #ifdef MOUNT_TYPE_GEM double homePositionAxis1 = 90.0; #endif -#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_FORK_ALT) || defined(MOUNT_TYPE_ALTAZM) +#if defined(MOUNT_TYPE_FORK) || defined(MOUNT_TYPE_ALTAZM) double homePositionAxis1 = 0.0; #endif double homePositionAxis2 = 90.0; @@ -204,9 +204,6 @@ boolean axis2Enabled = false; byte meridianFlip = MeridianFlipAlways; #endif #ifdef MOUNT_TYPE_FORK -byte meridianFlip = MeridianFlipAlign; -#endif -#ifdef MOUNT_TYPE_FORK_ALT byte meridianFlip = MeridianFlipNever; #endif #ifdef MOUNT_TYPE_ALTAZM diff --git a/Goto.ino b/Goto.ino index 42f277d81..c88b8e97c 100644 --- a/Goto.ino +++ b/Goto.ino @@ -76,7 +76,7 @@ GotoErrors syncEqu(double RA, double Dec) { #endif } else { // always on the "east" side of pier - we're in the western sky and the HA's are positive - // this is the default in the polar-home position and also for MOUNT_TYPE_FORK and MOUNT_TYPE_ALTAZM. MOUNT_TYPE_FORK_ALT ends up pierSideEast, but flips are allowed until aligned. + // this is the default in the polar-home position and also for MOUNT_TYPE_FORK and MOUNT_TYPE_ALTAZM. newPierSide=PierSideEast; } @@ -333,7 +333,7 @@ GotoErrors goTo(double thisTargetAxis1, double thisTargetAxis2, double altTarget } else { if (getInstrPierSide()==PierSideNone) { // always on the "east" side of pier - we're in the western sky and the HA's are positive - // this is the default in the polar-home position and also for MOUNT_TYPE_FORK and MOUNT_TYPE_ALTAZM. MOUNT_TYPE_FORK_ALT ends up pierSideEast, but flips are allowed until aligned. + // this is the default in the polar-home position and also for MOUNT_TYPE_FORK and MOUNT_TYPE_ALTAZM. thisPierSide=PierSideEast; } } diff --git a/Initialize.ino b/Initialize.ino index 4bbd60a9f..ab4730f99 100644 --- a/Initialize.ino +++ b/Initialize.ino @@ -72,9 +72,6 @@ void initStartupValues() { meridianFlip = MeridianFlipAlways; #endif #ifdef MOUNT_TYPE_FORK - meridianFlip = MeridianFlipAlign; - #endif - #ifdef MOUNT_TYPE_FORK_ALT meridianFlip = MeridianFlipNever; #endif #ifdef MOUNT_TYPE_ALTAZM diff --git a/Validate.h b/Validate.h index 2616fa416..3cca92f91 100644 --- a/Validate.h +++ b/Validate.h @@ -7,6 +7,11 @@ // ----------------------------------------------------------------------------------- // correct for configuration backwards compatability +// the mount type FORK with Meridian flips enabled for align (only) is not-longer required use _FORK instead +#ifdef MOUNT_TYPE_FORK_ALT + #define MOUNT_TYPE_FORK +#endif + // automatically set MaxRate if DefaultSlewRate is present #if !defined(MaxRate) && defined(DesiredBaseSlewRate) #define MaxRate ((1000000.0/DesiredBaseSlewRate)/StepsPerDegreeAxis1) @@ -154,8 +159,6 @@ #define MAX_NUM_ALIGN_STARS '9' #elif defined(MOUNT_TYPE_FORK) #define MAX_NUM_ALIGN_STARS '9' - #elif defined(MOUNT_TYPE_FORK_ALT) - #define MAX_NUM_ALIGN_STARS '9' #elif defined(MOUNT_TYPE_ALTAZM) #define MAX_NUM_ALIGN_STARS '9' #endif @@ -164,8 +167,6 @@ #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