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.

Dependencies:   CUER_CAN mbed

Fork of BMS_BMUCore_cellvoltage_Mrinank by Mrinank Sharma

Committer:
ItsJustZi
Date:
Mon Aug 29 21:52:41 2016 +0000
Revision:
3:2238838234e1
Parent:
2:34d6953c3623
Basic low level read-write register functions added. Main loop incomplete. Pending completion of hardware to test code. before proceeding to work on higher level logic.

Who changed what in which revision?

UserRevisionLine numberNew 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