blob: 860162e220fca74df524468915308cf83beb7f69 [file] [log] [blame]
Brian Silvermand4417aa2014-01-18 12:45:12 -08001package frc971.control_loops;
2
3import "aos/common/control_loop/control_looops.q";
4
5queue_group ShooterLoop {
6 implements aos.control_loops.ControlLoop;
7
8 message Goal {
Brian Silverman8c30bc12014-01-18 12:49:38 -08009 // The energy to load to in joules.
Brian Silvermand4417aa2014-01-18 12:45:12 -080010 double energy;
Brian Silverman8c30bc12014-01-18 12:49:38 -080011 // Shoots as soon as this is true.
12 bool shoot;
Brian Silvermand4417aa2014-01-18 12:45:12 -080013 };
14 message Position {
15 bool back_hall_effect;
Brian Silverman8c30bc12014-01-18 12:49:38 -080016 // In meters, out is positive.
17 double position;
18 double back_calibration;
Brian Silvermand4417aa2014-01-18 12:45:12 -080019 };
20 message Status {
Brian Silverman8c30bc12014-01-18 12:49:38 -080021 // Whether it's ready to shoot right now.
Brian Silvermand4417aa2014-01-18 12:45:12 -080022 bool ready;
Brian Silverman8c30bc12014-01-18 12:49:38 -080023 // Whether the plunger is in and out of the way of grabbing a ball.
24 bool cocked;
25 // How many times we've shot.
26 int shots;
Brian Silvermand4417aa2014-01-18 12:45:12 -080027 };
28
29 queue Goal goal;
30 queue Position position;
31 queue aos.control_loops.Output output;
32 queue Status status;
33};
34
35queue_group ShooterLoop shooter;