11#include "../../../runtime/Runtime.hpp"
12#include "../Odometer.hpp"
39 unsigned long pulsesPerMeter);
74 volatile unsigned long mDt{ 0 };
77 const float mMillimetersPerPulse;
79 const bool kSensorAttached;
A class to represent the common - directionless - Odometers (speed encoders) that can be used to prim...
volatile unsigned long mPulsesCounter
volatile unsigned long mPreviousPulse
bool isAttached() const override
Returns whether the sensor has been properly attached.
float getSpeed() override
Returns the current speed in meters/sec where sign can indicate direction if there is hardware suppor...
virtual void reset()
Resets the total travelled distance and speed to 0
volatile unsigned long mDt
const float mPulsesPerMeterRatio
~DirectionlessOdometer() override=default
bool providesDirection() const override
Return whether the sensor is capable of inferring the direction of movement.
virtual void update()
Conducts the distance and speed measurements.
long getDistance() override
Returns the travelled distance in centimeters where sign can indicate direction if there is hardware ...
A callback to be invoked.
An interface to programmatically represent all odometers.
An interface to serve as a wrapper for the native runtime environment, greatly inspired by the Arduin...