|
TinyRobotics
|
Interface for speed sources. More...
#include <ISpeedSource.h>

Public Member Functions | |
| virtual Speed | getSpeed (uint8_t motor=0) const =0 |
| Get the current speed. | |
| virtual void | setThrottlePercent (float value, uint8_t motor=0)=0 |
| Publish actual speed for a specific motor. | |
| virtual Speed | updateSpeed (uint32_t deltaTimeMs, uint8_t motor=0)=0 |
| For sources with inertia, call this in your main loop with the elapsed time (in milliseconds) to update the speed estimate for a specific motor. | |
| virtual size_t | getMotorCount () const =0 |
Interface for speed sources.
|
pure virtual |
Get the current speed.
Implemented in SpeedFromThrottle, SpeedFromThrottleWithInertia, and WheelEncoder.
|
pure virtual |
Publish actual speed for a specific motor.
Implemented in SpeedFromThrottleWithInertia, SpeedFromThrottle, and WheelEncoder.
|
pure virtual |
For sources with inertia, call this in your main loop with the elapsed time (in milliseconds) to update the speed estimate for a specific motor.
Implemented in SpeedFromThrottle, SpeedFromThrottleWithInertia, and WheelEncoder.