Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CUER_CAN DS1820 LTC2943 LTC6804 mbed
Fork of BMS_BMUCore_Max by
Diff: CANParserBMU.h
- Revision:
- 0:0a5f554d2a16
- Child:
- 1:51477fe4851b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CANParserBMU.h Thu Dec 22 15:11:29 2016 +0000
@@ -0,0 +1,39 @@
+#include "CAN_Data.h"
+#include "CAN_IDs.h"
+
+#ifndef CANParserBMU_H
+#define CANParserBMU_H
+
+//@TODO Move these definitions elsewhere ideally into CAN_IDS.h
+#define BATTERY_SOC_BASE_ID 0xF5
+#define MAX_MIN_VOLTAGE 0xF8
+#define BLANK_DATA 0x00
+#define MAX_MIN_TEMPERATURE 0xF9
+#define BATTERY_PACK_STATUS_ID 0xFA
+
+//@TODO add some comments
+CANMessage createTemperatureTelemetry(int ID, uint32_t CMUSerialNumber, uint16_t PCBTemperature, uint16_t cellTemperature);
+
+CANMessage createVoltageTelemetry(int ID, uint16_t voltage[]);
+
+CANMessage createPackSOC(float SOC, float percentageCharge);
+
+CANMessage createPackBalanceSOC(float SOC, float percentageCharge);
+
+CANMessage createCellVoltageMAXMIN(uint16_t MAXMINVoltage[], uint8_t cellVoltageInformation[]);
+
+CANMessage createCellTemperatureMAXMIN(uint16_t MAXMINTemperature[], uint8_t cellTemperatureInformation[]);
+
+CANMessage createBatteryVI(uint32_t batteryVoltage,uint32_t batteryCurrent);
+
+CANMessage createBatteryPackStatus(uint16_t voltageThreshold[], uint8_t statusFlag,uint8_t BMS_CMU_Count,uint16_t BMS_Firmware_Build);
+
+CANMessage createExtendedBatteryPackStatus(uint32_t status[]);
+
+
+union float2byte {
+ float f;
+ char b[sizeof(float)];
+};
+
+#endif
\ No newline at end of file
