blob: 41d42281b6fe49f63bca46e581b782c1d55acffd [file] [log] [blame]
Brian Silverman8c374e02015-09-06 23:02:21 -04001package(default_visibility = ['//visibility:public'])
2
Austin Schuhf0736512015-09-07 01:22:16 -07003load('/aos/build/queues', 'queue_library')
Brian Silverman8c374e02015-09-06 23:02:21 -04004
5cc_binary(
6 name = 'replay_shooter',
7 srcs = [
8 'replay_shooter.cc',
9 ],
10 deps = [
11 ':shooter_queue',
12 '//aos/common/controls:replay_control_loop',
13 '//aos/linux_code:init',
14 ],
15)
16
17queue_library(
18 name = 'shooter_queue',
19 srcs = [
20 'shooter.q',
21 ],
Brian Silverman100534c2015-09-07 15:51:23 -040022 deps = [
23 '//aos/common/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(
29 name = 'genrule_shooter',
30 visibility = ['//visibility:private'],
31 cmd = '$(location //y2014/control_loops/python:shooter) $(OUTS)',
32 tools = [
33 '//y2014/control_loops/python:shooter',
34 ],
35 tags = [
36 'local',
37 ],
38 outs = [
39 'shooter_motor_plant.cc',
40 'shooter_motor_plant.h',
41 'unaugmented_shooter_motor_plant.cc',
42 'unaugmented_shooter_motor_plant.h',
43 ],
44)
45
Brian Silverman8c374e02015-09-06 23:02:21 -040046cc_library(
47 name = 'shooter_lib',
48 srcs = [
49 'shooter.cc',
50 'shooter_motor_plant.cc',
51 'unaugmented_shooter_motor_plant.cc',
52 ],
Brian Silverman100534c2015-09-07 15:51:23 -040053 hdrs = [
54 'shooter.h',
55 'shooter_motor_plant.h',
56 'unaugmented_shooter_motor_plant.h',
57 ],
Brian Silverman8c374e02015-09-06 23:02:21 -040058 deps = [
59 ':shooter_queue',
60 '//aos/common/controls:control_loop',
61 '//y2014:constants',
62 '//frc971/control_loops:state_feedback_loop',
63 '//aos/common/logging:queue_logging',
Austin Schuh55139fe2015-10-14 23:55:24 -070064 '//debian:libm',
Brian Silverman8c374e02015-09-06 23:02:21 -040065 ],
66)
67
Brian Silverman100534c2015-09-07 15:51:23 -040068cc_test(
Brian Silverman8c374e02015-09-06 23:02:21 -040069 name = 'shooter_lib_test',
70 srcs = [
71 'shooter_lib_test.cc',
72 ],
73 deps = [
Brian Silverman258b9172015-09-19 14:32:57 -040074 '//aos/testing:googletest',
Brian Silverman8c374e02015-09-06 23:02:21 -040075 ':shooter_queue',
76 ':shooter_lib',
77 '//aos/common/controls:control_loop_test',
78 '//frc971/control_loops:state_feedback_loop',
79 ],
80)
81
82cc_binary(
83 name = 'shooter',
84 srcs = [
85 'shooter_main.cc',
86 ],
87 deps = [
88 '//aos/linux_code:init',
89 ':shooter_lib',
90 ],
91)