Merge branch 'master-test' of https://git.fasttube.de/FaSTTUBe/ams-master into master-test

This commit is contained in:
Lene Marquardt 2025-05-13 10:58:42 +02:00
commit 97117c80aa
3 changed files with 7 additions and 7 deletions

View File

@ -147,7 +147,7 @@ HAL_StatusTypeDef amsAuxAndStatusMeasurement(Cell_Module (*module)[N_BMS]) {
CHECK_RETURN(readCMD(RDSTATA, rxbuf, STATUS_GROUP_A_SIZE));
for (size_t i = 0; i < N_BMS; i++) {
size_t offset = BUFFER_BMS_OFFSET(i, STATUS_GROUP_A_SIZE);
(*module)[i].internalDieTemp = (mV_from_ADBMS6830(rxbuf[offset + 2] | (rxbuf[offset + 3] << 8)) / 7.5) + 273; //datasheet page 72
(*module)[i].internalDieTemp = (mV_from_ADBMS6830(rxbuf[offset + 2] | (rxbuf[offset + 3] << 8)) / 7.5f) - 273; //datasheet page 72
}
CHECK_RETURN(readCMD(RDSTATB, rxbuf, STATUS_GROUP_B_SIZE));

View File

@ -81,7 +81,7 @@ HAL_StatusTypeDef battery_update() {
for (size_t cell = 0; cell < N_CELLS; cell++) {
if (voltage_flags & (1UL << cell)) {
debug_log_cont(LOG_LEVEL_ERROR, "%d (%d mV) ", cell, modules[ret.bms_id].cellVoltages[cell]);
debug_log_cont(LOG_LEVEL_ERROR, "%u (%d mV) ", cell, modules[ret.bms_id].cellVoltages[cell]);
}
}
@ -159,7 +159,7 @@ HAL_StatusTypeDef battery_update() {
}
if (cellTemps[i][j] > (MAX_TEMP * (uint16_t)(TEMP_CONV))) {
debug_log(LOG_LEVEL_ERROR, "Cell %zu on BMS %zu overtemp: %d0 mC", j, i, cellTemps[i][j]);
debug_log(LOG_LEVEL_ERROR, "Cell %u on BMS %u overtemp: %d0 mC", j, i, cellTemps[i][j]);
can_send_error(TS_ERRORKIND_CELL_OVERTEMP, i);
ts_sm_set_error_source(TS_ERROR_SOURCE_SLAVES, TS_ERRORKIND_CELL_OVERTEMP, true);
} else {

View File

@ -69,10 +69,10 @@ void print_master_status() {
(module_temps[i].min == min_temp) ? COLOR_MIN : "", (module_temps[i].min), COLOR_RESET,
(module_temps[i].max == max_temp) ? COLOR_MAX : "", (module_temps[i].max), COLOR_RESET);*/
#else
debug_log(LOG_LEVEL_INFO, " %2zu: %5d mV | %5d mV | %.2f mV | %3d °C | %3d °C", i,
module_voltages[i].min, module_voltages[i].max,
module_std_deviation[i],
module_temps[i].min, module_temps[i].max);
// debug_log(LOG_LEVEL_INFO, " %2u: %5d mV | %5d mV | %.2f mV | %3d °C | %3d °C", i,
// module_voltages[i].min, module_voltages[i].max,
// module_std_deviation[i],
// module_temps[i].min, module_temps[i].max);
#endif
}