mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 02:34:29 +05:00
refactor: fix typo
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user