blob: 58fd69e4c1f4c3b54c56baa5417db928ade05198 [file] [log] [blame]
Parker Schuh18dbbb42017-10-18 21:45:33 -07001package frc971.codelab;
2
John Park33858a32018-09-28 23:05:48 -07003import "aos/controls/control_loops.q";
Parker Schuh18dbbb42017-10-18 21:45:33 -07004import "frc971/control_loops/control_loops.q";
5
6// The theme of this basic test is a simple intake system.
7//
8// The system will have a motor driven by the voltage returned
9// by output, and then eventually this motor, when run enough,
10// will trigger the limit_sensor. The hypothetical motor should shut
11// off in that hypothetical situation to avoid hypothetical burnout.
12queue_group BasicQueue {
13 implements aos.control_loops.ControlLoop;
14
15 message Goal {
16 // The control loop needs to intake now.
17 bool intake;
18 };
19
20 message Position {
21 // This is a potential incoming sensor value letting us know
22 // if we need to be intaking.
23 bool limit_sensor;
24 };
25
26 message Status {
27 // Lets consumers of basic_queue.status know if
28 // the requested intake is finished.
29 bool intake_complete;
30 };
31
32 message Output {
33 // This would be set up to drive a hypothetical motor that would
34 // hope to intake something.
35 double intake_voltage;
36 };
37
38 queue Goal goal;
39 queue Position position;
40 queue Output output;
41 queue Status status;
42};
43
44queue_group BasicQueue basic_queue;