DeepSpace  2019
RobotMap.h
Go to the documentation of this file.
1 #ifndef _ROBOTMAP_HG_
2 #define _ROBOTMAP_HG_
3 
11 // Whenever possible, Macros and definitions are used in order to preserve memory
12 
13 #include <iostream>
14 
15 #define DODEBUG 0
16 
17 #define ROBOT_PERIOD 0.02
18 
19 // Current limiting (amps)
20 #define ARM_CURRENT_THRESHOLD 35
21 #define ARM_CURRENT_HOLD 33
22 #define ARM_PEAK_TIMEOUT 0
23 #define ARM_CURRENT_TIMEOUT 30
24 
25 // Camera mappings
26 #define CAMERASERVER_DRIVER_CAMERA 1
27 #define CAMERASERVER_VISION_CAMERA 0
28 
29 // DriveTrain motors
30 #define DRIVETRAIN_LEFT_FRONT_MOTOR 1
31 #define DRIVETRAIN_LEFT_REAR_MOTOR 2
32 #define DRIVETRAIN_RIGHT_FRONT_MOTOR 3
33 #define DRIVETRAIN_RIGHT_REAR_MOTOR 4
34 
35 #define TALLON_TPR 4096
36 
37 // Driving PID
38 #define ARCADE_KP 0.25
39 #define ARCADE_KI 0.0
40 #define ARCADE_KD 0.0
41 
42 #define SLEW_LIMIT 0.15
43 #define R_SLEW_LIMIT 0.04
44 
45 // DriveTrain motor invertions
46 #define DRIVETRAIN_LEFT_FRONT_MOTOR_INVERT false
47 #define DRIVETRAIN_LEFT_REAR_MOTOR_INVERT false
48 #define DRIVETRAIN_RIGHT_FRONT_MOTOR_INVERT true
49 #define DRIVETRAIN_RIGHT_REAR_MOTOR_INVERT true
50 
51 // DEADZONES
52 #define XBOX_DEADZONE_RIGHT_JOY 0.1
53 #define XBOX_DEADZONE_LEFT_JOY 0.1
54 
55 //Climb Motors
56 #define CLIMB_ARM_MOTOR 5
57 #define CLIMB_ARM_MOTOR_2 7
58 #define CLIMB_LEG_MOTOR 8
59 #define CRAWL_LEFT_MOTOR 1
60 #define CRAWL_RIGHT_MOTOR 0
61 
62 //Climb ultrasonic
63 #define CLIMB_ULTRASONIC 1
64 #define OPTICAL_PIN 7
65 #define DRIVETRAIN_RADIAL_SENSITIVITY_CUTOFF 0.8
66 
67 // Climb settings
68 #define CLIMB_M 0.6
69 #define CLIMB_B 0.3
70 
71 #define CLIMB_MAX_HEIGHT 100
72 
73 // Hall effects
74 #define LEG_PIN_TOP 1
75 #define LEG_PIN_MIDDLE 5
76 #define LEG_PIN_BOTTOM 6
77 #define ARM_PIN_LOWERED 4
78 
79 // Motor hold speeds
80 #define ARM_HOLD_SPEED 0.2
81 #define LEG_HOLD_SPEED 0.1
82 
83 // Slider
84 #define SLIDER_MOTOR 6
85 
86 // Piston
87 #define PCM_CAN_ID 11
88 
89 #define PISTON_ID 7
90 
91 // Light
92 #define LIGHT_ID 0
93 #define LEDCONTROLLER_ID 2
94 
95 // Hatch Gripper
96 #define HatchGripper_FORWARD_ID 1
97 #define HatchGripper_REVERSE_ID 2
98 
99 #define FLAP_ID_FORWARD 5
100 #define FLAP_ID_REVERSE 6
101 
102 // DriveWithJoystick Settings
103 #define DRIVEWITHJOYSTICK_ROTATION_LIMITER 0.95
104 
105 // Xbox controllers
106 #define XBOX_CONTROLLER_DRIVE_PORT 0
107 #define XBOX_CONTROLLER_OPERATOR_PORT 1
108 #define XBOX_CONTROLLER_DEBUG_PORT 2
109 
110 // Handy macros to save Python programmers from going crazy
111 #define False false
112 #define True true
113 #define elif else if
114 
115 // frc::GenericHID::JoystickHand is too long
116 #define Hand frc::GenericHID::JoystickHand
117 
118 // Reasons why I shouldn't be allowed to program
119 #define WinGame(_class_) frc::StartRobot<_class_>()
120 
121 #define Header(x) std::cout << x
122 #define EndHeader() std::cout << "DONE" << std::endl
123 
124 // #define Log(x) std::cout << x << std::endl;
125 
126 #endif // _ROBOTMAP_HG_