Skip to content

Commit

Permalink
2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tertiush authored Mar 12, 2023
1 parent 079a9b9 commit 61da35a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ Bug fixs
Naming fixes. Possible fix for native and USB serial devices
<h2>v2.0.3</h2>
Possible bugfix for larger banks reading incorrect analog data
<h2>v2.0.4</h2>
Balance data should be base 16, not 8.
<h1>Known / possible issues</h1>
The overall Pack data collected under the root MQTT topic seems to follow the data of the first battery in the Pack.
7 changes: 5 additions & 2 deletions bms.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,9 @@ def bms_getAnalogData(bms,batNumber):
if cells != cells_prev:
byte_index += 2
cells = int(inc_data[byte_index:byte_index+2],16)
if cells != cells_prev:
print("Error parsing BMS analog data: Cannot read multiple packs")
return(False,"Error parsing BMS analog data: Cannot read multiple packs")

if print_initial:
print("Pack " + str(p) + ", Total cells: " + str(cells))
Expand Down Expand Up @@ -995,10 +998,10 @@ def bms_getWarnInfo(bms):
warnings += ", "
byte_index += 2

balanceState1 = '{0:08b}'.format(int(inc_data[byte_index:byte_index+2],8))
balanceState1 = '{0:08b}'.format(int(inc_data[byte_index:byte_index+2],16))
byte_index += 2

balanceState2 = '{0:08b}'.format(int(inc_data[byte_index:byte_index+2],8))
balanceState2 = '{0:08b}'.format(int(inc_data[byte_index:byte_index+2],16))
byte_index += 2

warnState1 = ord(bytes.fromhex(inc_data[byte_index:byte_index+2].decode('ascii')))
Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "BMS Pace"
description: "Pace BMS Interface"
version: "2.0.3"
version: "2.0.4"
slug: "bms_pace"
url: "https://github.com/Tertiush/bmspace"
init: false
Expand Down

0 comments on commit 61da35a

Please sign in to comment.