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