Loading...
Searching...
No Matches
BindAttitudeIndicator.hpp
1#ifndef __BINDATTITUDEINDICATOR_HPP
2#define __BINDATTITUDEINDICATOR_HPP
3#include "BindView.hpp"
4#include "BindUtils.hpp"
29 class BindAttitudeIndicator : public BindView
30{
31
32 public:
33 BindAttitudeIndicator();
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
64 private:
65 uint8_t objID = BIND_ID_ATTITUDE_INDICATOR;
66 uint16_t offset = 0;
67 static int16_t tagIndex;
68};
69
70#endif /* __BINDATTITUDEINDICATOR_HPP */
BindAttitudeIndicator
Represents an attitude indicator UI element in the Bind framework.
Definition BindAttitudeIndicator.hpp:30
BindAttitudeIndicator::x
int16_t x
X-coordinate position of the attitude indicator.
Definition BindAttitudeIndicator.hpp:34
BindAttitudeIndicator::roll
float roll
Roll angle value for orientation.
Definition BindAttitudeIndicator.hpp:38
BindAttitudeIndicator::getBytes
uint16_t getBytes(uint8_t *out) override
Generates and returns the byte data representing the attitude indicator configuration.
Definition BindAttitudeIndicator.hpp:50
BindAttitudeIndicator::y
int16_t y
Y-coordinate position of the attitude indicator.
Definition BindAttitudeIndicator.hpp:35
BindAttitudeIndicator::pitch
float pitch
Pitch angle value for orientation.
Definition BindAttitudeIndicator.hpp:39
BindAttitudeIndicator::dimSize
int16_t dimSize
Dimension size of the attitude indicator.
Definition BindAttitudeIndicator.hpp:37
BindView
Definition BindView.hpp:26