Brian Silverman | 431500a | 2013-10-28 19:50:15 -0700 | [diff] [blame^] | 1 | #ifndef FRC971_CONSTANTS_H_ |
| 2 | #define FRC971_CONSTANTS_H_ |
| 3 | |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 4 | #include <stdint.h> |
| 5 | |
| 6 | namespace frc971 { |
| 7 | namespace 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. |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 11 | |
Brian Silverman | 63783c4 | 2013-09-28 21:57:41 -0700 | [diff] [blame] | 12 | const uint16_t kCompTeamNumber = 5971; |
| 13 | const uint16_t kPracticeTeamNumber = 971; |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 14 | |
Brian Silverman | 431500a | 2013-10-28 19:50:15 -0700 | [diff] [blame^] | 15 | // This structure contains current values for all of the things that change. |
| 16 | struct 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 Schuh | fa03369 | 2013-02-24 01:00:55 -0800 | [diff] [blame] | 21 | |
Brian Silverman | 431500a | 2013-10-28 19:50:15 -0700 | [diff] [blame^] | 22 | // 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 Schuh | dd3bc41 | 2013-03-16 17:02:40 -0700 | [diff] [blame] | 26 | |
Brian Silverman | 431500a | 2013-10-28 19:50:15 -0700 | [diff] [blame^] | 27 | // Physical limits. These are here for testing. |
| 28 | double wrist_upper_physical_limit; |
| 29 | double wrist_lower_physical_limit; |
James Kuszmaul | 4a4622b | 2013-03-02 16:28:29 -0800 | [diff] [blame] | 30 | |
Brian Silverman | 431500a | 2013-10-28 19:50:15 -0700 | [diff] [blame^] | 31 | // 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 Schuh | fa03369 | 2013-02-24 01:00:55 -0800 | [diff] [blame] | 36 | |
Brian Silverman | 431500a | 2013-10-28 19:50:15 -0700 | [diff] [blame^] | 37 | // 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 Silverman | 3cb1d80 | 2013-08-30 15:41:49 -0700 | [diff] [blame] | 41 | |
Brian Silverman | 431500a | 2013-10-28 19:50:15 -0700 | [diff] [blame^] | 42 | // 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 Silverman | 656789c | 2013-09-21 23:53:35 -0700 | [diff] [blame] | 48 | |
Brian Silverman | 431500a | 2013-10-28 19:50:15 -0700 | [diff] [blame^] | 49 | // 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. |
| 66 | const Values &GetValues(); |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 67 | |
| 68 | } // namespace constants |
| 69 | } // namespace frc971 |
Brian Silverman | 431500a | 2013-10-28 19:50:15 -0700 | [diff] [blame^] | 70 | |
| 71 | #endif // FRC971_CONSTANTS_H_ |