blob: 2ef83cea3109ffbf403606bf736bbab38807fb27 [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
121cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700122 name = "lpd8806",
123 srcs = [
124 "LPD8806.cc",
125 ],
126 hdrs = [
127 "LPD8806.h",
128 ],
129 restricted_to = ["//tools:roborio"],
130 deps = [
Austin Schuh45a549f2019-02-02 15:43:56 -0800131 "//aos/mutex",
132 "//aos/time",
Brian Silverman003a4732018-03-11 14:02:15 -0700133 "//frc971/queues:gyro",
134 "//third_party:wpilib",
135 ],
Comran Morshed33ad1692015-12-06 18:53:02 +0000136)
137
138cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700139 name = "loop_output_handler",
140 srcs = [
141 "loop_output_handler.cc",
142 ],
143 hdrs = [
144 "loop_output_handler.h",
145 ],
146 deps = [
John Park398c74a2018-10-20 21:17:39 -0700147 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800148 "//aos/events:event-loop",
Austin Schuh45a549f2019-02-02 15:43:56 -0800149 "//aos/robot_state",
150 "//aos/scoped:scoped_fd",
151 "//aos/time",
152 "//aos/util:log_interval",
Brian Silverman003a4732018-03-11 14:02:15 -0700153 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400154)
155
156cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700157 name = "joystick_sender",
158 srcs = [
159 "joystick_sender.cc",
160 ],
161 hdrs = [
162 "joystick_sender.h",
163 ],
164 restricted_to = ["//tools:roborio"],
165 deps = [
John Park398c74a2018-10-20 21:17:39 -0700166 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800167 "//aos/events:shm-event-loop",
Austin Schuh45a549f2019-02-02 15:43:56 -0800168 "//aos/logging:queue_logging",
169 "//aos/network:team_number",
170 "//aos/robot_state",
Brian Silverman003a4732018-03-11 14:02:15 -0700171 "//third_party:wpilib",
172 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400173)
Brian Silverman811f8ec2015-12-06 01:29:42 -0500174
175cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700176 name = "wpilib_interface",
177 srcs = [
178 "wpilib_interface.cc",
179 ],
180 hdrs = [
181 "wpilib_interface.h",
182 ],
183 restricted_to = ["//tools:roborio"],
184 deps = [
John Park33858a32018-09-28 23:05:48 -0700185 "//aos/logging:queue_logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800186 "//aos/robot_state",
Brian Silverman003a4732018-03-11 14:02:15 -0700187 "//third_party:wpilib",
188 ],
Brian Silverman39b339e2016-01-03 13:24:22 -0800189)
190
191queue_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700192 name = "pdp_values",
193 srcs = [
194 "pdp_values.q",
195 ],
Brian Silverman425492b2015-12-30 15:23:55 -0800196)
197
198cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700199 name = "pdp_fetcher",
200 srcs = [
201 "pdp_fetcher.cc",
202 ],
203 hdrs = [
204 "pdp_fetcher.h",
205 ],
206 restricted_to = ["//tools:roborio"],
207 deps = [
208 ":pdp_values",
Austin Schuh45a549f2019-02-02 15:43:56 -0800209 "//aos:init",
Austin Schuh0b545432019-05-12 15:46:12 -0700210 "//aos/events:event-loop",
John Park33858a32018-09-28 23:05:48 -0700211 "//aos/logging:queue_logging",
212 "//aos/util:phased_loop",
Brian Silverman003a4732018-03-11 14:02:15 -0700213 "//third_party:wpilib",
214 ],
Brian Silverman811f8ec2015-12-06 01:29:42 -0500215)
Campbell Crowleyc0cfb132015-12-30 20:58:02 -0800216
217cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700218 name = "wpilib_robot_base",
219 hdrs = [
220 "wpilib_robot_base.h",
221 ],
222 restricted_to = ["//tools:roborio"],
223 deps = [
224 "//third_party:wpilib",
225 ],
Campbell Crowleyc0cfb132015-12-30 20:58:02 -0800226)
Brian Silverman5f17a972016-02-28 01:49:32 -0500227
228queue_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700229 name = "imu_queue",
230 srcs = [
231 "imu.q",
232 ],
Brian Silverman5f17a972016-02-28 01:49:32 -0500233)
234
235cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700236 name = "ADIS16448",
237 srcs = [
238 "ADIS16448.cc",
239 ],
240 hdrs = [
241 "ADIS16448.h",
242 ],
243 restricted_to = ["//tools:roborio"],
244 deps = [
245 ":imu_queue",
246 ":spi_rx_clearer",
Austin Schuh45a549f2019-02-02 15:43:56 -0800247 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800248 "//aos/events:event-loop",
John Park33858a32018-09-28 23:05:48 -0700249 "//aos/logging",
250 "//aos/logging:queue_logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800251 "//aos/robot_state",
252 "//aos/time",
Brian Silverman003a4732018-03-11 14:02:15 -0700253 "//frc971/zeroing:averager",
254 "//third_party:wpilib",
255 ],
Brian Silverman5f17a972016-02-28 01:49:32 -0500256)
Brian Silvermanb5b46ca2016-03-13 01:14:17 -0500257
258cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700259 name = "dma",
260 srcs = [
261 "dma.cc",
262 ],
263 hdrs = [
264 "dma.h",
265 ],
266 restricted_to = ["//tools:roborio"],
267 deps = [
268 "//third_party:wpilib",
269 ],
270)
271
272cc_library(
273 name = "spi_rx_clearer",
274 srcs = [
275 "spi_rx_clearer.cc",
276 ],
277 hdrs = [
278 "spi_rx_clearer.h",
279 ],
280 deps = [
John Park33858a32018-09-28 23:05:48 -0700281 "//aos/logging",
Brian Silverman003a4732018-03-11 14:02:15 -0700282 ],
Brian Silvermanb5b46ca2016-03-13 01:14:17 -0500283)
Sabina Davisadc58542019-02-01 22:23:00 -0800284
285cc_library(
286 name = "sensor_reader",
287 srcs = [
288 "sensor_reader.cc",
289 ],
290 hdrs = [
Austin Schuh45a549f2019-02-02 15:43:56 -0800291 "sensor_reader.h",
Sabina Davisadc58542019-02-01 22:23:00 -0800292 ],
293 restricted_to = ["//tools:roborio"],
294 deps = [
Sabina Davis1ffa4172019-02-01 22:38:33 -0800295 ":dma",
296 ":dma_edge_counting",
Austin Schuh54667ac2019-02-02 16:44:49 -0800297 ":encoder_and_potentiometer",
Austin Schuh45a549f2019-02-02 15:43:56 -0800298 ":wpilib_interface",
299 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800300 "//aos/events:event-loop",
Austin Schuh45a549f2019-02-02 15:43:56 -0800301 "//aos/stl_mutex",
302 "//aos/time",
303 "//aos/util:phased_loop",
Austin Schuh54667ac2019-02-02 16:44:49 -0800304 "//frc971/control_loops:queues",
Austin Schuh45a549f2019-02-02 15:43:56 -0800305 "//third_party:wpilib",
Sabina Davisadc58542019-02-01 22:23:00 -0800306 ],
307)
Sabina Davisd004fd62019-02-02 23:51:46 -0800308
309cc_library(
310 name = "drivetrain_writer",
311 srcs = [
312 "drivetrain_writer.cc",
313 ],
314 hdrs = [
315 "drivetrain_writer.h",
316 ],
317 restricted_to = ["//tools:roborio"],
318 deps = [
319 ":loop_output_handler",
320 "//aos:math",
321 "//aos/logging",
322 "//aos/logging:queue_logging",
323 "//frc971/control_loops/drivetrain:drivetrain_queue",
324 "//third_party:wpilib",
325 ],
326)