Browse Source

Fix cast errors

fastled
Xose Pérez 7 years ago
parent
commit
b9db614d8e
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      code/espurna/sensor.ino

+ 2
- 2
code/espurna/sensor.ino View File

@ -149,7 +149,7 @@ void _sensorWebSocketStart(JsonObject& root) {
#if EMON_ANALOG_SUPPORT #if EMON_ANALOG_SUPPORT
if (sensor->getID() == SENSOR_EMON_ANALOG_ID) { if (sensor->getID() == SENSOR_EMON_ANALOG_ID) {
root["emonVisible"] = 1; root["emonVisible"] = 1;
root["pwrVoltage"] = _sensors[i]->getVoltage();
root["pwrVoltage"] = ((EmonAnalogSensor *) sensor)->getVoltage();
hasSensors = true; hasSensors = true;
} }
#endif #endif
@ -400,7 +400,7 @@ void _sensorConfigure() {
#if EMON_ANALOG_SUPPORT #if EMON_ANALOG_SUPPORT
if (_sensors[i]->getID() == SENSOR_EMON_ANALOG_ID) { if (_sensors[i]->getID() == SENSOR_EMON_ANALOG_ID) {
AnalogSensor * sensor = (AnalogSensor *) _sensors[i];
EmonAnalogSensor * sensor = (EmonAnalogSensor *) _sensors[i];
if (value = getSetting("pwrExpectedP", 0).toInt() == 0) { if (value = getSetting("pwrExpectedP", 0).toInt() == 0) {
value = getSetting("pwrRatioC", EMON_CURRENT_RATIO).toFloat(); value = getSetting("pwrRatioC", EMON_CURRENT_RATIO).toFloat();


Loading…
Cancel
Save