Merge branch 'ver4dev'

This commit is contained in:
2022-02-22 21:21:48 +03:00
parent a4648fd075
commit bd4753f2c9
7 changed files with 62 additions and 52 deletions

View File

@@ -37,16 +37,18 @@ class Sht20h : public IoTItem {
void* getAPI_Sht20(String subtype, String param) {
if (subtype == F("Sht20t") || subtype == F("Sht20h")) {
if (!sht) {
sht = new SHT2x;
if (sht) sht->begin();
sht = new SHT2x;
if (sht) sht->begin();
}
if (subtype == F("Sht20t")) {
return new Sht20t(param);
} else if (subtype == F("Sht20h")) {
return new Sht20h(param);
} else {
return nullptr;
}
} else {
return nullptr;
}
}