RoboidControl
Loading...
Searching...
No Matches
d:/PlatformIO/RoboidControl/IncrementalEncoder.h
Go to the documentation of this file.
1#pragma once
2
3namespace Passer {
4namespace RoboidControl {
5
9public:
16 unsigned char distancePerRevolution = 1);
17
20 virtual int GetPulseCount();
24 virtual float GetPulsesPerSecond(float currentTimeMs);
25
28 virtual float GetDistance();
29
33 virtual float GetRevolutionsPerSecond(float currentTimeMs);
34
40 virtual float GetSpeed(float currentTimeMs);
41
43 unsigned char pulsesPerRevolution = 1;
46 unsigned char distancePerRevolution = 1;
47};
48
49} // namespace RoboidControl
50} // namespace Passer
51using namespace Passer::RoboidControl;
An Encoder measures the rotations of an axle using a rotary sensor Some encoders are able to detect d...
Definition IncrementalEncoder.h:8
virtual float GetRevolutionsPerSecond(float currentTimeMs)
Get the rotation speed since the previous call.
Definition IncrementalEncoder.cpp:15
unsigned char pulsesPerRevolution
The numer of pulses corresponding to a full rotation of the axle.
Definition IncrementalEncoder.h:43
virtual float GetPulsesPerSecond(float currentTimeMs)
Get the pulse speed since the previous call.
Definition IncrementalEncoder.cpp:13
virtual float GetDistance()
Get the distance traveled since the previous call.
Definition IncrementalEncoder.cpp:11
unsigned char distancePerRevolution
The number of revolutions which makes the wheel move forward 1 meter.
Definition IncrementalEncoder.h:46
virtual int GetPulseCount()
Get the total number of pulses since the previous call.
Definition IncrementalEncoder.cpp:9
virtual float GetSpeed(float currentTimeMs)
Get the speed since the previous call.
Definition IncrementalEncoder.cpp:19
Definition Accelerometer.h:7
Definition AbsoluteEncoder.h:5