Patch servos code for move

- Have `Servo::attach` explicitly return -1 if it fails
- Check for -1 in `Servo::move` because `servoIndex` might be 0
- Make `attach` / `detach` calls conditional on `SERVO_LEVELING`
- Move `SERVO_LEVELING` define to `Conditionals.h`
This commit is contained in:
Scott Lahteine
2015-07-19 11:24:23 -07:00
parent 54ddc1d417
commit 3b23ccd366
4 changed files with 32 additions and 25 deletions

View File

@@ -279,6 +279,8 @@
#define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#endif
#define SERVO_LEVELING (defined(ENABLE_AUTO_BED_LEVELING) && defined(DEACTIVATE_SERVOS_AFTER_MOVE))
/**
* Sled Options
*/