-
Notifications
You must be signed in to change notification settings - Fork 1
/
RobotMap.h
97 lines (79 loc) · 2.68 KB
/
RobotMap.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// RobotBuilder Version: 0.0.2
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// C++ from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in th future.
#ifndef ROBOTMAP_H
#define ROBOTMAP_H
#include "WPILib.h"
//Do not commit it defined, for testbot only
//#define TESTERBOT 1
/**
* The RobotMap is a mapping from the ports sensors and actuators are wired into
* to a variable name. This provides flexibility changing wiring, makes checking
* the wiring easier and significantly reduces the number of magic numbers
* floating around.
*/
#define MODULE1NUM 1
// Jaguars Talons and Motors
#define CHASSISLEFTMOTORPWM 2
#define CHASSISRIGHTMOTORPWM 3
//Catapult
#define CATAPULT_MOTOR_1_PWM 5
#define CATAPULT_MOTOR_2_PWM 6
#define CATAPULT_MOTOR_3_PWM 7
#define CATAPULT_SENSOR_IO 14
#define CATAPULT_SENSOR2_IO 15
#define SHOOT_FOR_THE_GOAL_POWER 1.00
// this is a value for shooting from about 0 to 1 foot from the fender
#define SHOOT_FOR_THE_GOAL_DURATION .212
#define SHOOT_CLOSE_COMMAND_POWER 1.00
#define SHOOT_CLOSE_COMMAND_DURATION .188
#define SHOOT_WITH_DIAL_POWER 1.00
#define SHOOT_WITH_DIAL_DURATION 0
#define CATAPULT_RESET_POWER 0.15
#define SHOOT_OVER_THE_TRUSS_POWER 1.00 //0.90
// rely on the value from the dial on the driver station
#define SHOOT_OVER_THE_TRUSS_DURATION 0.204
//Vision
#define VISION_COLLECT_IMAGES_OFF 11
#define VISION_COLLECT_IMAGES_ON 10
extern int vision_mode;
//Solenoids
#define PUMPSPIKESOLENOID 1
#define UPSOLENOID 1
#define DOWNSOLENOID 2
//Encoders
#define CHASSIS_ENCODER_RIGHT_PORT_1 2
#define CHASSIS_ENCODER_RIGHT_PORT_2 3
#define CHASSIS_ENCODER_LEFT_PORT_1 11
#define CHASSIS_ENCODER_LEFT_PORT_2 12
// THis value was measured by driving the robot for 100".
#define ENCODER_PULSE_PER_INCH 15.58
//Analog
#define CHASSISGYROANALOG 1
//Digital
#define PUMPSWITCHDIGITAL 1
//Abstract
#define TESTINGSPEED 0.3
//Intake Solenoid
#define INTAKE_SOLENOID1_RIGHT_PORT 4
#define INTAKE_SOLENOID1_LEFT_PORT 5
//Intake Jaguar
#define INTAKE_TALON_PWM 8
#ifdef TESTERBOT
#define TURNANGLETOLERENCE 0.001
#define TURNANGLEDELTA 0.005
#define TURNANGLEZONE 0.14
#define COMPENSATION 1.0
#else
#define TURNANGLETOLERENCE 0.001
#define TURNANGLEDELTA 0.01
#define TURNANGLEZONE 0.08
#define COMPENSATION 1.05
#endif
#endif