foxBMS / foxbms-2

foxBMS 2, online documentation at https://docs.foxbms.org
https://foxbms.org
Other
271 stars 127 forks source link

XXX_REDUNDANCY0 variable no assignment #24

Closed zbqxyz closed 1 year ago

zbqxyz commented 1 year ago

in redundancy.c function MRC_ValidateAfeMeasurement() ,mrc_tableCellVoltageRedundancy0 mrc_tableCelltemperatureRedundancy0 variables read from database ,but in database DATA_BLOCK_ID_CELL_VOLTAGE_REDUNDANCY0 DATA_BLOCK_ID_CELL_TEMPERATURE_REDUNDANCY0 it's never been written.Is that right?

foxBMS commented 1 year ago

Dear @zbqxyz,

yes, it is correct that the redundant measurement from the AFE is just read by the redundancy module. Function MRC_ValidateCellVoltageMeasurement() receives the cell voltage measurement values of the base and the redundant measurement as an input and the validates the measurements. The validated cell voltages are then written into the database entry DATA_BLOCK_ID_CELL_VOLTAGE. This database entry contains the validated measurements and is consecutively used from all other modules throught the BMS.

The same logic is applied to the cell temperature measurement. Here, the validated measurements are written into the database entry DATA_BLOCK_ID_CELL_TEMPERATURE.

The database entries XXX_BASE and XXX_REDUNDANCY0 are only intended to be used by the redundancy module. All other modules SHALL only use the validated database entries DATA_BLOCK_ID_CELL_VOLTAGE and DATA_BLOCK_ID_CELL_TEMPERATURE.

Best regards, The foxBMS Team