Fix multiple servos with STM32 (#16151)

This commit is contained in:
MangaValk
2019-12-11 08:44:05 +01:00
committed by Scott Lahteine
parent 31fdaea269
commit 96cf556139
3 changed files with 20 additions and 13 deletions

View File

@@ -27,11 +27,13 @@
// Inherit and expand on the official library
class libServo : public Servo {
public:
libServo();
int8_t attach(const int pin);
int8_t attach(const int pin, const int min, const int max);
void move(const int value);
private:
typedef Servo super;
uint16_t min_ticks, max_ticks;
uint8_t servoIndex; // index into the channel data for this servo
int servo_pin = 0;
millis_t delay = 0;
};