From eafb33cb6ab8a1f7d79f23def0f8681b446f1077 Mon Sep 17 00:00:00 2001 From: Yurii Date: Tue, 9 Dec 2025 21:10:23 +0300 Subject: [PATCH] refactor: fix typo --- src/Sensors.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Sensors.h b/src/Sensors.h index d481816..170829e 100644 --- a/src/Sensors.h +++ b/src/Sensors.h @@ -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++) {