-
Notifications
You must be signed in to change notification settings - Fork 182
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
BYD Atto3: Add 10 temperature sensors to datalayer #849
base: main
Are you sure you want to change the base?
Conversation
battery_calc_max_temperature = battery_daughterboard_temperatures[1]; | ||
} | ||
for (int i = 1; i < 10; i++) { | ||
if (i == (SKIP_TEMPERATURE_SENSOR_NUMBER - 1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a likely scenario to have multiple failed sensors? if it is should this be an array or a bitmask of allowed sensors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now it is so rare that a sensor would be broken. Best to keep it safe, and only allow bypassing a single faulted sensor. We also dont know if the BMS does something when sensors fail, so let's not risk it 😓
battery_calc_min_temperature = battery_daughterboard_temperatures[1]; | ||
battery_calc_max_temperature = battery_daughterboard_temperatures[1]; | ||
} | ||
for (int i = 1; i < 10; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this start at sensor 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed, since we init the value to [0] element at the start
What
This PR makes it so you can track all 10 temperature sensors inside the battery
It also adds a method to skip using a specific temperature sensor, if you know it is broken.
Example, Sensor number 4 broken
Why
Better way to monitor the battery.
Also adds a way to use a battery without needing to replace a daughterboard with broken temp sensor (Note, requires deep knowledge of actual battery status)
How
All 10x measurements added to extended datalayer
Configurable option in .h file, SKIP_TEMPERATURE_SENSOR_NUMBER that can be tuned between 1-10 if needed