1#ifndef __BINDGAUGECOMPACT_HPP
2#define __BINDGAUGECOMPACT_HPP
4#include "BindUtils.hpp"
90 strLength = strlen(str);
91 if (strLength > MAX_STRING_LENGTH_TERMINAL)
93 strLength = MAX_STRING_LENGTH_TERMINAL;
95 copyAndOffset(out, &offset, &objID,
sizeof(objID));
96 copyAndOffset(out, &offset, &
x,
sizeof(
x));
97 copyAndOffset(out, &offset, &
y,
sizeof(
y));
98 copyAndOffset(out, &offset, &tag,
sizeof(tag));
99 copyAndOffset(out, &offset, &
cmdId,
sizeof(
cmdId));
101 copyAndOffset(out, &offset, &
value,
sizeof(
value));
107 copyAndOffset(out, &offset, str, strLength);
112 uint8_t objID = BIND_ID_GAUGE2;
116 static int16_t tagIndex;
Represents a compact gauge view for the BindCanvas framework.
Definition BindGaugeCompact.hpp:42
float value
The current value of the gauge.
Definition BindGaugeCompact.hpp:61
BindGaugeCompact()
Constructs a BindGaugeCompact object with a default label.
Definition BindGaugeCompact.hpp:55
uint8_t drawArc
Indicates whether to draw an arc for the gauge. 0=False, 1=True.
Definition BindGaugeCompact.hpp:63
int16_t dimSize
The dimensions (size) of the gauge.
Definition BindGaugeCompact.hpp:60
float maxValue
The maximum value that the gauge can represent.
Definition BindGaugeCompact.hpp:62
float arcRedMaxVal
The maximum value for the red arc section.
Definition BindGaugeCompact.hpp:66
uint16_t getBytes(uint8_t *out) override
Gets the bytes representing the BindGaugeCompact object for data synchronization.
Definition BindGaugeCompact.hpp:87
int16_t y
The y-coordinate position of the gauge on the canvas.
Definition BindGaugeCompact.hpp:58
uint8_t cmdId
The command ID associated with the gauge. See the notes for possible cmdId values.
Definition BindGaugeCompact.hpp:59
float arcGreenMaxVal
The maximum value for the green arc section.
Definition BindGaugeCompact.hpp:64
void setlabel(const char *cstr)
Sets the label to be displayed on the gauge.
Definition BindGaugeCompact.hpp:73
int16_t x
The x-coordinate position of the gauge on the canvas.
Definition BindGaugeCompact.hpp:57
float arcYellowMaxVal
The maximum value for the yellow arc section.
Definition BindGaugeCompact.hpp:65
Definition BindView.hpp:22