1 #ifndef ServoDispatch_h
2 #define ServoDispatch_h
87 virtual uint8_t
getPin(uint16_t num) = 0;
88 virtual uint16_t
getStart(uint16_t num) = 0;
89 virtual uint16_t
getEnd(uint16_t num) = 0;
93 virtual uint32_t
getGroup(uint16_t num) = 0;
95 virtual uint16_t
scaleToPos(uint16_t num,
float scale) = 0;
96 virtual bool isActive(uint16_t num) = 0;
97 virtual void disable(uint16_t num) = 0;
98 virtual void setPin(uint16_t num, uint16_t pin)
106 virtual void setStart(uint16_t num, uint16_t startPulse)
110 virtual void setEnd(uint16_t num, uint16_t endPulse)
114 virtual void setGroup(uint16_t num, uint32_t group)
118 virtual void setServo(uint16_t num, uint8_t pin, uint16_t startPulse, uint16_t endPulse, uint16_t neutralPulse, uint32_t group) = 0;
119 virtual void setPWM(uint16_t num, uint16_t targetLength) = 0;
122 virtual void stop() = 0;
132 void moveTo(uint16_t num, uint32_t startDelay, uint32_t moveTime,
float pos)
137 void moveTo(uint16_t num, uint32_t moveTime,
float pos)
147 void moveTo(uint16_t num, uint32_t startDelay, uint32_t moveTime,
float startPos,
float pos)
157 void moveServosTo(uint32_t servoGroupMask, uint32_t moveTime,
float pos)
162 void moveServosTo(uint32_t servoGroupMask, uint32_t startDelay, uint32_t moveTime,
float pos)
164 _moveServosTo(servoGroupMask, startDelay, moveTime, moveTime, pos);
167 void moveServosTo(uint32_t servoGroupMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax,
float pos)
169 _moveServosTo(servoGroupMask, startDelay, moveTimeMin, moveTimeMax, pos);
172 void moveServoSetTo(uint32_t servoGroupMask, uint32_t servoSetMask,
float onPos,
float offPos,
float (*onEasingMethod)(
float) = NULL,
float (*offEasingMethod)(
float) = NULL)
174 _moveServoSetTo(servoGroupMask, servoSetMask, 0, 0, 0, onPos, offPos, onEasingMethod, offEasingMethod);
177 void moveServoSetTo(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t moveTime,
float onPos,
float offPos,
float (*onEasingMethod)(
float) = NULL,
float (*offEasingMethod)(
float) = NULL)
179 _moveServoSetTo(servoGroupMask, servoSetMask, 0, moveTime, moveTime, onPos, offPos, onEasingMethod, offEasingMethod);
182 void moveServoSetTo(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t startDelay, uint32_t moveTime,
float onPos,
float offPos,
float (*onEasingMethod)(
float) = NULL,
float (*offEasingMethod)(
float) = NULL)
184 _moveServoSetTo(servoGroupMask, servoSetMask, startDelay, moveTime, moveTime, onPos, offPos, onEasingMethod, offEasingMethod);
187 void moveServoSetTo(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax,
float onPos,
float offPos,
float (*onEasingMethod)(
float) = NULL,
float (*offEasingMethod)(
float) = NULL)
189 _moveServoSetTo(servoGroupMask, servoSetMask, startDelay, moveTimeMin, moveTimeMax, onPos, offPos, onEasingMethod, offEasingMethod);
198 void moveToPulse(uint16_t num, uint32_t startDelay, uint32_t moveTime, uint16_t pos)
213 void moveToPulse(uint16_t num, uint32_t startDelay, uint32_t moveTime, uint16_t startPos, uint16_t pos)
230 void moveByPulse(uint16_t num, uint32_t startDelay, uint32_t moveTime, int16_t pos)
248 void moveServosToPulse(uint32_t servoGroupMask, uint32_t startDelay, uint32_t moveTime, uint16_t pos)
253 void moveServosToPulse(uint32_t servoGroupMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax, int16_t pos)
263 void moveServosByPulse(uint32_t servoGroupMask, uint32_t startDelay, uint32_t moveTime, int16_t pos)
268 void moveServosByPulse(uint32_t servoGroupMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax, int16_t pos)
280 void moveServoSetToPulse(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t moveTime, uint16_t onPos, uint16_t offPos)
285 void moveServoSetToPulse(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t startDelay, uint32_t moveTime, uint16_t onPos, uint16_t offPos)
287 _moveServoSetToPulse(servoGroupMask, servoSetMask, startDelay, moveTime, moveTime, onPos, offPos);
290 void moveServoSetToPulse(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax, int16_t onPos, int16_t offPos)
292 _moveServoSetToPulse(servoGroupMask, servoSetMask, startDelay, moveTimeMin, moveTimeMax, onPos, offPos);
295 void moveServoSetByPulse(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t moveTime, int16_t onPos, int16_t offPos)
300 void moveServoSetByPulse(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t startDelay, uint32_t moveTime, int16_t onPos, int16_t offPos)
302 _moveServoSetByPulse(servoGroupMask, servoSetMask, startDelay, moveTime, moveTime, onPos, offPos);
305 void moveServoSetByPulse(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax, int16_t onPos, int16_t offPos)
307 _moveServoSetByPulse(servoGroupMask, servoSetMask, startDelay, moveTimeMin, moveTimeMax, onPos, offPos);
328 virtual void _moveServoToPulse(uint16_t num, uint32_t startDelay, uint32_t moveTime, uint16_t startPos, uint16_t pos) = 0;
329 virtual void _moveServosToPulse(uint32_t servoGroupMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax, uint16_t pos) = 0;
330 virtual void _moveServosByPulse(uint32_t servoGroupMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax, int16_t pos) = 0;
331 virtual void _moveServoSetToPulse(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax, uint16_t onPos, uint16_t offPos) = 0;
332 virtual void _moveServoSetByPulse(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax, int16_t onPos, int16_t offPos) = 0;
333 virtual void _moveServosTo(uint32_t servoGroupMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax,
float pos) = 0;
334 virtual void _moveServoSetTo(uint32_t servoGroupMask, uint32_t servoSetMask, uint32_t startDelay, uint32_t moveTimeMin, uint32_t moveTimeMax,
float onPos,
float offPos,
float (*onEasingMethod)(
float),
float (*offEasingMethod)(
float)) = 0;
336 virtual void _setServosEasingMethod(uint32_t servoGroupMask,
float (*easingMethod)(
float completion)) = 0;