PER Firmware
Loading...
Searching...
No Matches
config.h
1
8// ! IS_FRONT_DRIVELINE and IS_REAR_DRIVELINE is defined by the CMake, do not define it manually here
9
10// Check to prevent both being defined at the same time
11#if defined(IS_FRONT_DRIVELINE) && defined(IS_REAR_DRIVELINE)
12#error "IS_FRONT_DRIVELINE and IS_REAR_DRIVELINE cannot both be defined"
13#endif
14
15// Check to prevent neither being defined
16#if !defined(IS_FRONT_DRIVELINE) && !defined(IS_REAR_DRIVELINE)
17#error "Either IS_FRONT_DRIVELINE or IS_REAR_DRIVELINE must be defined"
18#endif
19
20#ifdef IS_FRONT_DRIVELINE
21#define SEND_SHOCKPOTS CAN_SEND_front_shockpots
22// Shock Pot Calibration
23#define POT_TOTAL_RES 3000
24#define POT_MAX_RES 3300
25#define POT_MIN_RES 300
26static constexpr float POT_VOLT_MAX_L = 11.0f;
27static constexpr float POT_VOLT_MIN_L = 4060.0f;
28static constexpr float POT_VOLT_MAX_R = 11.0f;
29static constexpr float POT_VOLT_MIN_R = 4092.0f;
30#define POT_MAX_DIST 75
31#define POT_DIST_DROOP_L 56
32#define POT_DIST_DROOP_R 55
33
34// others here
35#endif
36
37#ifdef IS_REAR_DRIVELINE
38#define SEND_SHOCKPOTS CAN_SEND_rear_shockpots
39// Shock Pot Calibration
40#define POT_TOTAL_RES 3000
41#define POT_MAX_RES 3300
42#define POT_MIN_RES 300
43static constexpr float POT_VOLT_MAX_L = 11.0f;
44static constexpr float POT_VOLT_MIN_L = 4060.0f;
45static constexpr float POT_VOLT_MAX_R = 11.0f;
46static constexpr float POT_VOLT_MIN_R = 4092.0f;
47#define POT_MAX_DIST 75
48#define POT_DIST_DROOP_L 56
49#define POT_DIST_DROOP_R 55
50
51// others here
52#endif