mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
pzem строка установки адресов
This commit is contained in:
@@ -25,7 +25,7 @@ void* getAPI_Mcp23017(String subtype, String params);
|
||||
void* getAPI_Mp3(String subtype, String params);
|
||||
void* getAPI_Multitouch(String subtype, String params);
|
||||
void* getAPI_Pcf8574(String subtype, String params);
|
||||
void* getAPI_Pwm32(String subtype, String params);
|
||||
void* getAPI_Pwm8266(String subtype, String params);
|
||||
void* getAPI_TelegramLT(String subtype, String params);
|
||||
void* getAPI_Lcd2004(String subtype, String params);
|
||||
|
||||
@@ -56,7 +56,7 @@ if ((tmpAPI = getAPI_Mcp23017(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Mp3(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Multitouch(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pcf8574(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pwm32(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Pwm8266(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_TelegramLT(subtype, params)) != nullptr) return tmpAPI;
|
||||
if ((tmpAPI = getAPI_Lcd2004(subtype, params)) != nullptr) return tmpAPI;
|
||||
return nullptr;
|
||||
|
||||
@@ -15,6 +15,8 @@ class Pzem004v : public IoTItem {
|
||||
addr = jsonReadStr(parameters, "addr");
|
||||
if (myUART) {
|
||||
pzem = new PZEMSensor(myUART, hexStringToUint8(addr));
|
||||
// раскомментируйте эту строку если нужно поменять адрес pzem
|
||||
// SerialPrint("i", "Pzem", String(pzem->setAddress(0x03)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +193,7 @@ void* getAPI_Pzem004(String subtype, String param) {
|
||||
} else if (subtype == F("Pzem004hz")) {
|
||||
return new Pzem004hz(param);
|
||||
} else if (subtype == F("Pzem004pf")) {
|
||||
return new Pzem004pf(param);
|
||||
return new Pzem004pf(param);
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user