|
foxBMS
1.0.0
The foxBMS Battery Management System API Documentation
|
Go to the documentation of this file.
77 int32_t diff_mV = voltageMic_mV - voltageCurrentSensor_mV;
86 int16_t baseCellVoltage,
87 int16_t redundancy0CellVoltage,
88 int16_t *pCellVoltage) {
98 *pCellVoltage = (baseCellVoltage + redundancy0CellVoltage) / 2;
103 int16_t baseCelltemperature,
104 int16_t redundancy0Celltemperature,
105 int16_t *pCelltemperature) {
115 *pCelltemperature = (baseCelltemperature + redundancy0Celltemperature) / 2;
uint16_t nrValidTemperatures[BS_NR_OF_STRINGS]
STD_RETURN_TYPE_e PL_CheckVoltageSpread(DATA_BLOCK_CELL_VOLTAGE_s *pCellvoltages, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
Cell voltage spread plausibility check.
#define BS_NR_OF_MODULES
number of modules in battery pack
enum STD_RETURN_TYPE STD_RETURN_TYPE_e
#define BS_NR_OF_TEMP_SENSORS_PER_MODULE
number of temperature sensors per battery module
Configuration of the battery system (e.g., number of battery modules, battery cells,...
@ DIAG_ID_PLAUSIBILITY_CELL_TEMPERATURE_SPREAD
#define BS_NR_OF_CELLS_PER_MODULE
number of battery cells per battery module (parallel cells are counted as one)
int16_t averageCellVoltage_mV[BS_NR_OF_STRINGS]
#define PL_CELL_TEMPERATURE_SPREAD_TOLERANCE_dK
Maximum deviation between a single cell temperature measurement and the average cell temperature in d...
#define PL_CELL_TEMPERATURE_TOLERANCE_dK
Maximum difference between redundant cell temperature measurements in deci kelvin.
float averageTemperature_ddegC[BS_NR_OF_STRINGS]
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define PL_CELL_VOLTAGE_TOLERANCE_mV
Maximum difference between redundant cell voltage measurement.
STD_RETURN_TYPE_e PL_CheckTemperatureSpread(DATA_BLOCK_CELL_TEMPERATURE_s *pCellTemperatures, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
Cell temperature spread plausibility check.
STD_RETURN_TYPE_e PL_CheckCelltemperature(int16_t baseCelltemperature, int16_t redundancy0Celltemperature, int16_t *pCelltemperature)
Cell temperature plausibility check between two redundant cell temperature measurement values.
math library for often used math functions
STD_RETURN_TYPE_e DIAG_CheckEvent(STD_RETURN_TYPE_e cond, DIAG_ID_e diag_id, DIAG_IMPACT_LEVEL_e impact, uint32_t data)
DIAG_CheckEvent provides a simple interface to check an event for STD_OK.
int16_t cellVoltage_mV[BS_NR_OF_STRINGS][BS_NR_OF_BAT_CELLS]
uint16_t invalidCellTemperature[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
uint64_t invalidCellVoltage[BS_NR_OF_STRINGS][BS_NR_OF_MODULES]
STD_RETURN_TYPE_e PL_CheckCellvoltage(int16_t baseCellVoltage, int16_t redundancy0CellVoltage, int16_t *pCellVoltage)
Cell voltage plausibility check between two redundant cell voltage measurement values.
@ DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE_SPREAD
#define NULL_PTR
Null pointer.
#define PL_STRING_VOLTAGE_TOLERANCE_mV
Maximum difference between pack voltage measurement from Measurement IC and current sensor.
plausibility checks for cell voltage and cell temperatures
int16_t cellTemperature_ddegC[BS_NR_OF_STRINGS][BS_NR_OF_TEMP_SENSORS]
#define PL_CELL_VOLTAGE_SPREAD_TOLERANCE_mV
Maximum deviation between a single cell voltage measurement and the average cell voltage.
STD_RETURN_TYPE_e PL_CheckStringVoltage(int32_t voltageMic_mV, int32_t voltageCurrentSensor_mV)
Pack voltage plausibility check between LTC and current sensor values.