Tyler Chatow | 37ecdcd | 2019-01-26 20:18:42 -0800 | [diff] [blame] | 1 | #ifndef Y2019_CONSTANTS_H_ |
| 2 | #define Y2019_CONSTANTS_H_ |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | #include <math.h> |
| 6 | |
| 7 | #include "frc971/constants.h" |
| 8 | |
| 9 | namespace y2019 { |
| 10 | namespace constants { |
| 11 | |
| 12 | // Has all of our "constants", except the ones that come from other places. The |
| 13 | // ones which change between robots are put together with a workable way to |
| 14 | // retrieve the values for the current robot. |
| 15 | |
| 16 | // Everything is in SI units (volts, radians, meters, seconds, etc). |
| 17 | // Some of these values are related to the conversion between raw values |
| 18 | // (encoder counts, voltage, etc) to scaled units (radians, meters, etc). |
| 19 | // |
| 20 | // All ratios are from the encoder shaft to the output units. |
| 21 | |
| 22 | struct Values { |
| 23 | static const int kZeroingSampleSize = 200; |
| 24 | }; |
| 25 | |
| 26 | // Creates (once) a Values instance for ::aos::network::GetTeamNumber() and |
| 27 | // returns a reference to it. |
| 28 | const Values &GetValues(); |
| 29 | |
| 30 | // Creates Values instances for each team number it is called with and returns |
| 31 | // them. |
| 32 | const Values &GetValuesForTeam(uint16_t team_number); |
| 33 | |
| 34 | } // namespace constants |
| 35 | } // namespace y2019 |
| 36 | |
| 37 | #endif // Y2019_CONSTANTS_H_ |