Skip to content

Commit 6ba5570

Browse files
authored
Merge pull request #80 from OpenAstroTech/simplify-ra-invert
Simplify RA inversion
2 parents a7b202c + be11569 commit 6ba5570

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/Mount.cpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -238,20 +238,8 @@ void Mount::configureRAStepper(byte pin1, byte pin2, int maxSpeed, int maxAccele
238238
_stepperTRK->setMaxSpeed(10000);
239239
_stepperTRK->setAcceleration(5000);
240240

241-
#if NORTHERN_HEMISPHERE != 1 && RA_INVERT_DIR == 0
242-
_stepperRA->setPinsInverted(true, false, false);
243-
_stepperTRK->setPinsInverted(true, false, false);
244-
#endif
245-
246-
#if RA_INVERT_DIR == 1 && NORTHERN_HEMISPHERE == 1
247-
_stepperRA->setPinsInverted(true, false, false);
248-
_stepperTRK->setPinsInverted(true, false, false);
249-
#endif
250-
251-
#if NORTHERN_HEMISPHERE != 1 && RA_INVERT_DIR == 1
252-
_stepperRA->setPinsInverted(false, false, false);
253-
_stepperTRK->setPinsInverted(false, false, false);
254-
#endif
241+
_stepperRA->setPinsInverted(NORTHERN_HEMISPHERE == RA_INVERT_DIR, false, false);
242+
_stepperTRK->setPinsInverted(NORTHERN_HEMISPHERE == RA_INVERT_DIR, false, false);
255243
}
256244
#endif
257245

0 commit comments

Comments
 (0)