blob: 794a35b12387788f6c7925e9a523f6a4a77f8c99 [file] [log] [blame]
Comran Morshed2a97bc82016-01-16 17:27:01 +00001package(default_visibility = ['//visibility:public'])
2
Austin Schuh4f857292018-02-15 23:42:04 -08003load('//aos/build:queues.bzl', 'queue_library')
Comran Morshed2a97bc82016-01-16 17:27:01 +00004
5queue_library(
6 name = 'shooter_queue',
7 srcs = [
8 'shooter.q',
9 ],
10 deps = [
John Park33858a32018-09-28 23:05:48 -070011 '//aos/controls:control_loop_queues',
Comran Morshed2a97bc82016-01-16 17:27:01 +000012 '//frc971/control_loops:queues',
13 ],
14)
15
16genrule(
17 name = 'genrule_shooter',
18 visibility = ['//visibility:private'],
19 cmd = '$(location //y2016/control_loops/python:shooter) $(OUTS)',
20 tools = [
21 '//y2016/control_loops/python:shooter',
22 ],
23 outs = [
24 'shooter_plant.h',
25 'shooter_plant.cc',
Austin Schuh09c2b0b2016-02-13 15:53:16 -080026 'shooter_integral_plant.h',
27 'shooter_integral_plant.cc',
Comran Morshed2a97bc82016-01-16 17:27:01 +000028 ],
29)
30
31cc_library(
32 name = 'shooter_plants',
33 srcs = [
34 'shooter_plant.cc',
Austin Schuh09c2b0b2016-02-13 15:53:16 -080035 'shooter_integral_plant.cc',
Comran Morshed2a97bc82016-01-16 17:27:01 +000036 ],
37 hdrs = [
38 'shooter_plant.h',
Austin Schuh09c2b0b2016-02-13 15:53:16 -080039 'shooter_integral_plant.h',
Comran Morshed2a97bc82016-01-16 17:27:01 +000040 ],
41 deps = [
42 '//frc971/control_loops:state_feedback_loop',
43 ],
44)
45
46cc_library(
47 name = 'shooter_lib',
48 srcs = [
49 'shooter.cc',
50 ],
51 hdrs = [
52 'shooter.h',
53 ],
54 deps = [
55 ':shooter_queue',
56 ':shooter_plants',
John Park33858a32018-09-28 23:05:48 -070057 '//aos/controls:control_loop',
Comran Morshed2a97bc82016-01-16 17:27:01 +000058 ],
59)
60
61cc_test(
62 name = 'shooter_lib_test',
63 srcs = [
64 'shooter_lib_test.cc',
65 ],
66 deps = [
67 ':shooter_queue',
68 ':shooter_lib',
69 '//aos/testing:googletest',
John Park33858a32018-09-28 23:05:48 -070070 '//aos:queues',
71 '//aos/controls:control_loop_test',
Comran Morshed2a97bc82016-01-16 17:27:01 +000072 '//frc971/control_loops:state_feedback_loop',
73 '//frc971/control_loops:team_number_test_environment',
74 ],
75)
76
77cc_binary(
78 name = 'shooter',
79 srcs = [
80 'shooter_main.cc',
81 ],
82 deps = [
83 '//aos/linux_code:init',
84 ':shooter_lib',
85 ':shooter_queue',
86 ],
87)