Skip to content

Commit 242a296

Browse files
authored
Merge pull request #103 from martincornejo/cell-voltages
Fix cell voltages processing
2 parents 02d2d58 + 63e9a73 commit 242a296

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

e3dc/_e3dc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,9 +1569,8 @@ def get_battery_data(
15691569
and voltages_raw[1] != "Error"
15701570
):
15711571
voltages_data = rscpFindTagIndex(voltages_raw, RscpTag.BAT_DATA)
1572-
seriesCellCount = rscpFindTagIndex(info, RscpTag.BAT_DCB_NR_SERIES_CELL)
1573-
for cell in range(0, seriesCellCount):
1574-
voltages.append(voltages_data[cell][2])
1572+
for cell_voltage in voltages_data:
1573+
voltages.append(cell_voltage[2])
15751574

15761575
dcbobj: Dict[str, Any] = {
15771576
"current": rscpFindTagIndex(info, RscpTag.BAT_DCB_CURRENT),

0 commit comments

Comments
 (0)