mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-29 15:42:20 +03:00
4.0.1 ядро для 8266
This commit is contained in:
@@ -54,21 +54,21 @@ class Bmp280p : public IoTItem {
|
||||
};
|
||||
|
||||
void* getAPI_Bmp280(String subtype, String param) {
|
||||
if (subtype == F("Bmp280t") || subtype == F("Bmp280p")) {
|
||||
String addr;
|
||||
jsonRead(param, "addr", addr);
|
||||
|
||||
if (bmps.find(addr) == bmps.end()) {
|
||||
bmps[addr] = new Adafruit_BMP280();
|
||||
bmps[addr]->begin(hexStringToUint8(addr));
|
||||
}
|
||||
|
||||
if (subtype == F("Bmp280t")) {
|
||||
return new Bmp280t(bmps[addr], param);
|
||||
} else if (subtype == F("Bmp280p")) {
|
||||
return new Bmp280p(bmps[addr], param);
|
||||
}
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
// if (subtype == F("Bmp280t") || subtype == F("Bmp280p")) {
|
||||
// String addr;
|
||||
// jsonRead(param, "addr", addr);
|
||||
//
|
||||
// if (bmps.find(addr) == bmps.end()) {
|
||||
// bmps[addr] = new Adafruit_BMP280();
|
||||
// bmps[addr]->begin(hexStringToUint8(addr));
|
||||
// }
|
||||
//
|
||||
// if (subtype == F("Bmp280t")) {
|
||||
// return new Bmp280t(bmps[addr], param);
|
||||
// } else if (subtype == F("Bmp280p")) {
|
||||
// return new Bmp280p(bmps[addr], param);
|
||||
// }
|
||||
//} else {
|
||||
return nullptr;
|
||||
//}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user