Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame^] | 1 | package(default_visibility = ["//visibility:public"]) |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 2 | |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame^] | 3 | load("//aos/build:queues.bzl", "queue_library") |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 4 | |
| 5 | queue_library( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame^] | 6 | name = "shooter_queue", |
| 7 | srcs = [ |
| 8 | "shooter.q", |
| 9 | ], |
| 10 | deps = [ |
| 11 | "//aos/controls:control_loop_queues", |
| 12 | "//frc971/control_loops:queues", |
| 13 | ], |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 14 | ) |
| 15 | |
| 16 | genrule( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame^] | 17 | name = "genrule_shooter", |
| 18 | outs = [ |
| 19 | "shooter_plant.h", |
| 20 | "shooter_plant.cc", |
| 21 | "shooter_integral_plant.h", |
| 22 | "shooter_integral_plant.cc", |
| 23 | ], |
| 24 | cmd = "$(location //y2016/control_loops/python:shooter) $(OUTS)", |
| 25 | tools = [ |
| 26 | "//y2016/control_loops/python:shooter", |
| 27 | ], |
| 28 | visibility = ["//visibility:private"], |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 29 | ) |
| 30 | |
| 31 | cc_library( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame^] | 32 | name = "shooter_plants", |
| 33 | srcs = [ |
| 34 | "shooter_integral_plant.cc", |
| 35 | "shooter_plant.cc", |
| 36 | ], |
| 37 | hdrs = [ |
| 38 | "shooter_integral_plant.h", |
| 39 | "shooter_plant.h", |
| 40 | ], |
| 41 | deps = [ |
| 42 | "//frc971/control_loops:state_feedback_loop", |
| 43 | ], |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 44 | ) |
| 45 | |
| 46 | cc_library( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame^] | 47 | name = "shooter_lib", |
| 48 | srcs = [ |
| 49 | "shooter.cc", |
| 50 | ], |
| 51 | hdrs = [ |
| 52 | "shooter.h", |
| 53 | ], |
| 54 | deps = [ |
| 55 | ":shooter_plants", |
| 56 | ":shooter_queue", |
| 57 | "//aos/controls:control_loop", |
| 58 | ], |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 59 | ) |
| 60 | |
| 61 | cc_test( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame^] | 62 | name = "shooter_lib_test", |
| 63 | srcs = [ |
| 64 | "shooter_lib_test.cc", |
| 65 | ], |
| 66 | deps = [ |
| 67 | ":shooter_lib", |
| 68 | ":shooter_queue", |
| 69 | "//aos:queues", |
| 70 | "//aos/controls:control_loop_test", |
| 71 | "//aos/testing:googletest", |
| 72 | "//frc971/control_loops:state_feedback_loop", |
| 73 | "//frc971/control_loops:team_number_test_environment", |
| 74 | ], |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 75 | ) |
| 76 | |
| 77 | cc_binary( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame^] | 78 | name = "shooter", |
| 79 | srcs = [ |
| 80 | "shooter_main.cc", |
| 81 | ], |
| 82 | deps = [ |
| 83 | ":shooter_lib", |
| 84 | ":shooter_queue", |
| 85 | "//aos:init", |
| 86 | "//aos/events:shm-event-loop", |
| 87 | ], |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 88 | ) |