How far a wheel has rolled, from the encoder measuring it: an unpowered tracking wheel on a rotation sensor, or a drive wheel read through its motor's encoder (motor.encoder(), which already accounts for the cartridge).
More...
#include <TrackingWheel.hpp>
|
| Length | raw () const override |
| | This tick's reading from the source; the last good value while disconnected. May restart after a reconnect.
|
| virtual std::uint32_t | epoch () const |
| | Increments every time the source reconnects. Readings across a reconnect are not comparable.
|
How far a wheel has rolled, from the encoder measuring it: an unpowered tracking wheel on a rotation sensor, or a drive wheel read through its motor's encoder (motor.encoder(), which already accounts for the cartridge).
◆ TrackingWheel()
- Parameters
-
| gears | From the encoder's shaft (driving) to the wheel's (driven), e.g. {.driving = 36, .driven = 60} for a drive wheel geared down from its motor. Leave it out when the wheel is on the encoder's shaft. |
- Exceptions
-
| std::invalid_argument | if a tooth count or the diameter is not positive. |
◆ connected()
| bool rz::TrackingWheel::connected |
( |
| ) |
const |
|
inlinenodiscardoverridevirtual |
◆ raw()
| Length rz::TrackingWheel::raw |
( |
| ) |
const |
|
inlinenodiscardoverrideprotectedvirtual |
This tick's reading from the source; the last good value while disconnected. May restart after a reconnect.
Implements rz::Sensor< Length >.
The documentation for this class was generated from the following file: