MCU
Loading...
Searching...
No Matches
driver_constants.h
Go to the documentation of this file.
1#pragma once
2
3#include "drivers.h"
4
5#ifdef DRIVER
6 #if DRIVER == DEFAULT_DRIVER
7 #define BRAKE_ACTIVE 2200 // Threshold for brake pedal active
8
9 #define MIN_ACCELERATOR_PEDAL_1 1000 // Low accelerator implausibility threshold
10 #define START_ACCELERATOR_PEDAL_1 1370 // Position to start acceleration //1140 + pressure 1151
11 #define END_ACCELERATOR_PEDAL_1 2108 // Position to max out acceleration //1905
12 #define MAX_ACCELERATOR_PEDAL_1 2400 // High accelerator implausibility threshold
13
14 #define MIN_ACCELERATOR_PEDAL_2 500 // Low accelerator implausibility threshold
15 #define START_ACCELERATOR_PEDAL_2 680 // Position to start acceleration 560 + pressure 570
16 #define END_ACCELERATOR_PEDAL_2 1050 // Position to max out acceleration 948
17 #define MAX_ACCELERATOR_PEDAL_2 1250 // High accelerator implausibility threshold
18
19 #define MIN_BRAKE_PEDAL_1 1876 // Low brale implausibility threshold
20 #define START_BRAKE_PEDAL_1 2100 // Position to start brake // 2078 + pressure
21 #define END_BRAKE_PEDAL_1 2490 // Position to max out brake 2718 +-5
22 #define MAX_BRAKE_PEDAL_1 2950
23
24//brake 2 is negative slope
25 #define MIN_BRAKE_PEDAL_2 2300 // Low brake implausibility threshold
26 #define START_BRAKE_PEDAL_2 2010 // Position to start brake //2045 - pressure
27 #define END_BRAKE_PEDAL_2 1630 // Position to max out brake //1410 +- 5
28 #define MAX_BRAKE_PEDAL_2 1100
29
30 #define BRAKE_THRESHOLD_MECH_BRAKE_1 2350 // brake 1, mech brake threshold +-5
31 #define BRAKE_THRESHOLD_MECH_BRAKE_2 1766 // brake 2, mech brake threshold +-5
32 #else
33 #error "Bad driver definition"
34 #endif
35#else
36 #error "Driver required"
37#endif
38
39#define HALF_ACCELERATOR_PEDAL_1 ((START_ACCELERATOR_PEDAL_1 + END_ACCELERATOR_PEDAL_1)/2)
40#define HALF_ACCELERATOR_PEDAL_2 ((START_ACCELERATOR_PEDAL_2 + END_ACCELERATOR_PEDAL_2)/2)