refactor: fix typo

This commit is contained in:
Yurii
2025-12-09 21:10:23 +03:00
parent 0038a200ca
commit eafb33cb6a

View File

@@ -149,7 +149,7 @@ public:
static int16_t getIdByName(const char* name) {
if (settings == nullptr) {
return 0;
return -1;
}
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {
@@ -163,7 +163,7 @@ public:
static int16_t getIdByObjectId(const char* objectId) {
if (settings == nullptr) {
return 0;
return -1;
}
String refObjectId;
@@ -329,12 +329,12 @@ public:
static float getMeanValueByPurpose(Purpose purpose, const ValueType valueType, bool onlyConnected = true) {
if (settings == nullptr || results == nullptr) {
return 0;
return 0.0f;
}
uint8_t valueId = (uint8_t) valueType;
if (!isValidValueId(valueId)) {
return 0;
return 0.0f;
}
float value = 0.0f;
@@ -363,7 +363,7 @@ public:
static bool existsConnectedSensorsByPurpose(Purpose purpose) {
if (settings == nullptr || results == nullptr) {
return 0;
return false;
}
for (uint8_t id = 0; id <= getMaxSensorId(); id++) {