Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 1 | package y2014_bot3.control_loops; |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 2 | |
| 3 | import "aos/common/controls/control_loops.q"; |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 4 | import "frc971/control_loops/control_loops.q"; |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 5 | |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 6 | queue_group RollersQueue { |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 7 | 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 Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 41 | queue_group RollersQueue rollers_queue; |