Skip to content

Commit

Permalink
Flag AddToTotal also on DC values
Browse files Browse the repository at this point in the history
Bugfix Flag AddToTotal also applied to DC values
Removed description for latest change
  • Loading branch information
OFreddy committed Feb 16, 2024
1 parent 6ddf3c7 commit bb086b1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@ Since the OpenDTU works with several inverters in my case, I didn't want some of

I have added a settings option to control the calculation.

### Extended Web API status URL by a brief parameter

Since the 16kByte output of the default status command from my 5 Hoymiles inverters blasted the stack of my display implementation ([wifi-tft-rf24L01](https://github.com/OFreddy/wifi-tft-rf24L01)) a brief output was required.

The brief output can be accessed by appending a parameter *brief* to the status URL:

`http://<ip-addr>/api/livedata/status?brief`

It only contains values necessary for the display and the returned payload is less than one kilobyte.

[![OpenDTU Build](https://github.com/tbnobody/OpenDTU/actions/workflows/build.yml/badge.svg)](https://github.com/tbnobody/OpenDTU/actions/workflows/build.yml)
[![cpplint](https://github.com/tbnobody/OpenDTU/actions/workflows/cpplint.yml/badge.svg)](https://github.com/tbnobody/OpenDTU/actions/workflows/cpplint.yml)
[![Yarn Linting](https://github.com/tbnobody/OpenDTU/actions/workflows/yarnlint.yml/badge.svg)](https://github.com/tbnobody/OpenDTU/actions/workflows/yarnlint.yml)
Expand Down
2 changes: 1 addition & 1 deletion src/Datastore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void DatastoreClass::loop()
}

for (auto& c : inv->Statistics()->getChannelsByType(TYPE_DC)) {
if (inv->getEnablePolling()) {
if (inv->getEnablePolling() && cfg->AddToTotal) {
_totalDcPowerEnabled += inv->Statistics()->getChannelFieldValue(TYPE_DC, c, FLD_PDC);
_totalDcPowerDigits = max<unsigned int>(_totalDcPowerDigits, inv->Statistics()->getChannelFieldDigits(TYPE_DC, c, FLD_PDC));

Expand Down

0 comments on commit bb086b1

Please sign in to comment.