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