blob: 0da9c96f71587bc9a0413ae4d41d633467b7a906 [file] [log] [blame]
Brian Silverman431500a2013-10-28 19:50:15 -07001#ifndef FRC971_CONSTANTS_H_
2#define FRC971_CONSTANTS_H_
Brian Silverman2c590c32013-11-04 18:08:54 -08003
brians343bc112013-02-10 01:53:46 +00004namespace frc971 {
5namespace constants {
6
Brian Silvermanb691f5e2015-08-02 11:37:55 -07007struct ZeroingConstants {
8 // The number of samples in the moving average filter.
9 int average_filter_size;
10 // The difference in scaled units between two index pulses.
11 double index_difference;
12 // The absolute position in scaled units of one of the index pulses.
13 double measured_index_position;
14 // Value between 0 and 1 which determines a fraction of the index_diff
15 // you want to use.
16 double allowable_encoder_error;
Brian Silverman431500a2013-10-28 19:50:15 -070017};
18
Tyler Chatow61f77972017-02-04 17:41:14 -080019struct EncoderPlusIndexZeroingConstants {
20 // The amount of index pulses in the limb's range of motion.
21 int num_index_pulses;
22};
23
24struct PotAndAbsoluteEncoderZeroingConstants {
25 // The distance that the absolute encoder needs to complete a full rotation.
26 double abs_duration;
27 // Sample mechanism angle and absolute encoder value.
28 double sample_abs_value;
29 double sample_degrees;
30};
31
Brian Silvermanebca77a2016-02-14 22:14:00 -050032// Defines a range of motion for a subsystem.
33// These are all absolute positions in scaled units.
34struct Range {
35 double lower_hard;
36 double upper_hard;
37 double lower;
38 double upper;
39};
40
brians343bc112013-02-10 01:53:46 +000041} // namespace constants
42} // namespace frc971
Brian Silverman431500a2013-10-28 19:50:15 -070043
44#endif // FRC971_CONSTANTS_H_