Bind
C++ UI toolkit for Arduino
 
Loading...
Searching...
No Matches
BindAttitudeIndicator.hpp
1#ifndef __BINDATTITUDEINDICATOR_HPP
2#define __BINDATTITUDEINDICATOR_HPP
3#include "BindView.hpp"
4#include "BindUtils.hpp"
29{
30
31public:
33 int16_t x = 0;
34 int16_t y = 0;
35 uint8_t cmdId = 0;
36 int16_t dimSize = 200;
37 float roll = 0.0f;
38 float pitch = 0.0f;
39
49 uint16_t getBytes(uint8_t *out) override
50 {
51 offset = 0;
52 copyAndOffset(out, &offset, &objID, sizeof(objID));
53 copyAndOffset(out, &offset, &x, sizeof(x));
54 copyAndOffset(out, &offset, &y, sizeof(y));
55 copyAndOffset(out, &offset, &tag, sizeof(tag));
56 copyAndOffset(out, &offset, &cmdId, sizeof(cmdId));
57 copyAndOffset(out, &offset, &dimSize, sizeof(dimSize));
58 copyAndOffset(out, &offset, &roll, sizeof(roll));
59 copyAndOffset(out, &offset, &pitch, sizeof(pitch));
60 return offset;
61 }
62
63private:
64 uint8_t objID = BIND_ID_ATTITUDE_INDICATOR;
65 uint16_t offset = 0;
66 static int16_t tagIndex;
67};
68
69#endif /* __BINDATTITUDEINDICATOR_HPP */
Represents an attitude indicator UI element in the Bind framework.
Definition BindAttitudeIndicator.hpp:29
int16_t x
X-coordinate position of the attitude indicator.
Definition BindAttitudeIndicator.hpp:33
float roll
Roll angle value for orientation.
Definition BindAttitudeIndicator.hpp:37
uint16_t getBytes(uint8_t *out) override
Generates and returns the byte data representing the attitude indicator configuration.
Definition BindAttitudeIndicator.hpp:49
int16_t y
Y-coordinate position of the attitude indicator.
Definition BindAttitudeIndicator.hpp:34
float pitch
Pitch angle value for orientation.
Definition BindAttitudeIndicator.hpp:38
int16_t dimSize
Dimension size of the attitude indicator.
Definition BindAttitudeIndicator.hpp:36
Definition BindView.hpp:22