From 1d132172a1b0f3b2cc42ec6a1ccfa13e064f88cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sat, 25 Aug 2018 17:14:53 +0200 Subject: [PATCH] Fix EmonSensor bug --- code/espurna/sensors/EmonSensor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/espurna/sensors/EmonSensor.h b/code/espurna/sensors/EmonSensor.h index 657b63e1..bd9cfb0c 100644 --- a/code/espurna/sensors/EmonSensor.h +++ b/code/espurna/sensors/EmonSensor.h @@ -57,7 +57,7 @@ class EmonSensor : public I2CSensor { void resetEnergy(unsigned char channel, double value = 0) { if (channel >= _channels) return; - _energy[i] = value; + _energy[channel] = value; } // ---------------------------------------------------------------------