Skip to content

Commit

Permalink
Update jkbms_can.py
Browse files Browse the repository at this point in the history
  • Loading branch information
p0l0us authored and mr-manuel committed Feb 11, 2024
1 parent d140459 commit 97a7bb9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions etc/dbus-serialbattery/bms/jkbms_can.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ def __del__(self):
ALM_INFO = "ALM_INFO"

MESSAGES_TO_READ = 100


# Changed from 0x0XF4 to 0x0XF5. See https://github.com/Louisvdw/dbus-serialbattery/issues/950
CAN_FRAMES = {
BATT_STAT: 0x02F4,
CELL_VOLT: 0x04F4,
CELL_TEMP: 0x05F4,
ALM_INFO: 0x07F4,
BATT_STAT: 0x02F5,
CELL_VOLT: 0x04F5,
CELL_TEMP: 0x05F5,
ALM_INFO: 0x07F5,
}

def test_connection(self):
Expand All @@ -66,7 +67,7 @@ def get_settings(self):
# After successful connection get_settings will be call to set up the battery.
# Set the current limits, populate cell count, etc
# Return True if success, False for failure
self.max_battery_current = MAX_BATTERY_CHARGE_CURRENT
self.max_battery_charge_current = MAX_BATTERY_CHARGE_CURRENT
self.max_battery_discharge_current = MAX_BATTERY_DISCHARGE_CURRENT
self.max_battery_voltage = MAX_CELL_VOLTAGE * self.cell_count
self.min_battery_voltage = MIN_CELL_VOLTAGE * self.cell_count
Expand Down

0 comments on commit 97a7bb9

Please sign in to comment.