Skip to content

Commit 63e9a73

Browse files
Fix cell voltages processing
1 parent 75d3d41 commit 63e9a73

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
@@ -1279,9 +1279,8 @@ def get_battery_data(
12791279
and voltages_raw[1] != "Error"
12801280
):
12811281
voltages_data = rscpFindTagIndex(voltages_raw, RscpTag.BAT_DATA)
1282-
seriesCellCount = rscpFindTagIndex(info, RscpTag.BAT_DCB_NR_SERIES_CELL)
1283-
for cell in range(0, seriesCellCount):
1284-
voltages.append(voltages_data[cell][2])
1282+
for cell_voltage in voltages_data:
1283+
voltages.append(cell_voltage[2])
12851284

12861285
dcbobj = {
12871286
"current": rscpFindTagIndex(info, RscpTag.BAT_DCB_CURRENT),

0 commit comments

Comments
 (0)