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

Make ApiRequest public and onsider discharge cap in remaining time calculation #17

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

kbroulik
Copy link
Owner

There's no way this library will ever provide wrappers for
every single API endpoint. Making ApiRequest public enables
the user to issue custom requests while not having to worry
about the authentication scheme of the API.

This replaces the EndPoint enum with constexpr strings (source
compatible for the most part) and let the caller set an
arbitrary endpoint string if desired. A custom URL query
can also be provided.

systemstats: Consider discharge cap in remaining time calculation

The battery is typically configured not to discharge below 10%,
which skewes the remaining time calculation since there's an
additional half-a-kilowatt or so remaining that will not acutally
be used.

Rather than introduce a fully-fledged wrapper around the
getDisChargeConfigInfo (which also includes configurable time
settings), just call it directly for this one particular use case.

@kbroulik kbroulik force-pushed the kbroulik/remaining-bat-cap branch 3 times, most recently from c0b7b16 to 31d172e Compare December 18, 2023 16:52
There's no way this library will ever provide wrappers for
every single API endpoint. Making ApiRequest public enables
the user to issue custom requests while not having to worry
about the authentication scheme of the API.

This replaces the EndPoint enum with constexpr strings (source
compatible for the most part) and let the caller set an
arbitrary endpoint string if desired. A custom URL query
can also be provided.
The battery is typically configured not to discharge below 10%,
which skewes the remaining time calculation since there's an
additional half-a-kilowatt or so remaining that will not acutally
be used.

Rather than introduce a fully-fledged wrapper around the
getDisChargeConfigInfo (which also includes configurable time
settings), just call it directly for this one particular use case.
@kbroulik kbroulik force-pushed the kbroulik/remaining-bat-cap branch from 31d172e to 03ab05a Compare December 18, 2023 16:53
@kbroulik kbroulik merged commit 6e48288 into master Feb 22, 2024
11 checks passed
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.

1 participant