blob: 8852fd37efbf22dba77824b08682ce06af9c5963 [file] [log] [blame]
Austin Schuh3bb9a442014-02-02 16:01:45 -08001package frc971.control_loops;
2
3import "aos/common/control_loop/control_loops.q";
4
5// All angles here are 0 horizontal, positive up.
6queue_group ClawLoop {
7 implements aos.control_loops.ControlLoop;
8
9 message Goal {
10 // The angle of the bottom wrist.
11 double bottom_angle;
12 // How much higher the top wrist is.
13 double seperation_angle;
14 bool intake;
15 };
16 message Position {
17 double top_position;
18
19 bool top_front_hall_effect;
20 int32_t top_front_hall_effect_posedge_count;
21 int32_t top_front_hall_effect_negedge_count;
22 bool top_calibration_hall_effect;
23 int32_t top_calibration_hall_effect_posedge_count;
24 int32_t top_calibration_hall_effect_negedge_count;
25 bool top_back_hall_effect;
26 int32_t top_back_hall_effect_posedge_count;
27 int32_t top_back_hall_effect_negedge_count;
28 double top_posedge_value;
29 double top_negedge_value;
30
31 double bottom_position;
32 bool bottom_front_hall_effect;
33 int32_t bottom_front_hall_effect_posedge_count;
34 int32_t bottom_front_hall_effect_negedge_count;
35 bool bottom_calibration_hall_effect;
36 int32_t bottom_calibration_hall_effect_posedge_count;
37 int32_t bottom_calibration_hall_effect_negedge_count;
38 bool bottom_back_hall_effect;
39 int32_t bottom_back_hall_effect_posedge_count;
40 int32_t bottom_back_hall_effect_negedge_count;
41 double bottom_posedge_value;
42 double bottom_negedge_value;
43 };
44
45 message Output {
46 double intake_voltage;
47 double top_claw_voltage;
48 double bottom_claw_voltage;
49 };
50
51 queue Goal goal;
52 queue Position position;
53 queue Output output;
54 queue aos.control_loops.Status status;
55};
56
57queue_group ClawLoop claw;