6 bms + check ams_in for plausibility

This commit is contained in:
Lene Marquardt 2025-05-28 22:19:05 +02:00
parent 861d9c9bd3
commit 5c73a4b883
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,7 @@
#ifndef __CONFIG_ADBMS6830_H
#define __CONFIG_ADBMS6830_H
#define N_BMS 1
#define N_BMS 6
#define N_CELLS 16
#define ADBMS_MAX_CHIP_TEMP 1100 // max temperature of ADBMS6830B (not battery) in C
#define ADBMS_SPI_TIMEOUT 50 // Timeout in ms

View File

@ -167,7 +167,9 @@ void ftcan_msg_received_cb(uint16_t id, size_t len, const uint8_t *data) {
}
break;
case CAN_ID_AMS_IN:
ts_sm_handle_ams_in(data);
if(len == 1){ //check bc inverter sends 4 byte message to 0xB which causes discharge (prob)
ts_sm_handle_ams_in(data);
}
break;
default:
break;