Skip to content

Commit 5b4b59b

Browse files
committed
mini fix for the 100 soc bug
- fixed linear interpolation to not use the same point twice
1 parent ed6f742 commit 5b4b59b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BMS/src/StateOfCharge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ uint16_t convertLowVoltage(uint32_t voltage) {
3636
{
3737
return CELL_CAPACITY_RATED;
3838
}
39-
return linearInterpolateAh(socLookupTable[i-1], socLookupTable[i-1], cell_voltage);
39+
return linearInterpolateAh(socLookupTable[i-1], socLookupTable[i], cell_voltage);
4040
}
4141
}
4242
// Fallback Value

0 commit comments

Comments
 (0)