blob: b58ff9821271fd59afde1d46e384805c27205d1a [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
5cc_binary(
Austin Schuh55a13dc2019-01-27 22:39:03 -08006 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 Silverman8c374e02015-09-06 23:02:21 -040015)
16
17queue_library(
Austin Schuh55a13dc2019-01-27 22:39:03 -080018 name = "shooter_queue",
19 srcs = [
20 "shooter.q",
21 ],
22 deps = [
23 "//aos/controls:control_loop_queues",
24 "//frc971/control_loops:queues",
25 ],
Brian Silverman8c374e02015-09-06 23:02:21 -040026)
27
Austin Schuh9d4aca82015-11-08 14:41:31 -080028genrule(
Austin Schuh55a13dc2019-01-27 22:39:03 -080029 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 Schuh9d4aca82015-11-08 14:41:31 -080041)
42
Brian Silverman8c374e02015-09-06 23:02:21 -040043cc_library(
Austin Schuh55a13dc2019-01-27 22:39:03 -080044 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 Silverman8c374e02015-09-06 23:02:21 -040065)
66
Brian Silverman100534c2015-09-07 15:51:23 -040067cc_test(
Austin Schuh55a13dc2019-01-27 22:39:03 -080068 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 Silverman8c374e02015-09-06 23:02:21 -040080)
81
82cc_binary(
Austin Schuh55a13dc2019-01-27 22:39:03 -080083 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 Silverman8c374e02015-09-06 23:02:21 -040092)