Browse Source

Fix power factor range for HLW8012 sensor

fastled
Xose Pérez 7 years ago
parent
commit
ea38a3964c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      code/espurna/sensors/HLW8012Sensor.h

+ 1
- 1
code/espurna/sensors/HLW8012Sensor.h View File

@ -181,7 +181,7 @@ class HLW8012Sensor : public BaseSensor {
if (index == 2) return _hlw8012->getActivePower(); if (index == 2) return _hlw8012->getActivePower();
if (index == 3) return _hlw8012->getReactivePower(); if (index == 3) return _hlw8012->getReactivePower();
if (index == 4) return _hlw8012->getApparentPower(); if (index == 4) return _hlw8012->getApparentPower();
if (index == 5) return _hlw8012->getPowerFactor();
if (index == 5) return 100 * _hlw8012->getPowerFactor();
if (index == 6) return _hlw8012->getEnergy(); if (index == 6) return _hlw8012->getEnergy();
_error = SENSOR_ERROR_OUT_OF_RANGE; _error = SENSOR_ERROR_OUT_OF_RANGE;
return 0; return 0;


Loading…
Cancel
Save