Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Systems
External
BMS.h
Go to the documentation of this file.
1
#ifndef RENNSSELAERMOTORSPORT_BMS_H
2
#define RENNSSELAERMOTORSPORT_BMS_H
3
4
#include <stdint.h>
5
6
#include "../ExternalSystem.h"
7
#include "../Inc/Systems/Comms/Can/DBCParser.h"
8
9
typedef
enum
{
10
DISCHARGING
,
11
CHARGING
,
12
IDLE
,
13
}
BmsChargeStatus
;
14
15
typedef
struct
{
16
ExternalSystem
extSystem
;
17
18
// Bms Data
19
float
packVoltage
;
20
float
packCurrent
;
21
float
stateOfCharge
;
22
float
cellVoltageMin
;
23
float
cellVoltageMax
;
24
float
cellTemperatureMin
;
25
float
cellTemperatureMax
;
26
float
totalPackCapacity
;
27
float
remainingPackCapacity
;
28
float
packHealth
;
29
BmsChargeStatus
chargeStatus
;
30
}
Bms
;
31
39
void
initBms
(
Bms
* bms,
int
hz,
const
char
* dbcFn);
40
47
//BmsData transferFunctionBms(float* rawdata);
48
54
void
updateBms
(
void
* bms);
55
63
void
updateBmsTest
(
void
* bms,
const
char
* canDataFn);
64
65
#endif
// RENNSSELAERMOTORSPORT_BMS_H
updateBmsTest
void updateBmsTest(void *bms, const char *canDataFn)
Updates the BMS data.
Definition:
BMS.c:96
BmsChargeStatus
BmsChargeStatus
Definition:
BMS.h:9
CHARGING
@ CHARGING
Definition:
BMS.h:11
DISCHARGING
@ DISCHARGING
Definition:
BMS.h:10
IDLE
@ IDLE
Definition:
BMS.h:12
updateBms
void updateBms(void *bms)
Transfers raw BMS data to a BmsData structure.
Definition:
BMS.c:83
initBms
void initBms(Bms *bms, int hz, const char *dbcFn)
Initializes the BMS with the given frequency.
Definition:
BMS.c:7
Bms
Definition:
BMS.h:15
Bms::cellVoltageMin
float cellVoltageMin
Definition:
BMS.h:22
Bms::stateOfCharge
float stateOfCharge
Definition:
BMS.h:21
Bms::cellVoltageMax
float cellVoltageMax
Definition:
BMS.h:23
Bms::cellTemperatureMax
float cellTemperatureMax
Definition:
BMS.h:25
Bms::packVoltage
float packVoltage
Definition:
BMS.h:19
Bms::extSystem
ExternalSystem extSystem
Definition:
BMS.h:16
Bms::chargeStatus
BmsChargeStatus chargeStatus
Definition:
BMS.h:29
Bms::totalPackCapacity
float totalPackCapacity
Definition:
BMS.h:26
Bms::cellTemperatureMin
float cellTemperatureMin
Definition:
BMS.h:24
Bms::remainingPackCapacity
float remainingPackCapacity
Definition:
BMS.h:27
Bms::packHealth
float packHealth
Definition:
BMS.h:28
Bms::packCurrent
float packCurrent
Definition:
BMS.h:20
ExternalSystem
Definition:
ExternalSystem.h:17
Generated by
1.9.5