Represents a compact gauge view for the BindCanvas framework. More...
#include <BindGaugeCompact.hpp>
Public Member Functions | |
BindGaugeCompact (const char *cstr) | |
Constructs a BindGaugeCompact object with a custom label. | |
BindGaugeCompact () | |
Constructs a BindGaugeCompact object with a default label. | |
void | setlabel (const char *cstr) |
Sets the label to be displayed on the gauge. | |
uint16_t | getBytes (uint8_t *out) override |
Gets the bytes representing the BindGaugeCompact object for data synchronization. | |
Public Attributes | |
int16_t | x |
The x-coordinate position of the gauge on the canvas. | |
int16_t | y |
The y-coordinate position of the gauge on the canvas. | |
uint8_t | cmdId = 0 |
The command ID associated with the gauge. See the notes for possible cmdId values. | |
int16_t | dimSize = 100 |
The dimensions (size) of the gauge. | |
float | value = 0 |
The current value of the gauge. | |
float | maxValue = 100.0f |
The maximum value that the gauge can represent. | |
uint8_t | drawArc = 0 |
Indicates whether to draw an arc for the gauge. 0=False, 1=True. | |
float | arcGreenMaxVal = 0 |
The maximum value for the green arc section. | |
float | arcYellowMaxVal = 0 |
The maximum value for the yellow arc section. | |
float | arcRedMaxVal = 0 |
The maximum value for the red arc section. | |
![]() | |
int16_t | tag |
Represents a compact gauge view for the BindCanvas framework.
The BindGaugeCompact class is used to create compact gauge views that can be displayed on the BindCanvas screen. These gauges provide visual feedback for values within a specified range. Users can customize the gauge appearance, label, and value range.
This class inherits from BindViewAutoTag, allowing it to be managed by the BindCanvas framework. It includes functionality for setting properties such as position, dimensions, current value, maximum value, and color options. The getBytes function is used for data synchronization with BindCanvas.
Example usage:
BindGaugeCompact::BindGaugeCompact | ( | const char * | cstr | ) |
Constructs a BindGaugeCompact object with a custom label.
cstr | The label to display on the gauge. |
|
inlineoverridevirtual |
Gets the bytes representing the BindGaugeCompact object for data synchronization.
This function generates a byte representation of the BindGaugeCompact object, including its properties, and stores it in the provided buffer for data transmission and synchronization with the BindCanvas screen.
out | A pointer to the buffer where the byte data will be stored. |
Reimplemented from BindView.
|
inline |
Sets the label to be displayed on the gauge.
cstr | The label text. |