blob: 075cafce6d8e72014aa73c445b443e0adb4e8259 [file] [log] [blame]
Austin Schuh55a13dc2019-01-27 22:39:03 -08001package(default_visibility = ["//visibility:public"])
Brian Silverman8c374e02015-09-06 23:02:21 -04002
Austin Schuh55a13dc2019-01-27 22:39:03 -08003load("//aos/build:queues.bzl", "queue_library")
Brian Silverman8c374e02015-09-06 23:02:21 -04004
Brian Silverman8c374e02015-09-06 23:02:21 -04005queue_library(
Austin Schuh55a13dc2019-01-27 22:39:03 -08006 name = "shooter_queue",
7 srcs = [
8 "shooter.q",
9 ],
10 deps = [
11 "//aos/controls:control_loop_queues",
12 "//frc971/control_loops:queues",
13 ],
Brian Silverman8c374e02015-09-06 23:02:21 -040014)
15
Austin Schuh9d4aca82015-11-08 14:41:31 -080016genrule(
Austin Schuh55a13dc2019-01-27 22:39:03 -080017 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 Schuh9d4aca82015-11-08 14:41:31 -080029)
30
Brian Silverman8c374e02015-09-06 23:02:21 -040031cc_library(
Austin Schuh55a13dc2019-01-27 22:39:03 -080032 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 Silverman8c374e02015-09-06 23:02:21 -040053)
54
Brian Silverman100534c2015-09-07 15:51:23 -040055cc_test(
Austin Schuh55a13dc2019-01-27 22:39:03 -080056 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 Silverman8c374e02015-09-06 23:02:21 -040068)
69
70cc_binary(
Austin Schuh55a13dc2019-01-27 22:39:03 -080071 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 Silverman8c374e02015-09-06 23:02:21 -040080)