Siddharth Gupta / Mbed 2 deprecated BMS_BMUCore_Max_DummyData

Dependencies:   CUER_CAN DS1820 LTC2943 LTC6804 mbed

Fork of BMS_BMUCore_Max by CUER

Committer:
lcockerton62
Date:
Fri Dec 30 16:01:59 2016 +0000
Revision:
1:51477fe4851b
Parent:
0:0a5f554d2a16
Child:
13:7b42af989cd1
Storing SOC in EEPROM, added temperature sensors code, changed some of the data structures, added to CAN messages, added basic error status

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lcockerton62 0:0a5f554d2a16 1 #include "CAN_Data.h"
lcockerton62 0:0a5f554d2a16 2 #include "CAN_IDs.h"
lcockerton62 1:51477fe4851b 3 #include "Data_Types_BMU.h"
lcockerton62 0:0a5f554d2a16 4
lcockerton62 0:0a5f554d2a16 5 #ifndef CANParserBMU_H
lcockerton62 0:0a5f554d2a16 6 #define CANParserBMU_H
lcockerton62 0:0a5f554d2a16 7
lcockerton62 0:0a5f554d2a16 8 //@TODO Move these definitions elsewhere ideally into CAN_IDS.h
lcockerton62 0:0a5f554d2a16 9 #define BATTERY_SOC_BASE_ID 0xF5
lcockerton62 0:0a5f554d2a16 10 #define MAX_MIN_VOLTAGE 0xF8
lcockerton62 0:0a5f554d2a16 11 #define BLANK_DATA 0x00
lcockerton62 0:0a5f554d2a16 12 #define MAX_MIN_TEMPERATURE 0xF9
lcockerton62 0:0a5f554d2a16 13 #define BATTERY_PACK_STATUS_ID 0xFA
lcockerton62 0:0a5f554d2a16 14
lcockerton62 0:0a5f554d2a16 15 //@TODO add some comments
lcockerton62 0:0a5f554d2a16 16 CANMessage createTemperatureTelemetry(int ID, uint32_t CMUSerialNumber, uint16_t PCBTemperature, uint16_t cellTemperature);
lcockerton62 0:0a5f554d2a16 17
lcockerton62 0:0a5f554d2a16 18 CANMessage createVoltageTelemetry(int ID, uint16_t voltage[]);
lcockerton62 0:0a5f554d2a16 19
lcockerton62 0:0a5f554d2a16 20 CANMessage createPackSOC(float SOC, float percentageCharge);
lcockerton62 0:0a5f554d2a16 21
lcockerton62 0:0a5f554d2a16 22 CANMessage createPackBalanceSOC(float SOC, float percentageCharge);
lcockerton62 0:0a5f554d2a16 23
lcockerton62 1:51477fe4851b 24 CANMessage createCellVoltageMAXMIN(pack_voltage_extremes max_voltage, pack_voltage_extremes min_voltage);
lcockerton62 0:0a5f554d2a16 25
lcockerton62 1:51477fe4851b 26 CANMessage createCellTemperatureMAXMIN(pack_temperature_extremes min_temperature, pack_temperature_extremes max_temperature);
lcockerton62 0:0a5f554d2a16 27
lcockerton62 0:0a5f554d2a16 28 CANMessage createBatteryVI(uint32_t batteryVoltage,uint32_t batteryCurrent);
lcockerton62 0:0a5f554d2a16 29
lcockerton62 0:0a5f554d2a16 30 CANMessage createBatteryPackStatus(uint16_t voltageThreshold[], uint8_t statusFlag,uint8_t BMS_CMU_Count,uint16_t BMS_Firmware_Build);
lcockerton62 0:0a5f554d2a16 31
lcockerton62 1:51477fe4851b 32 CANMessage createExtendedBatteryPackStatus(uint32_t status);
lcockerton62 0:0a5f554d2a16 33
lcockerton62 0:0a5f554d2a16 34
lcockerton62 0:0a5f554d2a16 35 union float2byte {
lcockerton62 1:51477fe4851b 36 float f;
lcockerton62 1:51477fe4851b 37 char b[sizeof(float)];
lcockerton62 0:0a5f554d2a16 38 };
lcockerton62 0:0a5f554d2a16 39
lcockerton62 0:0a5f554d2a16 40 #endif