firmware
IEM Firmware Documentation
Loading...
Searching...
No Matches
PackCalculations.h
Go to the documentation of this file.
1
6
7#ifndef PACK_CALCULATIONS
8#define PACK_CALCULATIONS
9
10#include "BMSconfig.h"
11#include "LTC6811.h"
12// #include "LTC2949.h"
13#include "Fault.h"
14
15#define MAXINT16 65535
16
17extern uint8_t balance_counter;
19 CellData const bmsData[144]);
22 CellData bmsData[144], bool cellDischarge[12][12],
23 bool fullDischarge[12][12], uint8_t balanceCounter,
24 uint8_t *chargeRate);
26 CellData bmsData[144], bool cell_discharge[12][12],
27 uint16_t cell_discharge_threshold,
28 uint8_t num_cells_discharge_per_secondary);
29
30#endif // PACK_CALCULATIONS
BMS configuration.
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/ th...
Definition PackCalculations.c:17
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.
Definition PackCalculations.c:100
uint8_t balance_counter
Definition main.c:115
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 a...
Definition PackCalculations.c:74
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 thresho...
Definition PackCalculations.c:148
CellData bmsData[144]
Definition main.c:123
Definition BMSconfig.h:20
Definition Fault.h:16
Definition BMSconfig.h:71