blob: f218a419fa250a5d27ee1f783b917098f10940ba [file] [log] [blame]
Comran Morshed41ed7c22015-11-04 21:03:37 +00001package y2014_bot3.control_loops;
Comran Morshede9b12922015-11-04 19:46:48 +00002
3import "aos/common/controls/control_loops.q";
Comran Morshed41ed7c22015-11-04 21:03:37 +00004import "frc971/control_loops/control_loops.q";
Comran Morshede9b12922015-11-04 19:46:48 +00005
Comran Morshed41ed7c22015-11-04 21:03:37 +00006queue_group RollersQueue {
Comran Morshede9b12922015-11-04 19:46:48 +00007 implements aos.control_loops.ControlLoop;
8
9 message Goal {
10 // -1 = back intake, 1 = front intake, all else = stationary.
11 int16_t intake;
12 // -1 = backwards, 1 = forwards, all else = stationary.
13 int16_t low_spit;
14 // Whether we want the human player load function.
15 bool human_player;
16 };
17
18 message Position {};
19
20 message Output {
21 // Positive voltage = intaking, Negative = spitting.
22 double front_intake_voltage;
23 double back_intake_voltage;
24 // Voltage for the low goal rollers.
25 // Positive voltage = ball towards back, Negative = ball towards front.
26 double low_goal_voltage;
27
28 // Whether the front and back intake pistons are extended.
29 bool front_extended;
30 bool back_extended;
31 };
32
33 message Status {};
34
35 queue Goal goal;
36 queue Position position;
37 queue Output output;
38 queue Status status;
39};
40
Comran Morshed41ed7c22015-11-04 21:03:37 +000041queue_group RollersQueue rollers_queue;