blob: 6ab2a8b3320354f6c2536e7ba800e85d5046b00b [file] [log] [blame]
Brian Silverman8c374e02015-09-06 23:02:21 -04001package(default_visibility = ['//visibility:public'])
2
Austin Schuh4f857292018-02-15 23:42:04 -08003load('//aos/build:queues.bzl', '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 ],
Austin Schuh9d4aca82015-11-08 14:41:31 -080035 outs = [
36 'shooter_motor_plant.cc',
37 'shooter_motor_plant.h',
38 'unaugmented_shooter_motor_plant.cc',
39 'unaugmented_shooter_motor_plant.h',
40 ],
41)
42
Brian Silverman8c374e02015-09-06 23:02:21 -040043cc_library(
44 name = 'shooter_lib',
45 srcs = [
46 'shooter.cc',
47 'shooter_motor_plant.cc',
48 'unaugmented_shooter_motor_plant.cc',
49 ],
Brian Silverman100534c2015-09-07 15:51:23 -040050 hdrs = [
51 'shooter.h',
52 'shooter_motor_plant.h',
53 'unaugmented_shooter_motor_plant.h',
54 ],
Brian Silverman8c374e02015-09-06 23:02:21 -040055 deps = [
56 ':shooter_queue',
57 '//aos/common/controls:control_loop',
58 '//y2014:constants',
59 '//frc971/control_loops:state_feedback_loop',
60 '//aos/common/logging:queue_logging',
Philipp Schraderb3a057e2018-03-10 18:59:40 -080061 ],
62 linkopts = [
63 '-lm',
Brian Silverman8c374e02015-09-06 23:02:21 -040064 ],
65)
66
Brian Silverman100534c2015-09-07 15:51:23 -040067cc_test(
Brian Silverman8c374e02015-09-06 23:02:21 -040068 name = 'shooter_lib_test',
69 srcs = [
70 'shooter_lib_test.cc',
71 ],
72 deps = [
Brian Silverman8c374e02015-09-06 23:02:21 -040073 ':shooter_lib',
Austin Schuhff604222017-11-05 17:06:53 -080074 ':shooter_queue',
Brian Silverman8c374e02015-09-06 23:02:21 -040075 '//aos/common/controls:control_loop_test',
Austin Schuhff604222017-11-05 17:06:53 -080076 '//aos/testing:googletest',
Brian Silverman8c374e02015-09-06 23:02:21 -040077 '//frc971/control_loops:state_feedback_loop',
Austin Schuhff604222017-11-05 17:06:53 -080078 '//frc971/control_loops:team_number_test_environment',
Brian Silverman8c374e02015-09-06 23:02:21 -040079 ],
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)