blob: 0c9bfdd6f682e22428414c40d0d7f5c2f569617e [file] [log] [blame]
Brian Silverman431500a2013-10-28 19:50:15 -07001#ifndef FRC971_CONSTANTS_H_
2#define FRC971_CONSTANTS_H_
3
brians343bc112013-02-10 01:53:46 +00004#include <stdint.h>
5
6namespace frc971 {
7namespace constants {
8
9// Has all of the numbers that change for both robots and makes it easy to
10// retrieve the values for the current one.
brians343bc112013-02-10 01:53:46 +000011
Brian Silverman63783c42013-09-28 21:57:41 -070012const uint16_t kCompTeamNumber = 5971;
13const uint16_t kPracticeTeamNumber = 971;
brians343bc112013-02-10 01:53:46 +000014
Brian Silverman431500a2013-10-28 19:50:15 -070015// This structure contains current values for all of the things that change.
16struct Values {
17 // Wrist hall effect positive and negative edges.
18 // How many radians from horizontal to the location of interest.
19 double wrist_hall_effect_start_angle;
20 double wrist_hall_effect_stop_angle;
Austin Schuhfa033692013-02-24 01:00:55 -080021
Brian Silverman431500a2013-10-28 19:50:15 -070022 // Upper and lower extreme limits of travel for the wrist.
23 // These are the soft stops for up and down.
24 double wrist_upper_limit;
25 double wrist_lower_limit;
Austin Schuhdd3bc412013-03-16 17:02:40 -070026
Brian Silverman431500a2013-10-28 19:50:15 -070027 // Physical limits. These are here for testing.
28 double wrist_upper_physical_limit;
29 double wrist_lower_physical_limit;
James Kuszmaul4a4622b2013-03-02 16:28:29 -080030
Brian Silverman431500a2013-10-28 19:50:15 -070031 // Zeroing speed.
32 // The speed to move the wrist at when zeroing in rad/sec
33 double wrist_zeroing_speed;
34 // Zeroing off speed (in rad/sec).
35 double wrist_zeroing_off_speed;
Austin Schuhfa033692013-02-24 01:00:55 -080036
Brian Silverman431500a2013-10-28 19:50:15 -070037 // AngleAdjust hall effect positive and negative edges.
38 // These are the soft stops for up and down.
39 const double (&angle_adjust_hall_effect_start_angle)[2];
40 const double (&angle_adjust_hall_effect_stop_angle)[2];
Brian Silverman3cb1d802013-08-30 15:41:49 -070041
Brian Silverman431500a2013-10-28 19:50:15 -070042 // Upper and lower extreme limits of travel for the angle adjust.
43 double angle_adjust_upper_limit;
44 double angle_adjust_lower_limit;
45 // Physical limits. These are here for testing.
46 double angle_adjust_upper_physical_limit;
47 double angle_adjust_lower_physical_limit;
Brian Silverman656789c2013-09-21 23:53:35 -070048
Brian Silverman431500a2013-10-28 19:50:15 -070049 // The speed to move the angle adjust when zeroing, in rad/sec
50 double angle_adjust_zeroing_speed;
51 // Zeroing off speed.
52 double angle_adjust_zeroing_off_speed;
53
54 // Deadband voltage.
55 double angle_adjust_deadband;
56
57 // The number of teeth on the pinion that drives the drivetrain wheels.
58 int drivetrain_gearbox_pinion;
59
60 // How many pixels off center the vertical line
61 // on the camera view is.
62 int camera_center;
63};
64
65// Creates (once) a Values instance and returns a reference to it.
66const Values &GetValues();
brians343bc112013-02-10 01:53:46 +000067
68} // namespace constants
69} // namespace frc971
Brian Silverman431500a2013-10-28 19:50:15 -070070
71#endif // FRC971_CONSTANTS_H_