-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Some mostly cosmetic changes to get started #63
Conversation
Signed-off-by: taliesin <[email protected]>
Signed-off-by: taliesin <[email protected]>
Signed-off-by: taliesin <[email protected]>
testing charging_allowed() always leads to the same switches, be less verbose with always the same conditions. Signed-off-by: taliesin <[email protected]>
NOTE: in one case the standard behaviour is not used (auth_grant_to), this seems wrong, currently it's marked with a TODO, but not changed. Signed-off-by: taliesin <[email protected]>
This still says 'merging is blocked', but all commits were signed off? |
The |
Merged, thanks for the code review :-) |
Could you please reflect on the TODO in the last commit, I've marked it with a comment. |
When the wallbox requires authorization to start charging. EV can be authorized before connecting to the wallbox. Therefore, auth_grant_to is always set to 0, not just when it is expired. I know that 60 seconds is not much for replacing the EV, but I was thinking about the fact that it could also be a configurable parameter. |
so I would say:
... would be a correct solution and be more descriptive. |
Yes, that should works correctly |
So, when I wrote some unit tests, I found out the check |
I'm currently too busy to work on it, but the revert somehow defies the change to is_expired(). My impression is that auth_grant_to should be initialized, so that is_expired() works. |
All but the last commit are pretty cosmetic and hopefully fit the overall style.
The helper timeout functions (last commit) try to reduce complexity a bit and there was one situation that seems like a bug, so a TODO was inserted. Please review this situation.