blob: 889c32eeff2f2fd5b506f4a39b4f786da5edd018 [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",
John Park33858a32018-09-28 23:05:48 -0700210 "//aos/logging:queue_logging",
211 "//aos/util:phased_loop",
Brian Silverman003a4732018-03-11 14:02:15 -0700212 "//third_party:wpilib",
213 ],
Brian Silverman811f8ec2015-12-06 01:29:42 -0500214)
Campbell Crowleyc0cfb132015-12-30 20:58:02 -0800215
216cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700217 name = "wpilib_robot_base",
218 hdrs = [
219 "wpilib_robot_base.h",
220 ],
221 restricted_to = ["//tools:roborio"],
222 deps = [
223 "//third_party:wpilib",
224 ],
Campbell Crowleyc0cfb132015-12-30 20:58:02 -0800225)
Brian Silverman5f17a972016-02-28 01:49:32 -0500226
227queue_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700228 name = "imu_queue",
229 srcs = [
230 "imu.q",
231 ],
Brian Silverman5f17a972016-02-28 01:49:32 -0500232)
233
234cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700235 name = "ADIS16448",
236 srcs = [
237 "ADIS16448.cc",
238 ],
239 hdrs = [
240 "ADIS16448.h",
241 ],
242 restricted_to = ["//tools:roborio"],
243 deps = [
244 ":imu_queue",
245 ":spi_rx_clearer",
Austin Schuh45a549f2019-02-02 15:43:56 -0800246 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800247 "//aos/events:event-loop",
John Park33858a32018-09-28 23:05:48 -0700248 "//aos/logging",
249 "//aos/logging:queue_logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800250 "//aos/robot_state",
251 "//aos/time",
Brian Silverman003a4732018-03-11 14:02:15 -0700252 "//frc971/zeroing:averager",
253 "//third_party:wpilib",
254 ],
Brian Silverman5f17a972016-02-28 01:49:32 -0500255)
Brian Silvermanb5b46ca2016-03-13 01:14:17 -0500256
257cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700258 name = "dma",
259 srcs = [
260 "dma.cc",
261 ],
262 hdrs = [
263 "dma.h",
264 ],
265 restricted_to = ["//tools:roborio"],
266 deps = [
267 "//third_party:wpilib",
268 ],
269)
270
271cc_library(
272 name = "spi_rx_clearer",
273 srcs = [
274 "spi_rx_clearer.cc",
275 ],
276 hdrs = [
277 "spi_rx_clearer.h",
278 ],
279 deps = [
John Park33858a32018-09-28 23:05:48 -0700280 "//aos/logging",
Brian Silverman003a4732018-03-11 14:02:15 -0700281 ],
Brian Silvermanb5b46ca2016-03-13 01:14:17 -0500282)
Sabina Davisadc58542019-02-01 22:23:00 -0800283
284cc_library(
285 name = "sensor_reader",
286 srcs = [
287 "sensor_reader.cc",
288 ],
289 hdrs = [
Austin Schuh45a549f2019-02-02 15:43:56 -0800290 "sensor_reader.h",
Sabina Davisadc58542019-02-01 22:23:00 -0800291 ],
292 restricted_to = ["//tools:roborio"],
293 deps = [
Sabina Davis1ffa4172019-02-01 22:38:33 -0800294 ":dma",
295 ":dma_edge_counting",
Austin Schuh54667ac2019-02-02 16:44:49 -0800296 ":encoder_and_potentiometer",
Austin Schuh45a549f2019-02-02 15:43:56 -0800297 ":wpilib_interface",
298 "//aos:init",
Austin Schuhdf6cbb12019-02-02 13:46:52 -0800299 "//aos/events:event-loop",
Austin Schuh45a549f2019-02-02 15:43:56 -0800300 "//aos/stl_mutex",
301 "//aos/time",
302 "//aos/util:phased_loop",
Austin Schuh54667ac2019-02-02 16:44:49 -0800303 "//frc971/control_loops:queues",
Austin Schuh45a549f2019-02-02 15:43:56 -0800304 "//third_party:wpilib",
Sabina Davisadc58542019-02-01 22:23:00 -0800305 ],
306)
Sabina Davisd004fd62019-02-02 23:51:46 -0800307
308cc_library(
309 name = "drivetrain_writer",
310 srcs = [
311 "drivetrain_writer.cc",
312 ],
313 hdrs = [
314 "drivetrain_writer.h",
315 ],
316 restricted_to = ["//tools:roborio"],
317 deps = [
318 ":loop_output_handler",
319 "//aos:math",
320 "//aos/logging",
321 "//aos/logging:queue_logging",
322 "//frc971/control_loops/drivetrain:drivetrain_queue",
323 "//third_party:wpilib",
324 ],
325)