V5 Rotation Sensor. Reads continuous (multi-turn) angle.
More...
#include <RotationSensor.hpp>
|
| Angle | raw () const override |
| | This tick's reading from the source; the last good value while disconnected. May restart after a reconnect.
|
| std::uint32_t | epoch () const override |
| | Increments every time the source reconnects. Readings across a reconnect are not comparable.
|
| | Device (std::uint8_t port, std::string_view kind) |
| | ~Device () override |
| virtual void | onConnect () |
| | Applies configuration. Called when the device first connects and after every reconnect.
|
| | Component (std::string_view name) |
|
| static void | validatePorts () |
| | Throws std::runtime_error if two devices are constructed on the same port.
|
| static Task | runAll () |
| | Runs the loop of every component constructed so far, in construction order, until cancelled. rz::robot runs it; tests without rz::robot run it alongside their script.
|
V5 Rotation Sensor. Reads continuous (multi-turn) angle.
◆ RotationSensor() [1/2]
| rz::RotationSensor::RotationSensor |
( |
std::uint8_t | port | ) |
|
|
inlineexplicit |
◆ RotationSensor() [2/2]
| rz::RotationSensor::RotationSensor |
( |
std::uint8_t | port, |
|
|
Config | config ) |
◆ connected()
| bool rz::RotationSensor::connected |
( |
| ) |
const |
|
inlinenodiscardoverridevirtual |
◆ epoch()
| std::uint32_t rz::RotationSensor::epoch |
( |
| ) |
const |
|
inlinenodiscardoverrideprotectedvirtual |
Increments every time the source reconnects. Readings across a reconnect are not comparable.
Reimplemented from rz::Sensor< Angle >.
◆ raw()
| Angle rz::RotationSensor::raw |
( |
| ) |
const |
|
nodiscardoverrideprotectedvirtual |
This tick's reading from the source; the last good value while disconnected. May restart after a reconnect.
Implements rz::Sensor< Angle >.
The documentation for this class was generated from the following file: