Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | namespace frc971.control_loops.drivetrain; |
| 2 | |
| 3 | table Position { |
| 4 | // Relative position of each drivetrain side (in meters). |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 5 | left_encoder:double (id: 0); |
| 6 | right_encoder:double (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 7 | |
| 8 | // The speed in m/s of each drivetrain side from the most recent encoder |
| 9 | // pulse, or 0 if there was no edge within the last 5ms. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 10 | left_speed:double (id: 2); |
| 11 | right_speed:double (id: 3); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 12 | |
| 13 | // Position of each drivetrain shifter, scaled from 0.0 to 1.0 where smaller |
| 14 | // is towards low gear. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 15 | left_shifter_position:double (id: 4); |
| 16 | right_shifter_position:double (id: 5); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 17 | |
| 18 | // Raw analog voltages of each shifter hall effect for logging purposes. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 19 | low_left_hall:double (id: 6); |
| 20 | high_left_hall:double (id: 7); |
| 21 | low_right_hall:double (id: 8); |
| 22 | high_right_hall:double (id: 9); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | root_type Position; |