Adds Balancing function (on the top of SPI_I2C_Parser.cpp) and changes main function adding a test case for balancing to show that it is working as intended.
Fork of BMS_BMUCore_cellvoltage_Mrinank by
BMU.h@13:499c1e2da85b, 2016-12-01 (annotated)
- Committer:
- maxv008
- Date:
- Thu Dec 01 15:15:13 2016 +0000
- Revision:
- 13:499c1e2da85b
- Parent:
- 3:2238838234e1
Added working function that enables and disables S pins on the CMU
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ItsJustZi | 2:34d6953c3623 | 1 | #ifndef BMU_H |
ItsJustZi | 2:34d6953c3623 | 2 | #define BMU_H |
ItsJustZi | 2:34d6953c3623 | 3 | |
ItsJustZi | 2:34d6953c3623 | 4 | const int numberOfCMUs=3; |
ItsJustZi | 2:34d6953c3623 | 5 | const int numberOfCells=34; |
ItsJustZi | 2:34d6953c3623 | 6 | |
ItsJustZi | 2:34d6953c3623 | 7 | |
ItsJustZi | 1:7f03b5aba5d2 | 8 | enum bms_overall_status { |
ItsJustZi | 1:7f03b5aba5d2 | 9 | BMS_ERROR = 0, |
ItsJustZi | 1:7f03b5aba5d2 | 10 | BMS_IDLE = 1, |
ItsJustZi | 1:7f03b5aba5d2 | 11 | BMS_ENABLE = 5, // defined this way to keep consistency with old Tritium BMS |
ItsJustZi | 1:7f03b5aba5d2 | 12 | BMS_MEASURE = 2, |
ItsJustZi | 1:7f03b5aba5d2 | 13 | BMS_PRECHARGE = 3, |
ItsJustZi | 1:7f03b5aba5d2 | 14 | BMS_RUN = 4 |
ItsJustZi | 2:34d6953c3623 | 15 | }; |
ItsJustZi | 2:34d6953c3623 | 16 | |
ItsJustZi | 2:34d6953c3623 | 17 | #endif |