Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Accumulator.c
Go to the documentation of this file.
1#include "../../../Inc/Systems/External/Accumulator.h"
2
3void initAccumulator(Accumulator* acc, Bms* bms) {
4 if (acc != NULL) {
5 acc->bms = bms;
6 acc->state = standby; // Default state
7 }
8}
9
11 if (acc != NULL) {
12 acc->state = state;
13 }
14}
15
17 if (acc != NULL) {
18 return acc->state;
19 }
20 return standby; // Default if not initialized
21}
void initAccumulator(Accumulator *acc, Bms *bms)
Initializes the accumulator with the given BMS and IMD.
Definition: Accumulator.c:3
CHARGE_STATE getAccumulatorState(const Accumulator *acc)
Gets the current state of the accumulator.
Definition: Accumulator.c:16
void setAccumulatorState(Accumulator *acc, CHARGE_STATE state)
Sets the state of the accumulator.
Definition: Accumulator.c:10
CHARGE_STATE
Definition: Accumulator.h:7
@ standby
Definition: Accumulator.h:10
CHARGE_STATE state
Definition: Accumulator.h:15
Definition: BMS.h:15