firmware
IEM Firmware Documentation
|
#include "PackCalculations.h"
Functions | |
void | setCriticalVoltages (BMS_critical_info_t *bms, CellData const bmsData[144]) |
This method calculates the maximum and minimum cell voltages in the pack, and sets those values w/ the associated cell number to the bms critical info struct. | |
void | setCriticalTemps (BMS_critical_info_t *bms, CellData const bmsData[144]) |
This method calculates the maximum and minimum cell temps in the pack, and sets those values w/ the associated cell number to the bms critical info struct. | |
void | balance (BMSConfigStructTypedef const *cfg, BMS_critical_info_t *bms, CellData bmsData[144], bool cellDischarge[12][12], bool fullDischarge[12][12], uint8_t balanceCounter, uint8_t *chargeRate) |
This function is still a work in progress. | |
void | thresholdBalance (BMSConfigStructTypedef *cfg, BMS_critical_info_t *bms, CellData bmsData[144], bool cell_discharge[12][12], uint16_t cell_discharge_threshold, uint8_t num_cells_discharge_per_secondary) |
WIP/untested. Should be run while accumulator is not charging, discharges any cells above the threshold. |
Last Edited Spring 2024 : David Lacayo
void balance | ( | BMSConfigStructTypedef const * | cfg, |
BMS_critical_info_t * | bms, | ||
CellData | bmsData[144], | ||
bool | cellDischarge[12][12], | ||
bool | fullDischarge[12][12], | ||
uint8_t | balanceCounter, | ||
uint8_t * | chargeRate ) |
This function is still a work in progress.
void setCriticalTemps | ( | BMS_critical_info_t * | bms, |
CellData const | bmsData[144] ) |
This method calculates the maximum and minimum cell temps in the pack, and sets those values w/ the associated cell number to the bms critical info struct.
cfg | is the bms configuration file with constants used in our bms |
bms | is the bms struct that contains critical info regarding our pack |
bmsData | is an array of 144 cellData structs, containing index, fault, voltage and temperature |
void setCriticalVoltages | ( | BMS_critical_info_t * | bms, |
CellData const | bmsData[144] ) |
This method calculates the maximum and minimum cell voltages in the pack, and sets those values w/ the associated cell number to the bms critical info struct.
cfg | is the bms configuration file with constants used in our bms |
bms | is the bms struct that contains critical info regarding our pack |
bmsData | is an array of 144 cellData structs, containing index, fault, voltage and temperature |
void thresholdBalance | ( | BMSConfigStructTypedef * | cfg, |
BMS_critical_info_t * | bms, | ||
CellData | bmsData[144], | ||
bool | cell_discharge[12][12], | ||
uint16_t | cell_discharge_threshold, | ||
uint8_t | num_cells_discharge_per_secondary ) |
WIP/untested. Should be run while accumulator is not charging, discharges any cells above the threshold.