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"
30{
31
32public:
34 int16_t x = 0;
35 int16_t y = 0;
36 uint8_t cmdId = 0;
37 int16_t dimSize = 200;
38 float roll = 0.0f;
39 float pitch = 0.0f;
40
50 uint16_t getBytes(uint8_t *out) override
51 {
52 offset = 0;
53 copyAndOffset(out, &offset, &objID, sizeof(objID));
54 copyAndOffset(out, &offset, &x, sizeof(x));
55 copyAndOffset(out, &offset, &y, sizeof(y));
56 copyAndOffset(out, &offset, &tag, sizeof(tag));
57 copyAndOffset(out, &offset, &cmdId, sizeof(cmdId));
58 copyAndOffset(out, &offset, &dimSize, sizeof(dimSize));
59 copyAndOffset(out, &offset, &roll, sizeof(roll));
60 copyAndOffset(out, &offset, &pitch, sizeof(pitch));
61 return offset;
62 }
63
64private:
65 uint8_t objID = BIND_ID_ATTITUDE_INDICATOR;
66 uint16_t offset = 0;
67 static int16_t tagIndex;
68};
69
70#endif /* __BINDATTITUDEINDICATOR_HPP */
Represents an attitude indicator UI element in the Bind framework.
Definition BindAttitudeIndicator.hpp:30
int16_t x
X-coordinate position of the attitude indicator.
Definition BindAttitudeIndicator.hpp:34
float roll
Roll angle value for orientation.
Definition BindAttitudeIndicator.hpp:38
uint16_t getBytes(uint8_t *out) override
Generates and returns the byte data representing the attitude indicator configuration.
Definition BindAttitudeIndicator.hpp:50
int16_t y
Y-coordinate position of the attitude indicator.
Definition BindAttitudeIndicator.hpp:35
float pitch
Pitch angle value for orientation.
Definition BindAttitudeIndicator.hpp:39
int16_t dimSize
Dimension size of the attitude indicator.
Definition BindAttitudeIndicator.hpp:37
Definition BindView.hpp:22