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

Bugfix/bmw i3 messages #299

Merged
merged 7 commits into from
May 12, 2024
Merged

Bugfix/bmw i3 messages #299

merged 7 commits into from
May 12, 2024

Conversation

odlg
Copy link
Collaborator

@odlg odlg commented May 12, 2024

What
Fixed fetching extra data and wait until data available before setting low voltage event. Use max cell voltage instead of average voltage. Reduced risk of making unneeded events.

Why
Make using BMW i3 batteries more robust.

How
Send different defined 0x6F1 messages and parse them as the type requested. Made logic regarding raising events more robust.

report_value = 255;
}

set_event(EVENT_CELL_DEVIATION_HIGH, report_value);
Copy link
Owner

@dalathegreat dalathegreat May 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I mentioned in the other PR, It would be good enough to just do
set_event(EVENT_CELL_DEVIATION_HIGH, battery_cell_deviation_mV);

here, since we raise an alarm if it goes over 250mv. And 250 fits into the u8, barely :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odlg Anyways, I approved this PR, we can handle that discussion in the other PR!

@odlg odlg merged commit 8777a99 into main May 12, 2024
48 checks passed
@dalathegreat dalathegreat deleted the bugfix/bmw-i3-messages branch May 19, 2024 18:33
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.

2 participants