|
@@ -244,9 +244,8 @@ uint8_t Servo::attach(int pin) {
|
244
|
244
|
|
245
|
245
|
uint8_t Servo::attach(int pin, int min, int max) {
|
246
|
246
|
if (this->servoIndex < MAX_SERVOS ) {
|
247
|
|
- #if defined(ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
|
248
|
|
- if (pin > 0) this->pin = pin; else pin = this->pin;
|
249
|
|
- #endif
|
|
247
|
+ if(pin == 0)
|
|
248
|
+ pin = servos[this->servoIndex].Pin.nbr;
|
250
|
249
|
pinMode(pin, OUTPUT); // set servo pin to output
|
251
|
250
|
servos[this->servoIndex].Pin.nbr = pin;
|
252
|
251
|
// todo min/max check: abs(min - MIN_PULSE_WIDTH) /4 < 128
|