forked from collin80/GEVCU6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparamcache.h
46 lines (44 loc) · 1023 Bytes
/
paramcache.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef PARAMCACHE_H_
#define PARAMCACHE_H_
/**
* Cache of param values to avoid sending an update unless changed
*/
struct ParamCache {
uint32_t timeRunning;
int16_t torqueRequested;
int16_t torqueActual;
int16_t throttle;
int16_t brake;
bool brakeNotAvailable;
int16_t speedRequested;
int16_t speedActual;
MotorController::PowerMode powerMode;
MotorController::Gears gear;
int16_t dcVoltage;
int16_t dcCurrent;
int16_t acCurrent;
int16_t nominalVolt;
int16_t kiloWattHours;
uint32_t bitfield1;
uint32_t bitfield2;
uint32_t bitfield3;
uint32_t bitfield4;
bool running;
bool faulted;
bool warning;
int16_t tempMotor;
int16_t tempInverter;
int16_t tempSystem;
int16_t mechPower;
int16_t prechargeR;
int8_t prechargeRelay;
int8_t mainContactorRelay;
int8_t coolFan;
int8_t coolOn;
int8_t coolOff;
int8_t brakeLight;
int8_t revLight;
int8_t enableIn;
int8_t reverseIn;
};
#endif