Skip to content

Commit

Permalink
Updated Focuser.h prototype to be two-argument, and implemented no-op…
Browse files Browse the repository at this point in the history
… stepper version
  • Loading branch information
pkusmierski committed Mar 25, 2021
1 parent 805e3f4 commit be5a873
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions OnStep.ino
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,8 @@ void setup() {
tmcAxis4.setup(AXIS4_DRIVER_INTPOL,AXIS4_DRIVER_DECAY_MODE,AXIS4_DRIVER_CODE,axis4Settings.IRUN,axis4SettingsEx.IHOLD);
#endif

#if AXIS4_DRIVER_DC_MODE == OFF
foc1.powerDownActive(AXIS4_DRIVER_POWER_DOWN == ON, AXIS4_DRIVER_POWER_DOWN == STARTUP);
#endif

foc1.powerDownActive(AXIS4_DRIVER_POWER_DOWN == ON, AXIS4_DRIVER_POWER_DOWN == STARTUP);
#endif

#if FOCUSER2 == ON
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Focuser.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class focuser {
virtual void setDisableState(bool disableState) { }

// allows enabling/disabling stepper driver
virtual void powerDownActive(bool active) { }
virtual void powerDownActive(bool active, bool startupOnly) { }

// set movement rate in microns/second, from minRate to 1000
virtual void setMoveRate(double rate) { }
Expand Down
1 change: 1 addition & 0 deletions src/lib/FocuserDC.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class focuserDC : public focuser {
byte getDcPower() { return powerFor1mmSec; }
bool setPhase1() { phase1=true; return true; }
bool setPhase2() { phase1=false; return true; }
void powerDownActive(bool active, bool startupOnly) { }

// sets logic state for reverse motion
void setReverseState(int reverseState) {
Expand Down

0 comments on commit be5a873

Please sign in to comment.