mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
NUM_TAGS is used to check of overflow
This commit is contained in:
@@ -178,7 +178,12 @@ class DeviceValue {
|
||||
uint16_t max,
|
||||
uint8_t state);
|
||||
|
||||
// has values
|
||||
bool hasValue() const;
|
||||
bool has_tag() const {
|
||||
return ((tag < DeviceValue::NUM_TAGS) && (tag != DeviceValue::DeviceValueTAG::TAG_NONE));
|
||||
}
|
||||
|
||||
bool get_min_max(int16_t & dv_set_min, uint16_t & dv_set_max);
|
||||
|
||||
void set_custom_minmax();
|
||||
@@ -204,7 +209,7 @@ class DeviceValue {
|
||||
static const char * DeviceValueUOM_s[];
|
||||
static const char * const * DeviceValueTAG_s[];
|
||||
static const char * const DeviceValueTAG_mqtt[];
|
||||
static size_t tag_count; // # tags
|
||||
static uint8_t NUM_TAGS; // # tags
|
||||
};
|
||||
|
||||
}; // namespace emsesp
|
||||
|
||||
Reference in New Issue
Block a user