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

@ -36,8 +36,6 @@
#endif
#endif // ENABLE_AUTO_BED_LEVELING
#define SERVO_LEVELING (defined(ENABLE_AUTO_BED_LEVELING) && defined(DEACTIVATE_SERVOS_AFTER_MOVE))
#ifdef MESH_BED_LEVELING
#include "mesh_bed_leveling.h"
#endif