blob: 9f92f1740210990d6b508c3301a7e3cf77a35c05 [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',
Austin Schuh55139fe2015-10-14 23:55:24 -070061 '//debian:libm',
Brian Silverman8c374e02015-09-06 23:02:21 -040062 ],
63)
64
Brian Silverman100534c2015-09-07 15:51:23 -040065cc_test(
Brian Silverman8c374e02015-09-06 23:02:21 -040066 name = 'shooter_lib_test',
67 srcs = [
68 'shooter_lib_test.cc',
69 ],
70 deps = [
Brian Silverman8c374e02015-09-06 23:02:21 -040071 ':shooter_lib',
Austin Schuhff604222017-11-05 17:06:53 -080072 ':shooter_queue',
Brian Silverman8c374e02015-09-06 23:02:21 -040073 '//aos/common/controls:control_loop_test',
Austin Schuhff604222017-11-05 17:06:53 -080074 '//aos/testing:googletest',
Brian Silverman8c374e02015-09-06 23:02:21 -040075 '//frc971/control_loops:state_feedback_loop',
Austin Schuhff604222017-11-05 17:06:53 -080076 '//frc971/control_loops:team_number_test_environment',
Brian Silverman8c374e02015-09-06 23:02:21 -040077 ],
78)
79
80cc_binary(
81 name = 'shooter',
82 srcs = [
83 'shooter_main.cc',
84 ],
85 deps = [
86 '//aos/linux_code:init',
87 ':shooter_lib',
88 ],
89)