blob: 307b8c555eae7146fa999f83dc2296c3b16f1b43 [file] [log] [blame]
Diana Vandenberg69899ed2017-01-28 16:57:54 -08001package(default_visibility = ['//visibility:public'])
2
3load('/aos/build/queues', 'queue_library')
4
5queue_library(
Campbell Crowley75026292017-02-04 21:46:19 -08006 name = 'superstructure_queue',
Diana Vandenberg69899ed2017-01-28 16:57:54 -08007 srcs = [
Campbell Crowley75026292017-02-04 21:46:19 -08008 'superstructure.q',
Diana Vandenberg69899ed2017-01-28 16:57:54 -08009 ],
10 deps = [
11 '//aos/common/controls:control_loop_queues',
Austin Schuh3634ed32017-02-05 16:28:49 -080012 '//frc971/control_loops:profiled_subsystem_queue',
Diana Vandenberg69899ed2017-01-28 16:57:54 -080013 '//frc971/control_loops:queues',
14 ],
15)
Austin Schuh87c10632017-02-05 19:02:17 -080016
17cc_library(
18 name = 'superstructure_lib',
19 srcs = [
20 'superstructure.cc',
21 ],
22 hdrs = [
23 'superstructure.h',
24 ],
25 deps = [
Parker Schuh208a58d2017-04-12 20:51:38 -070026 ':vision_distance_average',
Austin Schuh87c10632017-02-05 19:02:17 -080027 ':superstructure_queue',
28 '//aos/common/controls:control_loop',
Austin Schuhd5ccb862017-03-11 22:06:36 -080029 '//y2017/control_loops/superstructure/column',
Austin Schuh87c10632017-02-05 19:02:17 -080030 '//y2017/control_loops/superstructure/hood',
Adam Snaider79900c22017-02-08 20:23:15 -080031 '//y2017/control_loops/superstructure/intake',
Tyler Chatow2737d2a2017-02-08 21:20:51 -080032 '//y2017/control_loops/superstructure/shooter',
Austin Schuh87c10632017-02-05 19:02:17 -080033 '//y2017:constants',
34 ],
35)
Adam Snaidercfe13062017-02-05 18:23:09 -080036
37cc_test(
38 name = 'superstructure_lib_test',
39 srcs = [
40 'superstructure_lib_test.cc',
41 ],
42 deps = [
43 ':superstructure_queue',
44 ':superstructure_lib',
Adam Snaidercfe13062017-02-05 18:23:09 -080045 '//aos/common/controls:control_loop_test',
46 '//aos/common:math',
Tyler Chatow2737d2a2017-02-08 21:20:51 -080047 '//aos/common:queues',
Adam Snaidercfe13062017-02-05 18:23:09 -080048 '//aos/common:time',
Tyler Chatow2737d2a2017-02-08 21:20:51 -080049 '//aos/testing:googletest',
Adam Snaidercfe13062017-02-05 18:23:09 -080050 '//frc971/control_loops:position_sensor_sim',
51 '//frc971/control_loops:team_number_test_environment',
Austin Schuhd5ccb862017-03-11 22:06:36 -080052 '//y2017/control_loops/superstructure/column:column_plants',
Adam Snaider79900c22017-02-08 20:23:15 -080053 '//y2017/control_loops/superstructure/hood:hood_plants',
Adam Snaider79900c22017-02-08 20:23:15 -080054 '//y2017/control_loops/superstructure/intake:intake_plants',
Tyler Chatow2737d2a2017-02-08 21:20:51 -080055 '//y2017/control_loops/superstructure/shooter:shooter_plants',
Adam Snaidercfe13062017-02-05 18:23:09 -080056 ],
57)
Austin Schuh7b9a3ba2017-02-19 23:11:45 -080058
59cc_binary(
60 name = 'superstructure',
61 srcs = [
62 'superstructure_main.cc',
63 ],
64 deps = [
65 '//aos/linux_code:init',
66 ':superstructure_lib',
67 ':superstructure_queue',
68 ],
69)
Parker Schuhfea48582017-03-11 20:15:32 -080070
71cc_library(
72 name = 'vision_time_adjuster',
73 hdrs = [
74 'vision_time_adjuster.h',
75 ],
76 srcs = [
77 'vision_time_adjuster.cc',
78 ],
79 deps = [
80 ':superstructure_queue',
81 '//aos/common:ring_buffer',
82 '//frc971/control_loops/drivetrain:drivetrain_queue',
Austin Schuhac76bb32017-03-22 22:34:26 -070083 '//y2017/control_loops/drivetrain:polydrivetrain_plants',
Parker Schuhfea48582017-03-11 20:15:32 -080084 '//y2017/vision:vision_queue',
85 ],
86)
87
88cc_test(
89 name = 'vision_time_adjuster_test',
90 srcs = [
91 'vision_time_adjuster_test.cc',
92 ],
93 deps = [
94 ':vision_time_adjuster',
95 '//aos/common:time',
96 '//aos/testing:googletest',
97 '//aos/testing:test_shm',
98 ],
99)
Parker Schuh208a58d2017-04-12 20:51:38 -0700100
101cc_library(
102 name = 'vision_distance_average',
103 hdrs = [
104 'vision_distance_average.h',
105 ],
106 deps = [
107 '//aos/common:time',
108 '//aos/common:ring_buffer',
109 '//y2017/vision:vision_queue',
110 ],
111)
112
113cc_test(
114 name = 'vision_distance_average_test',
115 srcs = [
116 'vision_distance_average_test.cc',
117 ],
118 deps = [
119 ':vision_distance_average',
120 '//aos/common:time',
121 '//aos/testing:googletest',
122 ],
123)