Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | include "frc971/control_loops/control_loops.fbs"; |
| 2 | |
| 3 | namespace y2018.control_loops.superstructure; |
| 4 | |
| 5 | table IntakeElasticSensors { |
| 6 | // Position of the motor end of the series elastic in radians. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 7 | motor_position:frc971.PotAndAbsolutePosition (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 8 | |
| 9 | // Displacement of the spring in radians. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 10 | spring_angle:double (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 11 | |
| 12 | // False if the beam break sensor isn't triggered, true if the beam breaker is |
| 13 | // triggered. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 14 | beam_break:bool (id: 2); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | table ArmPosition { |
| 18 | // Values of the encoder and potentiometer at the base of the proximal |
| 19 | // (connected to drivebase) arm in radians. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 20 | proximal:frc971.PotAndAbsolutePosition (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 21 | |
| 22 | // Values of the encoder and potentiometer at the base of the distal |
| 23 | // (connected to proximal) arm in radians. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 24 | distal:frc971.PotAndAbsolutePosition (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | |
| 28 | table Position { |
| 29 | // Values of the series elastic encoders on the left side of the robot from |
| 30 | // the rear perspective in radians. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 31 | left_intake:IntakeElasticSensors (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 32 | |
| 33 | // Values of the series elastic encoders on the right side of the robot from |
| 34 | // the rear perspective in radians. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 35 | right_intake:IntakeElasticSensors (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 36 | |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 37 | arm:ArmPosition (id: 2); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 38 | |
| 39 | // Value of the beam breaker sensor. This value is true if the beam is |
| 40 | // broken, false if the beam isn't broken. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 41 | claw_beambreak_triggered:bool (id: 3); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 42 | // Value of the beambreak sensor detecting when the box has hit the frame |
| 43 | // cutout. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 44 | box_back_beambreak_triggered:bool (id: 4); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 45 | |
| 46 | // Distance to the box in meters. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 47 | box_distance:double (id: 5); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | root_type Position; |