added bms id to view

This commit is contained in:
Moritz Ruffer 2025-03-26 23:12:52 +01:00
parent 332b7fb223
commit f09566ce49
2 changed files with 2 additions and 0 deletions

View File

@ -80,6 +80,7 @@ typedef struct {
int16_t cellVoltages[MAXIMUM_CELL_VOLTAGES];
int16_t auxVoltages[MAXIMUM_AUX_VOLTAGES];
uint16_t cellTemps[MAXIMUM_AUX_VOLTAGES];
uint32_t bmsID;
struct ADBMS6830_Internal_Status status;
uint16_t internalDieTemp;

View File

@ -62,6 +62,7 @@ HAL_StatusTypeDef amsReset() {
for (size_t j = 0; j < SID_GROUP_SIZE; j++) {
id |= sidbuffer[BUFFER_BMS_OFFSET(i, SID_GROUP_SIZE) + j] << (j * 8);
}
modules[i].bmsID = id;
debug_log_cont(LOG_LEVEL_INFO, "0x%lx%lx ", (uint32_t)(id >> 32), (uint32_t)(id & 0xFFFFFFFF)); //newlib does not support %llu
}
}