|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
Adapter: expose an IMU device as a GyroscopeBase. More...
#include <ImuGyroscopeAdapter.hpp>
Public Member Functions | |
| ImuGyroscopeAdapter (ImuBase &dev) | |
| bool | readData (GyroscopeData &data) override |
| Read gyroscope data. | |
| bool | isDataReady () override |
| Check if new gyroscope data is available. | |
| bool | reset () override |
| Reset gyroscope to default state. | |
| bool | selfTest () override |
| Perform gyroscope self-test. | |
| bool | setFullScaleRange (GyroFullScaleRange range) override |
| Set gyroscope full-scale range. | |
| bool | setOutputDataRate (float data_rate_hz) override |
| Set gyroscope output data rate. | |
| bool | setOperationMode (OperationMode mode) override |
| Set gyroscope operation mode. | |
Public Member Functions inherited from SensorBase< GyroscopeData > | |
| SensorBase (const SensorBase &)=delete | |
| SensorBase & | operator= (const SensorBase &)=delete |
| void | setOffset (int16_t x, int16_t y, int16_t z) |
| Set sensor calibration offsets. | |
| float | getSensitivity () const |
| Get sensor sensitivity. | |
| SensorInfo | getSensorInfo () const |
| Get sensor information. | |
| virtual SensorConfig | getConfig () const |
| Get current sensor configuration. | |
Additional Inherited Members | |
Protected Member Functions inherited from GyroscopeBase | |
| GyroscopeBase () | |
| Construct a new GyroscopeBase object. | |
| virtual | ~GyroscopeBase ()=default |
| Destroy the GyroscopeBase object. | |
| GyroscopeBase (const GyroscopeBase &)=delete | |
| GyroscopeBase & | operator= (const GyroscopeBase &)=delete |
Protected Member Functions inherited from SensorBase< GyroscopeData > | |
| SensorBase (SensorType sensor_type=SensorType::UNKNOWN) | |
| Construct a new SensorBase object. | |
| virtual | ~SensorBase ()=default |
| Virtual destructor for proper polymorphic cleanup. | |
Protected Attributes inherited from SensorBase< GyroscopeData > | |
| SensorConfig | _config |
| Current configuration. | |
| SensorInfo | _info |
| Sensor information. | |
| int16_t | _x_offset |
| int16_t | _y_offset |
| int16_t | _z_offset |
| float | _sensitivity |
Adapter: expose an IMU device as a GyroscopeBase.
Definition at line 38 of file ImuGyroscopeAdapter.hpp.
|
inlineexplicit |
Definition at line 41 of file ImuGyroscopeAdapter.hpp.
|
inlineoverridevirtual |
Check if new gyroscope data is available.
Implements GyroscopeBase.
Definition at line 48 of file ImuGyroscopeAdapter.hpp.
References ImuBase::GYRO, and ImuBase::isDataReady().
|
inlineoverridevirtual |
Read gyroscope data.
| data | Reference to store gyroscope data |
Implements GyroscopeBase.
Definition at line 43 of file ImuGyroscopeAdapter.hpp.
References ImuBase::readGyro().
|
inlineoverridevirtual |
Reset gyroscope to default state.
Implements GyroscopeBase.
Definition at line 53 of file ImuGyroscopeAdapter.hpp.
References ImuBase::reset().
|
inlineoverridevirtual |
Perform gyroscope self-test.
Implements GyroscopeBase.
Definition at line 58 of file ImuGyroscopeAdapter.hpp.
References ImuBase::selfTest().
|
inlineoverridevirtual |
Set gyroscope full-scale range.
| range | Desired full-scale range |
Implements GyroscopeBase.
Definition at line 63 of file ImuGyroscopeAdapter.hpp.
References ImuBase::setGyroFullScaleRange().
|
inlineoverridevirtual |
Set gyroscope operation mode.
| mode | Desired operation mode |
Implements GyroscopeBase.
Definition at line 73 of file ImuGyroscopeAdapter.hpp.
References ImuBase::setOperationMode().
|
inlineoverridevirtual |
Set gyroscope output data rate.
| data_rate_hz | Desired output data rate in Hertz |
Implements GyroscopeBase.
Definition at line 68 of file ImuGyroscopeAdapter.hpp.
References ImuBase::setGyroOutputDataRate().