2#include "TinyRobotics/units/Units.h"
4namespace tinyrobotics {
7
8
11 virtual ~ISpeedSource() =
default;
13
14
15
27 virtual size_t getMotorCount()
const = 0;
Interface for speed sources.
Definition: ISpeedSource.h:9
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 upda...
Represents a speed measurement with unit conversion support.
Definition: Speed.h:40