Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
Brian Silverman | 8c374e0 | 2015-09-06 23:02:21 -0400 | [diff] [blame] | 2 | |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 3 | load("//aos/build:queues.bzl", "queue_library") |
Brian Silverman | 8c374e0 | 2015-09-06 23:02:21 -0400 | [diff] [blame] | 4 | |
Brian Silverman | 8c374e0 | 2015-09-06 23:02:21 -0400 | [diff] [blame] | 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 | ], |
Brian Silverman | 8c374e0 | 2015-09-06 23:02:21 -0400 | [diff] [blame] | 14 | ) |
| 15 | |
Austin Schuh | 9d4aca8 | 2015-11-08 14:41:31 -0800 | [diff] [blame] | 16 | genrule( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 17 | name = "genrule_shooter", |
| 18 | outs = [ |
| 19 | "shooter_motor_plant.cc", |
| 20 | "shooter_motor_plant.h", |
| 21 | "unaugmented_shooter_motor_plant.cc", |
| 22 | "unaugmented_shooter_motor_plant.h", |
| 23 | ], |
| 24 | cmd = "$(location //y2014/control_loops/python:shooter) $(OUTS)", |
| 25 | tools = [ |
| 26 | "//y2014/control_loops/python:shooter", |
| 27 | ], |
| 28 | visibility = ["//visibility:private"], |
Austin Schuh | 9d4aca8 | 2015-11-08 14:41:31 -0800 | [diff] [blame] | 29 | ) |
| 30 | |
Brian Silverman | 8c374e0 | 2015-09-06 23:02:21 -0400 | [diff] [blame] | 31 | cc_library( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 32 | name = "shooter_lib", |
| 33 | srcs = [ |
| 34 | "shooter.cc", |
| 35 | "shooter_motor_plant.cc", |
| 36 | "unaugmented_shooter_motor_plant.cc", |
| 37 | ], |
| 38 | hdrs = [ |
| 39 | "shooter.h", |
| 40 | "shooter_motor_plant.h", |
| 41 | "unaugmented_shooter_motor_plant.h", |
| 42 | ], |
| 43 | linkopts = [ |
| 44 | "-lm", |
| 45 | ], |
| 46 | deps = [ |
| 47 | ":shooter_queue", |
| 48 | "//aos/controls:control_loop", |
| 49 | "//aos/logging:queue_logging", |
| 50 | "//frc971/control_loops:state_feedback_loop", |
| 51 | "//y2014:constants", |
| 52 | ], |
Brian Silverman | 8c374e0 | 2015-09-06 23:02:21 -0400 | [diff] [blame] | 53 | ) |
| 54 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 55 | cc_test( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 56 | name = "shooter_lib_test", |
| 57 | srcs = [ |
| 58 | "shooter_lib_test.cc", |
| 59 | ], |
| 60 | deps = [ |
| 61 | ":shooter_lib", |
| 62 | ":shooter_queue", |
| 63 | "//aos/controls:control_loop_test", |
| 64 | "//aos/testing:googletest", |
| 65 | "//frc971/control_loops:state_feedback_loop", |
| 66 | "//frc971/control_loops:team_number_test_environment", |
| 67 | ], |
Brian Silverman | 8c374e0 | 2015-09-06 23:02:21 -0400 | [diff] [blame] | 68 | ) |
| 69 | |
| 70 | cc_binary( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 71 | name = "shooter", |
| 72 | srcs = [ |
| 73 | "shooter_main.cc", |
| 74 | ], |
| 75 | deps = [ |
| 76 | ":shooter_lib", |
| 77 | "//aos:init", |
| 78 | "//aos/events:shm-event-loop", |
| 79 | ], |
Brian Silverman | 8c374e0 | 2015-09-06 23:02:21 -0400 | [diff] [blame] | 80 | ) |