feat(nissanleaf): add v.b.12v.current metric (from polling VCM)#1152
Draft
zhongfu wants to merge 2 commits intoopenvehicles:masterfrom
Draft
feat(nissanleaf): add v.b.12v.current metric (from polling VCM)#1152zhongfu wants to merge 2 commits intoopenvehicles:masterfrom
zhongfu wants to merge 2 commits intoopenvehicles:masterfrom
Conversation
Member
|
While it's of course possible to increase the number of poll states supported, it seems a bit odd needing to do so, as all other vehicles do just fine with 4 states. From a look into the source, it seems you currently waste one state. A comment in the module reads… Yet you still have state slot 0 assigned to the "off" state, with all poll entry times being zero. If you can detect the vehicle "on" states without polling, you don't need an "off" polling state, but can instead stop the poller. Regards, |
Contributor
Author
Ah yeah, that makes sense. I'll go check it out, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
as the title says, this PR adds a
v.b.12v.currentmetric for measuring 12V battery current.it doesn't seem like anyone has figured out if the VCM (which is connected directly to the 12V lead-acid battery current sensor) reports this periodically, so for now, we can only poll
potential improvements/issues:
poll whenever car is awake or HV relay is closed, instead of polling only while in on/running/charging states
VEHICLE_POLL_NSTATESinvehicle_poller.his set to 4, not sure about the implications of increasing this)figure out if if it's safe to poll while running
figure out if VCM (or e.g. DC-DC converter) is reporting this information on the CAN bus
for now, this is a draft because i'll still have to test this (to make sure the resulting values seem reasonable), plus this isn't a great solution IMO