Skip to content

Commit

Permalink
Merge pull request #960 from p0l0us/bugfix-950-dev
Browse files Browse the repository at this point in the history
Bugfix 950 dev
  • Loading branch information
mr-manuel authored Feb 10, 2024
2 parents 5e025e6 + 210bab8 commit ce2df1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion etc/dbus-serialbattery/bms/daly_can.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_connection(self):

def get_settings(self):
self.capacity = BATTERY_CAPACITY
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
return True

Expand Down
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 ce2df1a

Please sign in to comment.