Merge pull request #856 from dalathegreat/feature/bmw-ix-support

iX Battery Type - Send BMS Reset at startup
This commit is contained in:
Daniel Öster 2025-02-05 11:59:36 +03:00 committed by GitHub
commit dfbaffb000
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -790,6 +790,9 @@ void setup_battery(void) { // Performs one time setup at startup
strncpy(datalayer.system.info.battery_protocol, "BMW iX and i4-7 platform", 63);
datalayer.system.info.battery_protocol[63] = '\0';
//Reset Battery at bootup
transmit_can_frame(&BMWiX_6F4_REQUEST_HARD_RESET, can_config.battery);
//Before we have started up and detected which battery is in use, use 108S values
datalayer.battery.info.max_design_voltage_dV = MAX_PACK_VOLTAGE_DV;
datalayer.battery.info.min_design_voltage_dV = MIN_PACK_VOLTAGE_DV;

View file

@ -15,7 +15,7 @@
#define MAX_CHARGE_POWER_WHEN_TOPBALANCING_W 500
#define RAMPDOWN_SOC 9000 // (90.00) SOC% to start ramping down from max charge power towards 0 at 100.00%
#define STALE_PERIOD_CONFIG \
300000; //Number of milliseconds before critical values are classed as stale/stuck 300000 = 300 seconds
400000; //Number of milliseconds before critical values are classed as stale/stuck 300000 = 400 seconds
void setup_battery(void);
void transmit_can_frame(CAN_frame* tx_frame, int interface);