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 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 3 | import "aos/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 | |
Austin Schuh | 30020d9 | 2019-05-27 13:07:02 -0700 | [diff] [blame] | 6 | // on ".y2014_bot3.control_loops.rollers_queue" |
Comran Morshed | 41ed7c2 | 2015-11-04 21:03:37 +0000 | [diff] [blame] | 7 | queue_group RollersQueue { |
Comran Morshed | e9b1292 | 2015-11-04 19:46:48 +0000 | [diff] [blame] | 8 | implements aos.control_loops.ControlLoop; |
| 9 | |
| 10 | message Goal { |
| 11 | // -1 = back intake, 1 = front intake, all else = stationary. |
| 12 | int16_t intake; |
| 13 | // -1 = backwards, 1 = forwards, all else = stationary. |
| 14 | int16_t low_spit; |
| 15 | // Whether we want the human player load function. |
| 16 | bool human_player; |
| 17 | }; |
| 18 | |
| 19 | message Position {}; |
| 20 | |
| 21 | message Output { |
| 22 | // Positive voltage = intaking, Negative = spitting. |
| 23 | double front_intake_voltage; |
| 24 | double back_intake_voltage; |
| 25 | // Voltage for the low goal rollers. |
| 26 | // Positive voltage = ball towards back, Negative = ball towards front. |
| 27 | double low_goal_voltage; |
| 28 | |
| 29 | // Whether the front and back intake pistons are extended. |
| 30 | bool front_extended; |
| 31 | bool back_extended; |
| 32 | }; |
| 33 | |
| 34 | message Status {}; |
| 35 | |
| 36 | queue Goal goal; |
| 37 | queue Position position; |
| 38 | queue Output output; |
| 39 | queue Status status; |
| 40 | }; |