brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 1 | #include <stdint.h> |
| 2 | |
James Kuszmaul | 4a4622b | 2013-03-02 16:28:29 -0800 | [diff] [blame] | 3 | #include <array> |
| 4 | |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 5 | namespace frc971 { |
| 6 | namespace constants { |
| 7 | |
| 8 | // Has all of the numbers that change for both robots and makes it easy to |
| 9 | // retrieve the values for the current one. |
| 10 | // |
| 11 | // All of the public functions to retrieve various values take a pointer to |
| 12 | // store their output value into and assume that aos::robot_state->get() is |
| 13 | // not null and is correct. They return true on success. |
| 14 | |
| 15 | const uint16_t kCompTeamNumber = 971; |
| 16 | const uint16_t kPracticeTeamNumber = 5971; |
| 17 | |
Austin Schuh | fa03369 | 2013-02-24 01:00:55 -0800 | [diff] [blame] | 18 | // Sets *angle to how many radians from horizontal to the location of interest. |
James Kuszmaul | e06e251 | 2013-03-02 15:04:53 -0800 | [diff] [blame] | 19 | bool wrist_hall_effect_start_angle(double *angle); |
| 20 | bool wrist_hall_effect_stop_angle(double *angle); |
Austin Schuh | fa03369 | 2013-02-24 01:00:55 -0800 | [diff] [blame] | 21 | // These are the soft stops for up and down. |
James Kuszmaul | e06e251 | 2013-03-02 15:04:53 -0800 | [diff] [blame] | 22 | bool wrist_lower_limit(double *angle); |
| 23 | bool wrist_upper_limit(double *angle); |
Austin Schuh | fa03369 | 2013-02-24 01:00:55 -0800 | [diff] [blame] | 24 | // These are the hard stops. Don't use these for anything but testing. |
James Kuszmaul | e06e251 | 2013-03-02 15:04:53 -0800 | [diff] [blame] | 25 | bool wrist_lower_physical_limit(double *angle); |
| 26 | bool wrist_upper_physical_limit(double *angle); |
Austin Schuh | fa03369 | 2013-02-24 01:00:55 -0800 | [diff] [blame] | 27 | |
| 28 | // Returns the speed to move the wrist at when zeroing in rad/sec |
James Kuszmaul | e06e251 | 2013-03-02 15:04:53 -0800 | [diff] [blame] | 29 | bool wrist_zeroing_speed(double *speed); |
James Kuszmaul | 16bcb5f | 2013-03-03 14:50:07 -0800 | [diff] [blame^] | 30 | bool angle_adjust_hall_effect_start_angle( |
James Kuszmaul | 4a4622b | 2013-03-02 16:28:29 -0800 | [diff] [blame] | 31 | ::std::array<double, 2> *angle); |
James Kuszmaul | 16bcb5f | 2013-03-03 14:50:07 -0800 | [diff] [blame^] | 32 | bool angle_adjust_hall_effect_stop_angle( |
James Kuszmaul | 4a4622b | 2013-03-02 16:28:29 -0800 | [diff] [blame] | 33 | ::std::array<double, 2> *angle); |
| 34 | // These are the soft stops for up and down. |
James Kuszmaul | 16bcb5f | 2013-03-03 14:50:07 -0800 | [diff] [blame^] | 35 | bool angle_adjust_lower_limit(double *angle); |
| 36 | bool angle_adjust_upper_limit(double *angle); |
James Kuszmaul | 4a4622b | 2013-03-02 16:28:29 -0800 | [diff] [blame] | 37 | // These are the hard stops. Don't use these for anything but testing. |
James Kuszmaul | 16bcb5f | 2013-03-03 14:50:07 -0800 | [diff] [blame^] | 38 | bool angle_adjust_lower_physical_limit(double *angle); |
| 39 | bool angle_adjust_upper_physical_limit(double *angle); |
James Kuszmaul | 4a4622b | 2013-03-02 16:28:29 -0800 | [diff] [blame] | 40 | |
| 41 | // Returns speed to move the angle adjust when zeroing, in rad/sec |
James Kuszmaul | 16bcb5f | 2013-03-03 14:50:07 -0800 | [diff] [blame^] | 42 | bool angle_adjust_zeroing_speed(double *speed); |
Austin Schuh | fa03369 | 2013-02-24 01:00:55 -0800 | [diff] [blame] | 43 | |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 44 | // Sets *center to how many pixels off center the vertical line |
| 45 | // on the camera view is. |
| 46 | bool camera_center(int *center); |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 47 | |
| 48 | } // namespace constants |
| 49 | } // namespace frc971 |