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