2#define XRP_TAG_GYRO 0x16
26 static constexpr uint8_t
value = XRP_TAG_GYRO;
27 static constexpr bool hasId =
false;
35 :
data({ { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } })
39 XrpGyro(
float xRate,
float yRate,
float zRate,
float roll,
float pitch,
float yaw)
40 :
data({ { xRate, yRate, zRate }, { roll, pitch, yaw } })
56 void setData(
const void* dataPtr)
override
58 if (dataPtr !=
nullptr) {
72 buffer[pos + 1] = XRP_TAG_GYRO;
void floatToNetwork(float num, char *buf, int offset)
Definition byteutils.cpp:44
Definition message_type.h:3
int fromNetworkBuffer(char *buf, int pos, int end) override
Definition xrp_gyro.h:81
XrpGyro()
Definition xrp_gyro.h:34
bool hasId() override
Definition xrp_gyro.h:48
void * getData() override
Definition xrp_gyro.h:62
int toNetworkBuffer(char *buffer, int pos, int end) override
Definition xrp_gyro.h:66
int getTag() override
Definition xrp_gyro.h:44
XrpGyro(float xRate, float yRate, float zRate, float roll, float pitch, float yaw)
Definition xrp_gyro.h:39
xrp_gyro_t data
Definition xrp_gyro.h:100
uint8_t getId() override
Definition xrp_gyro.h:52
void setData(const void *dataPtr) override
Definition xrp_gyro.h:56
Definition message_type.h:18
static constexpr uint8_t value
Definition message_type.h:19
float angles[3]
Definition xrp_gyro.h:15
float z
Definition xrp_gyro.h:11
float rates[3]
Definition xrp_gyro.h:7
float yaw
Definition xrp_gyro.h:19
float pitch
Definition xrp_gyro.h:18
float y
Definition xrp_gyro.h:10
float roll
Definition xrp_gyro.h:17
float x
Definition xrp_gyro.h:9