-
Notifications
You must be signed in to change notification settings - Fork 0
/
BMSModuleManager.h
61 lines (56 loc) · 1.58 KB
/
BMSModuleManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
#include "config.h"
#include "BMSModule.h"
class BMSModuleManager
{
public:
BMSModuleManager();
void balanceCells();
void setupBoards();
void findBoards();
void renumberBoardIDs();
void clearFaults();
void sleepBoards();
void wakeBoards();
void getAllVoltTemp();
void readSetpoints();
void setBatteryID(int id);
void setPstrings(int Pstrings);
void setUnderVolt(float newVal);
void setOverVolt(float newVal);
void setOverTemp(float newVal);
void setBalanceV(float newVal);
void setBalanceHyst(float newVal);
void setSensors(int sensor,float Ignore);
float getPackVoltage();
float getAvgTemperature();
float getAvgCellVolt();
float getLowCellVolt();
float getHighCellVolt();
float getHighVoltage();
float getLowVoltage();
/*
void processCANMsg(CAN_FRAME &frame);
*/
void printPackSummary();
void printPackDetails();
String htmlPackDetails();
private:
float packVolt; // All modules added together
int Pstring;
float LowCellVolt;
float HighCellVolt;
float lowestPackVolt;
float highestPackVolt;
float lowestPackTemp;
float highestPackTemp;
BMSModule modules[MAX_MODULE_ADDR + 1]; // store data for as many modules as we've configured for.
int batteryID;
int numFoundModules; // The number of modules that seem to exist
bool isFaulted;
/*
void sendBatterySummary();
void sendModuleSummary(int module);
void sendCellDetails(int module, int cell);
*/
};