Skip to content

Commit ed58683

Browse files
committed
changed the data types of min, max and defaultPos
1 parent 4e76d5c commit ed58683

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Servo_Hardware_PWM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ Servo::Servo()
2727
}
2828
}
2929

30-
uint8_t Servo::attach(int pin)
30+
uint8_t Servo::attach(int pin)
3131
{
3232
return this->attach(pin, MIN_PULSE_WIDTH, MAX_PULSE_WIDTH, DEFAULT_PULSE_WIDTH);
3333
}
3434

35-
uint8_t Servo::attach(int pin, int min, int max)
35+
uint8_t Servo::attach(int pin, int min, int max)
3636
{
3737
return this->attach(pin, min, max, DEFAULT_PULSE_WIDTH);
3838
}

src/Servo_Hardware_PWM.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ class Servo
7979
private:
8080
uint8_t servoIndex; //number of attached Servos
8181
uint8_t servoPin; //pin number of the attached Servo
82-
uint8_t min; //lower pulse width limit
83-
uint8_t max; //upper pulse width limit
84-
uint8_t defaultPos; //pulse width when servo is attached
82+
uint16_t min; //lower pulse width limit
83+
uint16_t max; //upper pulse width limit
84+
uint16_t defaultPos; //pulse width when servo is attached
8585
};
8686

8787
#endif

0 commit comments

Comments
 (0)