Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use indexed keys for energy saving #1875

Merged
merged 5 commits into from
Aug 27, 2019
Merged

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Aug 26, 2019

  • always use indexes with eneTotal
  • fix unsigned int comparison with -1
  • fix sensorID checks, use magnitude.global index directly as index
  • migrate pzemEneTotal to eneTotal
  • migrate eneTotal to eneTotal0

@mcspr mcspr mentioned this pull request Aug 26, 2019
@mcspr
Copy link
Collaborator Author

mcspr commented Aug 26, 2019

@tonilopezmr and I had also for some reason thought that magnitude.global is the same as _magnitudes index. Instead, it sets itself from _counts[magnitude.type]. All eneTotal indexes are updated from that value now

@mcspr mcspr merged commit 58401c8 into xoseperez:dev Aug 27, 2019
@mcspr mcspr deleted the fix/energy-total-save branch August 27, 2019 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant