Closed eikowagenknecht closed 8 months ago
Thank you @eikowagenknecht! 🥇 That is a lot of change. Can you please separate the two commits into two PRs?
Ooops, I intended to do so. The other PR should be fine, but this one needs to be rebased against master. On it.
Done. I also fixed the flake8 errors.
Fixed the remaining two flake8 errors..
Ran isort and black as well now...
@eikowagenknecht do you potentially already created a script how you generated the RscpTag
?
I think it would be valuable to add this somewhere to make future updates easier.
rscpErrorCodes
and powermeterTypes
also to enum?rscptype
instead of type_
? @eikowagenknecht do you potentially already created a script how you generated the
RscpTag
? I think it would be valuable to add this somewhere to make future updates easier.
Sure, I commented and added the script. I put it into a newly created tools directory, if you want it somewhere else I'm happy to move it.
- would you mind moving
rscpErrorCodes
andpowermeterTypes
also to enum?- may I suggest using
rscptype
instead oftype_
?
All done.
Seems like flake8-docstrings is used as well in the GitHub workflow. I added that requirement to the developer section of the readme.
Congratulations :)
Implements #85
Moving to Enum instead of loose string references has the advantage that now only existing tags can be used and the IDE picks up on errors.
Unfortunately since "BAT_REQ_MEASURED_RESISTANCE" (0x03000130) and "BAT_RUN_MEASURED_RESISTANCE" (0x03800131) don't exist any more, I had to remove those two from the output.
But I think this is a good thing because those two were wrong anyways (see values in screenshots):
I can add those avg30s values to the battery results if you want. Currently those only exist on DCB level.