mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
always EnergyUpdateTotal
This commit is contained in:
parent
1ab0a2f05c
commit
9126635c9d
@ -233,6 +233,7 @@ void DataCallback(struct _ValueList * me, uint8_t flags)
|
|||||||
// Current I
|
// Current I
|
||||||
else if (ilabel == LABEL_IINST || ilabel == LABEL_IRMS1)
|
else if (ilabel == LABEL_IINST || ilabel == LABEL_IRMS1)
|
||||||
{
|
{
|
||||||
|
Energy.current_available = true;
|
||||||
Energy.current[0] = (float) atoi(me->value);
|
Energy.current[0] = (float) atoi(me->value);
|
||||||
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: Current %s, now %d"), me->value, (int) Energy.current[0]);
|
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: Current %s, now %d"), me->value, (int) Energy.current[0]);
|
||||||
}
|
}
|
||||||
@ -276,18 +277,14 @@ void DataCallback(struct _ValueList * me, uint8_t flags)
|
|||||||
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: HC:%u HP:%u Total:%u"), hc, hp, total);
|
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: HC:%u HP:%u Total:%u"), hc, hp, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Settings.flag4.teleinfo_rawdata) {
|
|
||||||
EnergyUpdateTotal(total/1000.0f, true);
|
EnergyUpdateTotal(total/1000.0f, true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Wh total index (standard)
|
// Wh total index (standard)
|
||||||
else if ( ilabel == LABEL_EAST)
|
else if ( ilabel == LABEL_EAST)
|
||||||
{
|
{
|
||||||
uint32_t total = atoi(me->value);
|
uint32_t total = atoi(me->value);
|
||||||
if (!Settings.flag4.teleinfo_rawdata) {
|
|
||||||
EnergyUpdateTotal(total/1000.0f, true);
|
EnergyUpdateTotal(total/1000.0f, true);
|
||||||
}
|
|
||||||
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: Total:%uWh"), total);
|
AddLog(LOG_LEVEL_DEBUG, PSTR("TIC: Total:%uWh"), total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user