mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 03:49:13 +03:00
Merge pull request #192 from biveraxe/ver4dev
Исправляем ошибки компиляции при переходе на новое ядро
This commit is contained in:
@@ -74,23 +74,23 @@ class Bme280p : public IoTItem {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void* getAPI_Bme280(String subtype, String param) {
|
void* getAPI_Bme280(String subtype, String param) {
|
||||||
// if (subtype == F("Bme280t") || subtype == F("Bme280h") || subtype == F("Bme280p")) {
|
if (subtype == F("Bme280t") || subtype == F("Bme280h") || subtype == F("Bme280p")) {
|
||||||
// String addr;
|
String addr;
|
||||||
// jsonRead(param, "addr", addr);
|
jsonRead(param, "addr", addr);
|
||||||
//
|
|
||||||
// if (bmes.find(addr) == bmes.end()) {
|
if (bmes.find(addr) == bmes.end()) {
|
||||||
// bmes[addr] = new Adafruit_BME280();
|
bmes[addr] = new Adafruit_BME280();
|
||||||
// bmes[addr]->begin(hexStringToUint8(addr));
|
bmes[addr]->begin(hexStringToUint8(addr));
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// if (subtype == F("Bme280t")) {
|
if (subtype == F("Bme280t")) {
|
||||||
// return new Bme280t(bmes[addr], param);
|
return new Bme280t(bmes[addr], param);
|
||||||
// } else if (subtype == F("Bme280h")) {
|
} else if (subtype == F("Bme280h")) {
|
||||||
// return new Bme280h(bmes[addr], param);
|
return new Bme280h(bmes[addr], param);
|
||||||
// } else if (subtype == F("Bme280p")) {
|
} else if (subtype == F("Bme280p")) {
|
||||||
// return new Bme280p(bmes[addr], param);
|
return new Bme280p(bmes[addr], param);
|
||||||
// }
|
}
|
||||||
//} else {
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,21 +54,21 @@ class Bmp280p : public IoTItem {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void* getAPI_Bmp280(String subtype, String param) {
|
void* getAPI_Bmp280(String subtype, String param) {
|
||||||
// if (subtype == F("Bmp280t") || subtype == F("Bmp280p")) {
|
if (subtype == F("Bmp280t") || subtype == F("Bmp280p")) {
|
||||||
// String addr;
|
String addr;
|
||||||
// jsonRead(param, "addr", addr);
|
jsonRead(param, "addr", addr);
|
||||||
//
|
|
||||||
// if (bmps.find(addr) == bmps.end()) {
|
if (bmps.find(addr) == bmps.end()) {
|
||||||
// bmps[addr] = new Adafruit_BMP280();
|
bmps[addr] = new Adafruit_BMP280();
|
||||||
// bmps[addr]->begin(hexStringToUint8(addr));
|
bmps[addr]->begin(hexStringToUint8(addr));
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// if (subtype == F("Bmp280t")) {
|
if (subtype == F("Bmp280t")) {
|
||||||
// return new Bmp280t(bmps[addr], param);
|
return new Bmp280t(bmps[addr], param);
|
||||||
// } else if (subtype == F("Bmp280p")) {
|
} else if (subtype == F("Bmp280p")) {
|
||||||
// return new Bmp280p(bmps[addr], param);
|
return new Bmp280p(bmps[addr], param);
|
||||||
// }
|
}
|
||||||
//} else {
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,28 +53,28 @@ class Dht1122h : public IoTItem {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void* getAPI_Dht1122(String subtype, String param) {
|
void* getAPI_Dht1122(String subtype, String param) {
|
||||||
// if (subtype == F("Dht1122t") || subtype == F("Dht1122h")) {
|
if (subtype == F("Dht1122t") || subtype == F("Dht1122h")) {
|
||||||
// int pin;
|
int pin;
|
||||||
// String senstype;
|
String senstype;
|
||||||
// jsonRead(param, "pin", pin);
|
jsonRead(param, "pin", pin);
|
||||||
// jsonRead(param, "senstype", senstype);
|
jsonRead(param, "senstype", senstype);
|
||||||
//
|
|
||||||
// if (dhts.find(pin) == dhts.end()) {
|
if (dhts.find(pin) == dhts.end()) {
|
||||||
// dhts[pin] = new DHTesp();
|
dhts[pin] = new DHTesp();
|
||||||
//
|
|
||||||
// if (senstype == "dht11") {
|
if (senstype == "dht11") {
|
||||||
// dhts[pin]->setup(pin, DHTesp::DHT11);
|
dhts[pin]->setup(pin, DHTesp::DHT11);
|
||||||
// } else if (senstype == "dht22") {
|
} else if (senstype == "dht22") {
|
||||||
// dhts[pin]->setup(pin, DHTesp::DHT22);
|
dhts[pin]->setup(pin, DHTesp::DHT22);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// if (subtype == F("Dht1122t")) {
|
if (subtype == F("Dht1122t")) {
|
||||||
// return new Dht1122t(dhts[pin], param);
|
return new Dht1122t(dhts[pin], param);
|
||||||
// } else if (subtype == F("Dht1122h")) {
|
} else if (subtype == F("Dht1122h")) {
|
||||||
// return new Dht1122h(dhts[pin], param);
|
return new Dht1122h(dhts[pin], param);
|
||||||
// }
|
}
|
||||||
//} else {
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,18 +46,18 @@ class GY21h : public IoTItem {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void* getAPI_GY21(String subtype, String param) {
|
void* getAPI_GY21(String subtype, String param) {
|
||||||
// if (subtype == F("GY21t") || subtype == F("GY21h")) {
|
if (subtype == F("GY21t") || subtype == F("GY21h")) {
|
||||||
// if (!sensor) {
|
if (!sensor) {
|
||||||
// sensor = new GY21;
|
sensor = new GY21;
|
||||||
// if (sensor) Wire.begin(SDA, SCL);
|
if (sensor) Wire.begin(SDA, SCL);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// if (subtype == F("GY21t")) {
|
if (subtype == F("GY21t")) {
|
||||||
// return new GY21t(param);
|
return new GY21t(param);
|
||||||
// } else if (subtype == F("GY21h")) {
|
} else if (subtype == F("GY21h")) {
|
||||||
// return new GY21h(param);
|
return new GY21h(param);
|
||||||
// }
|
}
|
||||||
//} else {
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
@@ -39,18 +39,18 @@ class Sht20h : public IoTItem {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void* getAPI_Sht20(String subtype, String param) {
|
void* getAPI_Sht20(String subtype, String param) {
|
||||||
// if (subtype == F("Sht20t") || subtype == F("Sht20h")) {
|
if (subtype == F("Sht20t") || subtype == F("Sht20h")) {
|
||||||
// if (!sht) {
|
if (!sht) {
|
||||||
// sht = new SHT2x;
|
sht = new SHT2x;
|
||||||
// if (sht) sht->begin();
|
if (sht) sht->begin();
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// if (subtype == F("Sht20t")) {
|
if (subtype == F("Sht20t")) {
|
||||||
// return new Sht20t(param);
|
return new Sht20t(param);
|
||||||
// } else if (subtype == F("Sht20h")) {
|
} else if (subtype == F("Sht20h")) {
|
||||||
// return new Sht20h(param);
|
return new Sht20h(param);
|
||||||
// }
|
}
|
||||||
//} else {
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user