RSeries astromech firmware
|
#include <Orientation.h>
Encapsulates an Adafruit BNO055 IMU.
Encapsulates a Adafruit BNO055 IMU and provides convenience functions to read the heading. It will also automatically publish SMQ events for any change in heading.
Public Member Functions | |
Orientation (uint8_t id=0) | |
Default Constructor. More... | |
virtual void | setup () |
Perform any initialzation not possible in the constructor. More... | |
float | getYaw () |
Returns the last recorded yaw. More... | |
bool | getYawChanged (float &yaw) |
Returns true if yaw has changed since last calling this function. More... | |
float | getRoll () |
Returns the last recorded roll. More... | |
bool | getRollChanged (float &roll) |
Returns true if roll has changed since last calling this function. More... | |
float | getPitch () |
Returns the last recorded pitch. More... | |
bool | getPitchChanged (float &pitch) |
Returns true if pitch has changed since last calling this function. More... | |
virtual void | animate () |
Reads the IMU and publishes any change in heading. More... | |
Public Member Functions inherited from SetupEvent | |
SetupEvent () | |
Default Constructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from SetupEvent | |
static void | ready () |
Calls setup() for each created AnimatedEvent subclass. More... | |
|
inline |
Default Constructor.
|
inlinevirtual |
Reads the IMU and publishes any change in heading.
Implements AnimatedEvent.
|
inline |
Returns the last recorded pitch.
|
inline |
Returns true if pitch has changed since last calling this function.
|
inline |
Returns the last recorded roll.
|
inline |
Returns true if roll has changed since last calling this function.
|
inline |
Returns the last recorded yaw.
|
inline |
Returns true if yaw has changed since last calling this function.
|
inlinevirtual |
Perform any initialzation not possible in the constructor.
Implements SetupEvent.