mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 10:49:42 +02:00
Fix truncation of values
This commit is contained in:
parent
9da8d45a8d
commit
44f4d6538e
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ uint16_t estimateSOC(uint16_t cellVoltage) { // Linear interpolation function
|
||||||
return 0; // Default return for safety, should never reach here
|
return 0; // Default return for safety, should never reach here
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t selectSOC(uint8_t SOC_low, uint8_t SOC_high) {
|
uint16_t selectSOC(uint16_t SOC_low, uint16_t SOC_high) {
|
||||||
if (SOC_low == 0 || SOC_high == 0) {
|
if (SOC_low == 0 || SOC_high == 0) {
|
||||||
return 0; // If either value is 0, return 0
|
return 0; // If either value is 0, return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue