mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 11:59:12 +03:00
Исправляем ошибки компиляции при переходе на новое ядро
This commit is contained in:
@@ -46,18 +46,18 @@ class GY21h : public IoTItem {
|
||||
};
|
||||
|
||||
void* getAPI_GY21(String subtype, String param) {
|
||||
// if (subtype == F("GY21t") || subtype == F("GY21h")) {
|
||||
// if (!sensor) {
|
||||
// sensor = new GY21;
|
||||
// if (sensor) Wire.begin(SDA, SCL);
|
||||
// }
|
||||
//
|
||||
// if (subtype == F("GY21t")) {
|
||||
// return new GY21t(param);
|
||||
// } else if (subtype == F("GY21h")) {
|
||||
// return new GY21h(param);
|
||||
// }
|
||||
//} else {
|
||||
if (subtype == F("GY21t") || subtype == F("GY21h")) {
|
||||
if (!sensor) {
|
||||
sensor = new GY21;
|
||||
if (sensor) Wire.begin(SDA, SCL);
|
||||
}
|
||||
|
||||
if (subtype == F("GY21t")) {
|
||||
return new GY21t(param);
|
||||
} else if (subtype == F("GY21h")) {
|
||||
return new GY21h(param);
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user