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