Skip to content

Conversation

@flora-hofmann-frequenz
Copy link
Collaborator

Addresses issue #18.

@flora-hofmann-frequenz flora-hofmann-frequenz requested a review from a team as a code owner November 28, 2024 14:47
@github-actions github-actions bot added the part:docs Affects the documentation label Nov 28, 2024
consumption = (
sum(
m2.value - m1.value
for m1, m2 in zip(consumption_samples, consumption_samples[1:])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should check that the diff is positive, because the energy can reset in between. Same for production

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I use something like max(0, m2.value - m1.value) to set it to 0 in case there is a reset?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's an option, or add a if m2.value > m1.value in the next line (same as for the power case).

Copy link
Contributor

@cwasicki cwasicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a bit more info in the release notes, code LGTM

RELEASE_NOTES.md Outdated
## New Features

* Add Readme information
* Use energy_consumed and energy_delivered
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs more context.

@flora-hofmann-frequenz flora-hofmann-frequenz added this pull request to the merge queue Dec 4, 2024
Merged via the queue into frequenz-floss:v0.x.x with commit 46687f9 Dec 4, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants