Loading...
Searching...
No Matches
BindGaugeSimple.hpp
1#ifndef __BINDGAUGESIMPLE_HPP
2#define __BINDGAUGESIMPLE_HPP
3#include "BindView.hpp"
4#include "BindUtils.hpp"
5
50 class BindGaugeSimple : public BindView
51{
52
53 public:
61 BindGaugeSimple(const char *cstr);
62
68 BindGaugeSimple():BindGaugeSimple("Gauge"){}
69
70 int16_t x = 0;
71 int16_t y = 0;
72 uint8_t cmdId = 0;
73 int16_t dimSize = 200;
74 int16_t minValue = 0;
75 int16_t maxValue = 100;
76 int16_t value = 0;
77 uint8_t style = 0;
78 bool isSymmetrical = false;
79 int32_t color;
80
88 void setlabel(const char *cstr)
89 {
90 str = cstr;
91 }
92
101 uint16_t getBytes(uint8_t *out);
102
103 private:
104 uint8_t objID = BIND_ID_GAUGE_SIMPLE;
105 uint16_t offset = 0;
106 int strLength = 0;
107 const char *str;
108 static int16_t tagIndex;
109};
110
111#endif /* __BINDGAUGESIMPLE_HPP */
BindGaugeSimple
BindGaugeSimple Class.
Definition BindGaugeSimple.hpp:51
BindGaugeSimple::style
uint8_t style
The style of the gauge (e.g., radial or linear).
Definition BindGaugeSimple.hpp:77
BindGaugeSimple::minValue
int16_t minValue
The minimum value for the gauge's value range.
Definition BindGaugeSimple.hpp:74
BindGaugeSimple::maxValue
int16_t maxValue
The maximum value for the gauge's value range.
Definition BindGaugeSimple.hpp:75
BindGaugeSimple::x
int16_t x
The x-coordinate position of the gauge on the screen.
Definition BindGaugeSimple.hpp:70
BindGaugeSimple::y
int16_t y
The y-coordinate position of the gauge on the screen.
Definition BindGaugeSimple.hpp:71
BindGaugeSimple::dimSize
int16_t dimSize
The dimensions (size) of the gauge.
Definition BindGaugeSimple.hpp:73
BindGaugeSimple::cmdId
uint8_t cmdId
Command identifier to add or refresh the gauge. See the notes for possible cmdId values.
Definition BindGaugeSimple.hpp:72
BindGaugeSimple::BindGaugeSimple
BindGaugeSimple()
Default constructor.
Definition BindGaugeSimple.hpp:68
BindGaugeSimple::setlabel
void setlabel(const char *cstr)
Set the label text.
Definition BindGaugeSimple.hpp:88
BindGaugeSimple::getBytes
uint16_t getBytes(uint8_t *out)
Serialize the gauge object into bytes.
Definition BindGaugeSimple.cpp:11
BindGaugeSimple::isSymmetrical
bool isSymmetrical
Indicates whether the gauge is symmetrical or not.
Definition BindGaugeSimple.hpp:78
BindGaugeSimple::color
int32_t color
The color of the gauge.
Definition BindGaugeSimple.hpp:79
BindGaugeSimple::value
int16_t value
The current value of the gauge.
Definition BindGaugeSimple.hpp:76
BindView
Definition BindView.hpp:22