blob: 870e65550e6bdbda04d8e4265faaa9e4ac64d3e8 [file] [log] [blame]
Brian Silverman003a4732018-03-11 14:02:15 -07001package(default_visibility = ["//visibility:public"])
Brian Silverman100534c2015-09-07 15:51:23 -04002
Brian Silverman003a4732018-03-11 14:02:15 -07003load("//aos/build:queues.bzl", "queue_library")
Brian Silverman100534c2015-09-07 15:51:23 -04004
5queue_library(
Brian Silverman003a4732018-03-11 14:02:15 -07006 name = "logging_queue",
7 srcs = [
8 "logging.q",
9 ],
Brian Silverman100534c2015-09-07 15:51:23 -040010)
11
12cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070013 name = "encoder_and_potentiometer",
14 srcs = [
15 "encoder_and_potentiometer.cc",
16 ],
17 hdrs = [
18 "encoder_and_potentiometer.h",
19 ],
20 restricted_to = ["//tools:roborio"],
21 deps = [
22 ":dma",
23 ":dma_edge_counting",
John Park398c74a2018-10-20 21:17:39 -070024 "//aos:init",
Austin Schuh45a549f2019-02-02 15:43:56 -080025 "//aos/logging",
26 "//aos/mutex",
Brian Silverman003a4732018-03-11 14:02:15 -070027 "//third_party:wpilib",
28 ],
Brian Silverman100534c2015-09-07 15:51:23 -040029)
30
31cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070032 name = "dma_edge_counting",
33 srcs = [
34 "dma_edge_counting.cc",
35 ],
36 hdrs = [
37 "dma_edge_counting.h",
38 ],
39 restricted_to = ["//tools:roborio"],
40 deps = [
41 ":dma",
John Park33858a32018-09-28 23:05:48 -070042 "//aos/logging",
Brian Silverman003a4732018-03-11 14:02:15 -070043 "//third_party:wpilib",
44 ],
Brian Silverman100534c2015-09-07 15:51:23 -040045)
46
47cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070048 name = "interrupt_edge_counting",
49 srcs = [
50 "interrupt_edge_counting.cc",
51 ],
52 hdrs = [
53 "interrupt_edge_counting.h",
54 ],
55 restricted_to = ["//tools:roborio"],
56 deps = [
John Park398c74a2018-10-20 21:17:39 -070057 "//aos:init",
Austin Schuh45a549f2019-02-02 15:43:56 -080058 "//aos/logging",
59 "//aos/stl_mutex",
60 "//aos/time",
Brian Silverman003a4732018-03-11 14:02:15 -070061 "//third_party:wpilib",
62 ],
Brian Silverman100534c2015-09-07 15:51:23 -040063)
64
65cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070066 name = "buffered_pcm",
67 srcs = [
68 "buffered_pcm.cc",
69 "buffered_solenoid.cc",
70 ],
71 hdrs = [
72 "buffered_pcm.h",
73 "buffered_solenoid.h",
74 ],
75 restricted_to = ["//tools:roborio"],
76 deps = [
John Park33858a32018-09-28 23:05:48 -070077 "//aos/logging",
Brian Silverman003a4732018-03-11 14:02:15 -070078 "//third_party:wpilib",
79 ],
Brian Silverman100534c2015-09-07 15:51:23 -040080)
81
82cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070083 name = "gyro_interface",
84 srcs = [
85 "gyro_interface.cc",
86 ],
87 hdrs = [
88 "gyro_interface.h",
89 ],
90 restricted_to = ["//tools:roborio"],
91 deps = [
John Park33858a32018-09-28 23:05:48 -070092 "//aos/logging",
Austin Schuh45a549f2019-02-02 15:43:56 -080093 "//aos/time",
Brian Silverman003a4732018-03-11 14:02:15 -070094 "//third_party:wpilib",
95 ],
Brian Silverman100534c2015-09-07 15:51:23 -040096)
97
98cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070099 name = "gyro_sender",
100 srcs = [
101 "gyro_sender.cc",
102 ],
103 hdrs = [
104 "gyro_sender.h",
105 ],
106 restricted_to = ["//tools:roborio"],
107 deps = [
108 ":gyro_interface",
Austin Schuh45a549f2019-02-02 15:43:56 -0800109 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800110 "//aos/events:event-loop",
John Park33858a32018-09-28 23:05:48 -0700111 "//aos/logging",
112 "//aos/logging:queue_logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800113 "//aos/robot_state",
114 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700115 "//aos/util:phased_loop",
Brian Silverman003a4732018-03-11 14:02:15 -0700116 "//frc971/queues:gyro",
117 "//frc971/zeroing:averager",
118 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400119)
120
Austin Schuhbd1fe9c2019-06-29 16:35:48 -0700121queue_library(
122 name = "loop_output_handler_test_queue",
123 srcs = [
124 "loop_output_handler_test.q",
125 ],
126)
127
Brian Silverman100534c2015-09-07 15:51:23 -0400128cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700129 name = "loop_output_handler",
130 srcs = [
131 "loop_output_handler.cc",
132 ],
133 hdrs = [
134 "loop_output_handler.h",
135 ],
136 deps = [
John Park398c74a2018-10-20 21:17:39 -0700137 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800138 "//aos/events:event-loop",
Austin Schuh45a549f2019-02-02 15:43:56 -0800139 "//aos/robot_state",
140 "//aos/scoped:scoped_fd",
141 "//aos/time",
142 "//aos/util:log_interval",
Brian Silverman003a4732018-03-11 14:02:15 -0700143 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400144)
145
Austin Schuhbd1fe9c2019-06-29 16:35:48 -0700146cc_test(
147 name = "loop_output_handler_test",
148 srcs = [
149 "loop_output_handler_test.cc",
150 ],
151 deps = [
152 ":loop_output_handler",
153 ":loop_output_handler_test_queue",
154 "//aos/events:simulated_event_loop",
155 "//aos/logging:queue_logging",
156 "//aos/testing:googletest",
157 "//aos/testing:test_logging",
158 ],
159)
160
Brian Silverman100534c2015-09-07 15:51:23 -0400161cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700162 name = "joystick_sender",
163 srcs = [
164 "joystick_sender.cc",
165 ],
166 hdrs = [
167 "joystick_sender.h",
168 ],
169 restricted_to = ["//tools:roborio"],
170 deps = [
John Park398c74a2018-10-20 21:17:39 -0700171 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800172 "//aos/events:shm-event-loop",
Austin Schuh45a549f2019-02-02 15:43:56 -0800173 "//aos/logging:queue_logging",
174 "//aos/network:team_number",
175 "//aos/robot_state",
Brian Silverman003a4732018-03-11 14:02:15 -0700176 "//third_party:wpilib",
177 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400178)
Brian Silverman811f8ec2015-12-06 01:29:42 -0500179
180cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700181 name = "wpilib_interface",
182 srcs = [
183 "wpilib_interface.cc",
184 ],
185 hdrs = [
186 "wpilib_interface.h",
187 ],
188 restricted_to = ["//tools:roborio"],
189 deps = [
John Park33858a32018-09-28 23:05:48 -0700190 "//aos/logging:queue_logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800191 "//aos/robot_state",
Brian Silverman003a4732018-03-11 14:02:15 -0700192 "//third_party:wpilib",
193 ],
Brian Silverman39b339e2016-01-03 13:24:22 -0800194)
195
196queue_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700197 name = "pdp_values",
198 srcs = [
199 "pdp_values.q",
200 ],
Brian Silverman425492b2015-12-30 15:23:55 -0800201)
202
203cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700204 name = "pdp_fetcher",
205 srcs = [
206 "pdp_fetcher.cc",
207 ],
208 hdrs = [
209 "pdp_fetcher.h",
210 ],
211 restricted_to = ["//tools:roborio"],
212 deps = [
213 ":pdp_values",
Austin Schuh45a549f2019-02-02 15:43:56 -0800214 "//aos:init",
Austin Schuh0b545432019-05-12 15:46:12 -0700215 "//aos/events:event-loop",
John Park33858a32018-09-28 23:05:48 -0700216 "//aos/logging:queue_logging",
217 "//aos/util:phased_loop",
Brian Silverman003a4732018-03-11 14:02:15 -0700218 "//third_party:wpilib",
219 ],
Brian Silverman811f8ec2015-12-06 01:29:42 -0500220)
Campbell Crowleyc0cfb132015-12-30 20:58:02 -0800221
222cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700223 name = "wpilib_robot_base",
224 hdrs = [
225 "wpilib_robot_base.h",
226 ],
227 restricted_to = ["//tools:roborio"],
228 deps = [
229 "//third_party:wpilib",
230 ],
Campbell Crowleyc0cfb132015-12-30 20:58:02 -0800231)
Brian Silverman5f17a972016-02-28 01:49:32 -0500232
233queue_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700234 name = "imu_queue",
235 srcs = [
236 "imu.q",
237 ],
Brian Silverman5f17a972016-02-28 01:49:32 -0500238)
239
240cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700241 name = "ADIS16448",
242 srcs = [
243 "ADIS16448.cc",
244 ],
245 hdrs = [
246 "ADIS16448.h",
247 ],
248 restricted_to = ["//tools:roborio"],
249 deps = [
250 ":imu_queue",
251 ":spi_rx_clearer",
Austin Schuh45a549f2019-02-02 15:43:56 -0800252 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800253 "//aos/events:event-loop",
John Park33858a32018-09-28 23:05:48 -0700254 "//aos/logging",
255 "//aos/logging:queue_logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800256 "//aos/robot_state",
257 "//aos/time",
Brian Silverman003a4732018-03-11 14:02:15 -0700258 "//frc971/zeroing:averager",
259 "//third_party:wpilib",
260 ],
Brian Silverman5f17a972016-02-28 01:49:32 -0500261)
Brian Silvermanb5b46ca2016-03-13 01:14:17 -0500262
263cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700264 name = "dma",
265 srcs = [
266 "dma.cc",
267 ],
268 hdrs = [
269 "dma.h",
270 ],
271 restricted_to = ["//tools:roborio"],
272 deps = [
273 "//third_party:wpilib",
274 ],
275)
276
277cc_library(
278 name = "spi_rx_clearer",
279 srcs = [
280 "spi_rx_clearer.cc",
281 ],
282 hdrs = [
283 "spi_rx_clearer.h",
284 ],
285 deps = [
John Park33858a32018-09-28 23:05:48 -0700286 "//aos/logging",
Brian Silverman003a4732018-03-11 14:02:15 -0700287 ],
Brian Silvermanb5b46ca2016-03-13 01:14:17 -0500288)
Sabina Davisadc58542019-02-01 22:23:00 -0800289
290cc_library(
291 name = "sensor_reader",
292 srcs = [
293 "sensor_reader.cc",
294 ],
295 hdrs = [
Austin Schuh45a549f2019-02-02 15:43:56 -0800296 "sensor_reader.h",
Sabina Davisadc58542019-02-01 22:23:00 -0800297 ],
298 restricted_to = ["//tools:roborio"],
299 deps = [
Sabina Davis1ffa4172019-02-01 22:38:33 -0800300 ":dma",
301 ":dma_edge_counting",
Austin Schuh54667ac2019-02-02 16:44:49 -0800302 ":encoder_and_potentiometer",
Austin Schuh45a549f2019-02-02 15:43:56 -0800303 ":wpilib_interface",
304 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800305 "//aos/events:event-loop",
Austin Schuh45a549f2019-02-02 15:43:56 -0800306 "//aos/stl_mutex",
307 "//aos/time",
308 "//aos/util:phased_loop",
Austin Schuh54667ac2019-02-02 16:44:49 -0800309 "//frc971/control_loops:queues",
Austin Schuh45a549f2019-02-02 15:43:56 -0800310 "//third_party:wpilib",
Sabina Davisadc58542019-02-01 22:23:00 -0800311 ],
312)
Sabina Davisd004fd62019-02-02 23:51:46 -0800313
314cc_library(
315 name = "drivetrain_writer",
316 srcs = [
317 "drivetrain_writer.cc",
318 ],
319 hdrs = [
320 "drivetrain_writer.h",
321 ],
322 restricted_to = ["//tools:roborio"],
323 deps = [
324 ":loop_output_handler",
325 "//aos:math",
326 "//aos/logging",
327 "//aos/logging:queue_logging",
328 "//frc971/control_loops/drivetrain:drivetrain_queue",
329 "//third_party:wpilib",
330 ],
331)