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; } // ---------------------------------------------------------------------