Cell voltages fork (SoC)
Dependencies: CUER_CAN CUER_DS1820 LTC2943 LTC6804 mbed PowerControl
CANParserBMU.h@66:c884fba9eaea, 2017-09-16 (annotated)
- Committer:
- DasSidG
- Date:
- Sat Sep 16 01:10:01 2017 +0000
- Revision:
- 66:c884fba9eaea
- Parent:
- 48:5c3f42c44036
Added more flags to the BMU status; Removed some unused functions, re-ordered some functions slightly; Tidied up some bits that were generating warnings
Who changed what in which revision?
User | Revision | Line number | New 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 | |
maxv008 | 14:e0e88a009f4c | 8 | CANMessage createTemperatureTelemetry(uint8_t offset, char * ROMID, float Temperature); |
maxv008 | 13:7b42af989cd1 | 9 | |
ItsJustZi | 29:44924d2b1293 | 10 | individual_temperature decodeTemperatureTelemetry(CANMessage msg); //working |
lcockerton62 | 0:0a5f554d2a16 | 11 | |
ItsJustZi | 29:44924d2b1293 | 12 | CANMessage createVoltageTelemetry(int ID, uint16_t voltage[]); //working |
lcockerton62 | 0:0a5f554d2a16 | 13 | |
ItsJustZi | 29:44924d2b1293 | 14 | bool decodeVoltageTelemetry(CANMessage msg, CMU_voltage readings[NO_CMUS]); //working |
maxv008 | 18:521ffdd724f3 | 15 | |
ItsJustZi | 29:44924d2b1293 | 16 | CANMessage createPackSOC(float SOC, float percentageCharge); //working |
lcockerton62 | 0:0a5f554d2a16 | 17 | |
ItsJustZi | 29:44924d2b1293 | 18 | float decodePackSOC(CANMessage msg); //working |
maxv008 | 23:a1af4439c1fc | 19 | |
ItsJustZi | 29:44924d2b1293 | 20 | float decodePackSOCPercentage(CANMessage msg);//working |
maxv008 | 23:a1af4439c1fc | 21 | |
DasSidG | 66:c884fba9eaea | 22 | CANMessage createCellVoltageMAXMIN(pack_voltage_extremes max_voltage, pack_voltage_extremes min_voltage); |
lcockerton62 | 0:0a5f554d2a16 | 23 | |
DasSidG | 66:c884fba9eaea | 24 | void decodeCellVoltageMAXMIN(CANMessage msg, pack_voltage_extremes &min, pack_voltage_extremes &max); |
maxv008 | 23:a1af4439c1fc | 25 | |
DasSidG | 66:c884fba9eaea | 26 | CANMessage createCellTemperatureMAXMIN(pack_temperature_extremes ex_temperature, bool isMin); |
maxv008 | 23:a1af4439c1fc | 27 | |
DasSidG | 66:c884fba9eaea | 28 | pack_temperature_extremes decodeCellTemperatureMAXMIN(CANMessage msg); |
lcockerton62 | 0:0a5f554d2a16 | 29 | |
DasSidG | 66:c884fba9eaea | 30 | CANMessage createBatteryVI(uint32_t batteryVoltage,float batteryCurrent); |
maxv008 | 31:888b2602aab2 | 31 | |
maxv008 | 31:888b2602aab2 | 32 | uint32_t decodeBatteryVoltage(CANMessage msg); //Works |
maxv008 | 31:888b2602aab2 | 33 | |
maxv008 | 31:888b2602aab2 | 34 | float decodeBatteryCurrent(CANMessage msg); //Works |
lcockerton62 | 0:0a5f554d2a16 | 35 | |
DasSidG | 66:c884fba9eaea | 36 | CANMessage createBatteryPower(uint32_t batteryVoltage, float batteryCurrent); |
DasSidG | 66:c884fba9eaea | 37 | |
maxv008 | 45:c288d7cbdb4a | 38 | CANMessage createIVTACurrent(int32_t current); |
maxv008 | 45:c288d7cbdb4a | 39 | |
maxv008 | 45:c288d7cbdb4a | 40 | int32_t decodeIVTACurrent(CANMessage msg); |
maxv008 | 45:c288d7cbdb4a | 41 | |
DasSidG | 66:c884fba9eaea | 42 | CANMessage createBatteryPackStatus(uint32_t status); |
lcockerton62 | 0:0a5f554d2a16 | 43 | |
DasSidG | 66:c884fba9eaea | 44 | uint32_t decodeBatteryPackStatus(CANMessage msg); |
maxv008 | 23:a1af4439c1fc | 45 | |
maxv008 | 31:888b2602aab2 | 46 | CANMessage createBMSHeartbeat(uint32_t val1, uint32_t val2); |
maxv008 | 31:888b2602aab2 | 47 | |
maxv008 | 48:5c3f42c44036 | 48 | CANMessage createEEPROMReset(float init_SOC, float init_SOC_Percent); |
maxv008 | 48:5c3f42c44036 | 49 | |
maxv008 | 48:5c3f42c44036 | 50 | float decodeEEPROMSOC(CANMessage msg); |
maxv008 | 48:5c3f42c44036 | 51 | |
maxv008 | 48:5c3f42c44036 | 52 | float decodeEEPROMSOCPercentage(CANMessage msg); |
maxv008 | 48:5c3f42c44036 | 53 | |
lcockerton62 | 0:0a5f554d2a16 | 54 | |
lcockerton62 | 0:0a5f554d2a16 | 55 | union float2byte { |
lcockerton62 | 1:51477fe4851b | 56 | float f; |
lcockerton62 | 1:51477fe4851b | 57 | char b[sizeof(float)]; |
lcockerton62 | 0:0a5f554d2a16 | 58 | }; |
lcockerton62 | 0:0a5f554d2a16 | 59 | |
lcockerton62 | 0:0a5f554d2a16 | 60 | #endif |