-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathcontrols.h
49 lines (42 loc) · 1.49 KB
/
controls.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
47
48
49
#ifndef CONTROLLER_H_INCLUDED
#define CONTROLLER_H_INCLUDED
//Buttons
const static uint8_t BUTTON_A = 1;
const static uint8_t BUTTON_B = 2;
const static uint8_t BUTTON_X = 3;
const static uint8_t BUTTON_Y = 4;
const static uint8_t BUTTON_LB = 5;
const static uint8_t BUTTON_RB = 6;
const static uint8_t BUTTON_BAK = 7;
const static uint8_t BUTTON_SRT = 8;
const static uint8_t BUTTON_LCLK = 9;
const static uint8_t BUTTON_RCLK = 10;
//Axes
const static uint8_t AXIS_L_X = 1;
const static uint8_t AXIS_L_Y = 2;
const static uint8_t AXIS_TRIGGERS = 3;
const static uint8_t AXIS_R_X = 4;
const static uint8_t AXIS_R_Y = 5;
const static uint8_t DPAD_X = 6;
//Trigger State
enum trigStates {TRIG_L, TRIG_R, TRIG_NONE};
//Driving
const static uint8_t LEFT_DRIVE = AXIS_L_Y;
const static uint8_t RIGHT_DRIVE = AXIS_R_Y;
//Shifting
const static uint8_t SHIFT_LOW = BUTTON_LB;
const static uint8_t SHIFT_HIGH = BUTTON_RB;
//Manual shooter controls
const static uint8_t TILT = AXIS_L_Y;
const static uint8_t CLAMP = BUTTON_A;
const static uint8_t ROLLERS = AXIS_R_Y;
const static uint8_t ENERGIZE = BUTTON_B;
const static uint8_t FIRE = BUTTON_X; // release clamp, wait, disengage clutch
//Angle presets
const static uint8_t AUTO_HIGHGOAL = BUTTON_RB;
const static uint8_t AUTO_VERTICAL = BUTTON_LB;
const static trigStates AUTO_LOWGOAL = TRIG_L;
const static trigStates AUTO_PICKUP = TRIG_R;
//pickup preset
const static uint8_t PICKUP = BUTTON_SRT;
#endif