Skip to content

Commit

Permalink
Merge pull request hjd1964#181 from pkusmierski/FocuserDcPowerDownAct…
Browse files Browse the repository at this point in the history
…iveFix

powerDownActive is purely virtual/not implemented for DC focuser clas…
  • Loading branch information
hjd1964 authored Mar 25, 2021
2 parents 6a04e76 + 4acf384 commit 4392f34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
#define AXIS4_DRIVER_IRUN OFF // OFF, n, (mA.) Current tracking, appropriate for stepper/driver/etc. " Option
#define AXIS4_DRIVER_POWER_DOWN OFF // OFF, ON Powers off the motor at stand-still. Option
#define AXIS4_DRIVER_REVERSE OFF // OFF, ON Reverses movement direction, or reverse wiring instead to correct. Option
#define AXIS4_DRIVER_DC_MODE OFF // OFF, DRV8825 for pwm dc motor control on stepper driver outputs. Option
#define AXIS4_DRIVER_DC_MODE OFF // OFF, ON for pwm dc motor control on stepper driver outputs. Option

#define AXIS4_LIMIT_MIN_RATE 50 // 50, n. Where n=1..1000 (um/s.) Minimum microns/second. In DC mode, min pwr. Adjust
#define AXIS4_LIMIT_MIN 0 // 0, n. Where n=0..500 (millimeters.) Minimum allowed position. Adjust
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 4392f34

Please sign in to comment.