Skip to content

Commit 0cfff78

Browse files
committed
servo hysterisis: typo defined hysterisis things only if #ifdef SERVO_HYSTERESIS_ENABLE
1 parent 643cec9 commit 0cfff78

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/lib/axis/motor/servo/dc/DcServoDriver.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
#endif
1717

1818
// Enable to apply hysteresis around zero velocity
19-
#define SERVO_HYSTERESIS_ENABLE
20-
21-
// Thresholds in encoder counts/sec
22-
#ifndef SERVO_HYST_ENTER_CPS
23-
#define SERVO_HYST_ENTER_CPS 1.2f // must exceed this to LEAVE zero
24-
#endif
25-
#ifndef SERVO_HYST_EXIT_CPS
26-
#define SERVO_HYST_EXIT_CPS 0.6f // drop below this to RETURN to zero
27-
#endif
28-
29-
ifdef SERVO_SIGMA_DELTA_DITHERING
30-
#include "SigmaDeltaDither.h"
19+
#ifdef SERVO_HYSTERESIS_ENABLE
20+
// Thresholds in encoder counts/sec
21+
#ifndef SERVO_HYST_ENTER_CPS
22+
#define SERVO_HYST_ENTER_CPS 1.2f // must exceed this to LEAVE zero
23+
#endif
24+
#ifndef SERVO_HYST_EXIT_CPS
25+
#define SERVO_HYST_EXIT_CPS 0.6f // drop below this to RETURN to zero
26+
#endif
27+
28+
ifdef SERVO_SIGMA_DELTA_DITHERING
29+
#include "SigmaDeltaDither.h"
30+
#endif
3131
#endif
3232

3333
#include "../ServoDriver.h"

0 commit comments

Comments
 (0)