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

All batteries: Voltage limits as variables #190

Merged
merged 5 commits into from
Feb 17, 2024

Conversation

dalathegreat
Copy link
Owner

What

This PR makes the minimum/maximum voltages variables instead of defines. Tesla batteries benefit from this.

Why

Some batteries have multiple variations in chemistry, so we need to edit the limits at runtime. For instance LFP batteries have different voltage range compared to NCM.

How

The newly combined init_battery function sets the values once at startup. It can be later changed in runtime by writing max_voltage and min_voltage to the desired values.

Copy link
Collaborator

@Newevg Newevg left a comment

Choose a reason for hiding this comment

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

Works for LFP Tesla

@dalathegreat dalathegreat merged commit e60eca7 into main Feb 17, 2024
36 checks passed
@dalathegreat dalathegreat deleted the bugfix/voltage-limits-as-variables branch February 17, 2024 21:17
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