blob: 8938a2b6cdb0d4a9b3a37ca768feffc73022f678 [file] [log] [blame]
Austin Schuh55a13dc2019-01-27 22:39:03 -08001package(default_visibility = ["//visibility:public"])
Comran Morshed2a97bc82016-01-16 17:27:01 +00002
Austin Schuh55a13dc2019-01-27 22:39:03 -08003load("//aos/build:queues.bzl", "queue_library")
Comran Morshed2a97bc82016-01-16 17:27:01 +00004
5queue_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 ],
Comran Morshed2a97bc82016-01-16 17:27:01 +000014)
15
16genrule(
Austin Schuh55a13dc2019-01-27 22:39:03 -080017 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 Morshed2a97bc82016-01-16 17:27:01 +000029)
30
31cc_library(
Austin Schuh55a13dc2019-01-27 22:39:03 -080032 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 Morshed2a97bc82016-01-16 17:27:01 +000044)
45
46cc_library(
Austin Schuh55a13dc2019-01-27 22:39:03 -080047 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 Morshed2a97bc82016-01-16 17:27:01 +000059)
60
61cc_test(
Austin Schuh55a13dc2019-01-27 22:39:03 -080062 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 Morshed2a97bc82016-01-16 17:27:01 +000075)
76
77cc_binary(
Austin Schuh55a13dc2019-01-27 22:39:03 -080078 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 Morshed2a97bc82016-01-16 17:27:01 +000088)