|
@ -158,7 +158,7 @@ class HLW8012Sensor : public BaseSensor { |
|
|
|
|
|
|
|
|
// Descriptive name of the sensor |
|
|
// Descriptive name of the sensor |
|
|
String description() { |
|
|
String description() { |
|
|
char buffer[25]; |
|
|
|
|
|
|
|
|
char buffer[28]; |
|
|
snprintf(buffer, sizeof(buffer), "HLW8012 @ GPIO(%u,%u,%u)", _sel, _cf, _cf1); |
|
|
snprintf(buffer, sizeof(buffer), "HLW8012 @ GPIO(%u,%u,%u)", _sel, _cf, _cf1); |
|
|
return String(buffer); |
|
|
return String(buffer); |
|
|
} |
|
|
} |
|
@ -170,7 +170,7 @@ class HLW8012Sensor : public BaseSensor { |
|
|
|
|
|
|
|
|
// Address of the sensor (it could be the GPIO or I2C address) |
|
|
// Address of the sensor (it could be the GPIO or I2C address) |
|
|
String address(unsigned char index) { |
|
|
String address(unsigned char index) { |
|
|
char buffer[10]; |
|
|
|
|
|
|
|
|
char buffer[12]; |
|
|
snprintf(buffer, sizeof(buffer), "%u:%u:%u", _sel, _cf, _cf1); |
|
|
snprintf(buffer, sizeof(buffer), "%u:%u:%u", _sel, _cf, _cf1); |
|
|
return String(buffer); |
|
|
return String(buffer); |
|
|
} |
|
|
} |
|
|