blob: ca3dd0cd8a25c3dc4b1e8dc82a28ee4e0a4d2bcc [file] [log] [blame]
Philipp Schrader3de4dfc2023-02-15 20:18:25 -08001load("//tools/build_rules:js.bzl", "ts_project")
Austin Schuha1d006e2022-09-14 21:50:42 -07002load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
3load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
Austin Schuh00be38c2019-12-01 18:08:25 -08004load("//aos:config.bzl", "aos_config")
Brian Silverman100534c2015-09-07 15:51:23 -04005
Philipp Schradercc016b32021-12-30 08:59:58 -08006package(default_visibility = ["//visibility:public"])
7
Alex Perrycb7da4b2019-08-28 19:35:56 -07008flatbuffer_cc_library(
9 name = "logging_fbs",
Brian Silverman003a4732018-03-11 14:02:15 -070010 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070011 "logging.fbs",
Brian Silverman003a4732018-03-11 14:02:15 -070012 ],
Austin Schuhed5b26d2019-12-05 20:51:59 -080013 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080014 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman100534c2015-09-07 15:51:23 -040015)
16
17cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070018 name = "encoder_and_potentiometer",
19 srcs = [
20 "encoder_and_potentiometer.cc",
21 ],
22 hdrs = [
23 "encoder_and_potentiometer.h",
24 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080025 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -070026 deps = [
27 ":dma",
28 ":dma_edge_counting",
John Park398c74a2018-10-20 21:17:39 -070029 "//aos:init",
Austin Schuh45a549f2019-02-02 15:43:56 -080030 "//aos/logging",
Brian Silverman003a4732018-03-11 14:02:15 -070031 "//third_party:wpilib",
32 ],
Brian Silverman100534c2015-09-07 15:51:23 -040033)
34
35cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070036 name = "dma_edge_counting",
37 srcs = [
38 "dma_edge_counting.cc",
39 ],
40 hdrs = [
41 "dma_edge_counting.h",
42 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080043 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -070044 deps = [
45 ":dma",
Austin Schuhb1aaefe2021-10-12 22:05:44 -070046 "//aos/containers:sized_array",
John Park33858a32018-09-28 23:05:48 -070047 "//aos/logging",
Brian Silverman003a4732018-03-11 14:02:15 -070048 "//third_party:wpilib",
49 ],
Brian Silverman100534c2015-09-07 15:51:23 -040050)
51
52cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070053 name = "interrupt_edge_counting",
54 srcs = [
55 "interrupt_edge_counting.cc",
56 ],
57 hdrs = [
58 "interrupt_edge_counting.h",
59 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080060 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -070061 deps = [
John Park398c74a2018-10-20 21:17:39 -070062 "//aos:init",
Austin Schuh45a549f2019-02-02 15:43:56 -080063 "//aos/logging",
64 "//aos/stl_mutex",
65 "//aos/time",
Brian Silverman003a4732018-03-11 14:02:15 -070066 "//third_party:wpilib",
67 ],
Brian Silverman100534c2015-09-07 15:51:23 -040068)
69
70cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070071 name = "buffered_pcm",
72 srcs = [
73 "buffered_pcm.cc",
74 "buffered_solenoid.cc",
75 ],
76 hdrs = [
77 "buffered_pcm.h",
78 "buffered_solenoid.h",
79 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080080 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -070081 deps = [
John Park33858a32018-09-28 23:05:48 -070082 "//aos/logging",
Brian Silverman003a4732018-03-11 14:02:15 -070083 "//third_party:wpilib",
84 ],
Brian Silverman100534c2015-09-07 15:51:23 -040085)
86
87cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -070088 name = "gyro_interface",
89 srcs = [
90 "gyro_interface.cc",
91 ],
92 hdrs = [
93 "gyro_interface.h",
94 ],
Brian Silverman7be68ba2020-01-08 22:08:40 -080095 # This library uses some deprecated parts of the SPI API.
96 copts = ["-Wno-deprecated-declarations"],
Philipp Schraderdada1072020-11-24 11:34:46 -080097 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -070098 deps = [
John Park33858a32018-09-28 23:05:48 -070099 "//aos/logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800100 "//aos/time",
Brian Silverman003a4732018-03-11 14:02:15 -0700101 "//third_party:wpilib",
102 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400103)
104
105cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700106 name = "gyro_sender",
107 srcs = [
108 "gyro_sender.cc",
109 ],
110 hdrs = [
111 "gyro_sender.h",
112 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800113 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -0700114 deps = [
115 ":gyro_interface",
Austin Schuh45a549f2019-02-02 15:43:56 -0800116 "//aos:init",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700117 "//aos/events:event_loop",
Austin Schuh217a9782019-12-21 23:02:50 -0800118 "//aos/events:shm_event_loop",
John Park33858a32018-09-28 23:05:48 -0700119 "//aos/logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800120 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700121 "//aos/util:phased_loop",
Austin Schuhdd7ded62021-06-20 14:35:56 -0700122 "//frc971/input:robot_state_fbs",
Tyler Chatow24b5db12020-01-06 21:16:56 -0800123 "//frc971/queues:gyro_fbs",
124 "//frc971/queues:gyro_uid_fbs",
Brian Silverman003a4732018-03-11 14:02:15 -0700125 "//frc971/zeroing:averager",
126 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400127)
128
Alex Perrycb7da4b2019-08-28 19:35:56 -0700129flatbuffer_cc_library(
130 name = "loop_output_handler_test_fbs",
Austin Schuhbd1fe9c2019-06-29 16:35:48 -0700131 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700132 "loop_output_handler_test.fbs",
Austin Schuhbd1fe9c2019-06-29 16:35:48 -0700133 ],
Austin Schuh00be38c2019-12-01 18:08:25 -0800134 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800135 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh00be38c2019-12-01 18:08:25 -0800136)
137
138aos_config(
Austin Schuhc5fa6d92022-02-25 14:36:28 -0800139 name = "aos_config",
Austin Schuhed5b26d2019-12-05 20:51:59 -0800140 src = "wpilib_config.json",
141 flatbuffers = [
142 ":pdp_values_fbs",
143 ":logging_fbs",
144 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800145 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhed5b26d2019-12-05 20:51:59 -0800146)
147
148aos_config(
Austin Schuh00be38c2019-12-01 18:08:25 -0800149 name = "loop_output_handler_test_config",
150 src = "loop_output_handler_test_config_source.json",
151 flatbuffers = [
152 ":loop_output_handler_test_fbs",
153 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800154 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh39788ff2019-12-01 18:22:57 -0800155 deps = [
Austin Schuhc5fa6d92022-02-25 14:36:28 -0800156 "//aos/events:aos_config",
Austin Schuh39788ff2019-12-01 18:22:57 -0800157 ],
Austin Schuhbd1fe9c2019-06-29 16:35:48 -0700158)
159
Brian Silverman100534c2015-09-07 15:51:23 -0400160cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700161 name = "loop_output_handler",
162 srcs = [
163 "loop_output_handler.cc",
164 ],
165 hdrs = [
166 "loop_output_handler.h",
167 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800168 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman003a4732018-03-11 14:02:15 -0700169 deps = [
John Park398c74a2018-10-20 21:17:39 -0700170 "//aos:init",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700171 "//aos/events:event_loop",
Austin Schuh45a549f2019-02-02 15:43:56 -0800172 "//aos/scoped:scoped_fd",
173 "//aos/time",
174 "//aos/util:log_interval",
Austin Schuhdd7ded62021-06-20 14:35:56 -0700175 "//frc971/input:robot_state_fbs",
Brian Silverman003a4732018-03-11 14:02:15 -0700176 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400177)
178
Austin Schuhbd1fe9c2019-06-29 16:35:48 -0700179cc_test(
180 name = "loop_output_handler_test",
181 srcs = [
182 "loop_output_handler_test.cc",
183 ],
Austin Schuh00be38c2019-12-01 18:08:25 -0800184 data = [
Austin Schuh14d7d3d2020-09-10 18:14:36 -0700185 ":loop_output_handler_test_config",
Austin Schuh00be38c2019-12-01 18:08:25 -0800186 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800187 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhbd1fe9c2019-06-29 16:35:48 -0700188 deps = [
189 ":loop_output_handler",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700190 ":loop_output_handler_test_fbs",
Austin Schuhbd1fe9c2019-06-29 16:35:48 -0700191 "//aos/events:simulated_event_loop",
Austin Schuhbd1fe9c2019-06-29 16:35:48 -0700192 "//aos/testing:googletest",
193 "//aos/testing:test_logging",
194 ],
195)
196
Brian Silverman100534c2015-09-07 15:51:23 -0400197cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700198 name = "joystick_sender",
199 srcs = [
200 "joystick_sender.cc",
201 ],
202 hdrs = [
203 "joystick_sender.h",
204 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800205 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -0700206 deps = [
John Park398c74a2018-10-20 21:17:39 -0700207 "//aos:init",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700208 "//aos/events:shm_event_loop",
Austin Schuh45a549f2019-02-02 15:43:56 -0800209 "//aos/network:team_number",
Austin Schuhdd7ded62021-06-20 14:35:56 -0700210 "//frc971/input:driver_station_data",
James Kuszmaul7077d342021-06-09 20:23:58 -0700211 "//frc971/input:joystick_state_fbs",
Brian Silverman003a4732018-03-11 14:02:15 -0700212 "//third_party:wpilib",
213 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400214)
Brian Silverman811f8ec2015-12-06 01:29:42 -0500215
216cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700217 name = "wpilib_interface",
218 srcs = [
219 "wpilib_interface.cc",
220 ],
221 hdrs = [
222 "wpilib_interface.h",
223 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800224 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -0700225 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700226 "//aos/events:event_loop",
James Kuszmaul7077d342021-06-09 20:23:58 -0700227 "//frc971/input:robot_state_fbs",
Brian Silverman003a4732018-03-11 14:02:15 -0700228 "//third_party:wpilib",
229 ],
Brian Silverman39b339e2016-01-03 13:24:22 -0800230)
231
Alex Perrycb7da4b2019-08-28 19:35:56 -0700232flatbuffer_cc_library(
Austin Schuhed5b26d2019-12-05 20:51:59 -0800233 name = "pdp_values_fbs",
Brian Silverman003a4732018-03-11 14:02:15 -0700234 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700235 "pdp_values.fbs",
Brian Silverman003a4732018-03-11 14:02:15 -0700236 ],
Austin Schuhed5b26d2019-12-05 20:51:59 -0800237 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800238 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman425492b2015-12-30 15:23:55 -0800239)
240
241cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700242 name = "pdp_fetcher",
243 srcs = [
244 "pdp_fetcher.cc",
245 ],
246 hdrs = [
247 "pdp_fetcher.h",
248 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800249 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -0700250 deps = [
Austin Schuhed5b26d2019-12-05 20:51:59 -0800251 ":pdp_values_fbs",
Austin Schuh45a549f2019-02-02 15:43:56 -0800252 "//aos:init",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700253 "//aos/events:event_loop",
Austin Schuh217a9782019-12-21 23:02:50 -0800254 "//aos/events:shm_event_loop",
John Park33858a32018-09-28 23:05:48 -0700255 "//aos/util:phased_loop",
Brian Silverman003a4732018-03-11 14:02:15 -0700256 "//third_party:wpilib",
257 ],
Brian Silverman811f8ec2015-12-06 01:29:42 -0500258)
Campbell Crowleyc0cfb132015-12-30 20:58:02 -0800259
260cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700261 name = "wpilib_robot_base",
262 hdrs = [
263 "wpilib_robot_base.h",
264 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800265 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -0700266 deps = [
267 "//third_party:wpilib",
268 ],
Campbell Crowleyc0cfb132015-12-30 20:58:02 -0800269)
Brian Silverman5f17a972016-02-28 01:49:32 -0500270
Alex Perrycb7da4b2019-08-28 19:35:56 -0700271flatbuffer_cc_library(
272 name = "imu_fbs",
Brian Silverman003a4732018-03-11 14:02:15 -0700273 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700274 "imu.fbs",
Brian Silverman003a4732018-03-11 14:02:15 -0700275 ],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700276 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -0800277 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman5f17a972016-02-28 01:49:32 -0500278)
279
Austin Schuhac17fba2020-03-28 15:55:33 -0700280flatbuffer_cc_library(
281 name = "imu_batch_fbs",
282 srcs = [
283 "imu_batch.fbs",
284 ],
285 gen_reflections = 1,
286 includes = [
287 ":imu_fbs_includes",
288 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800289 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhac17fba2020-03-28 15:55:33 -0700290)
291
James Kuszmaul5f5e1232020-12-22 20:58:00 -0800292flatbuffer_ts_library(
James Kuszmauldac091f2022-03-22 09:35:06 -0700293 name = "imu_ts_fbs",
294 srcs = ["imu.fbs"],
295)
296
297flatbuffer_ts_library(
James Kuszmaul5f5e1232020-12-22 20:58:00 -0800298 name = "imu_batch_ts_fbs",
299 srcs = ["imu_batch.fbs"],
James Kuszmauldac091f2022-03-22 09:35:06 -0700300 deps = [
301 ":imu_ts_fbs",
James Kuszmaul5f5e1232020-12-22 20:58:00 -0800302 ],
James Kuszmaul5f5e1232020-12-22 20:58:00 -0800303)
304
Brian Silverman5f17a972016-02-28 01:49:32 -0500305cc_library(
Brian Silverman7be68ba2020-01-08 22:08:40 -0800306 name = "ADIS16470",
307 srcs = [
308 "ADIS16470.cc",
309 ],
310 hdrs = [
311 "ADIS16470.h",
312 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800313 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman7be68ba2020-01-08 22:08:40 -0800314 deps = [
315 ":fpga_time_conversion",
Austin Schuhac17fba2020-03-28 15:55:33 -0700316 ":imu_batch_fbs",
Brian Silverman7be68ba2020-01-08 22:08:40 -0800317 ":imu_fbs",
Austin Schuhac17fba2020-03-28 15:55:33 -0700318 "//aos/containers:sized_array",
Brian Silverman7be68ba2020-01-08 22:08:40 -0800319 "//aos/events:event_loop",
320 "//aos/time",
321 "//third_party:wpilib",
322 "@com_github_google_glog//:glog",
323 "@com_google_absl//absl/types:span",
324 ],
325)
326
327cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700328 name = "ADIS16448",
329 srcs = [
330 "ADIS16448.cc",
331 ],
332 hdrs = [
333 "ADIS16448.h",
334 ],
Brian Silverman7be68ba2020-01-08 22:08:40 -0800335 # This library uses some deprecated parts of the SPI API.
336 copts = ["-Wno-deprecated-declarations"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800337 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -0700338 deps = [
Brian Silverman7be68ba2020-01-08 22:08:40 -0800339 ":fpga_time_conversion",
Austin Schuhdd7ded62021-06-20 14:35:56 -0700340 ":imu_batch_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700341 ":imu_fbs",
Brian Silverman003a4732018-03-11 14:02:15 -0700342 ":spi_rx_clearer",
Austin Schuh45a549f2019-02-02 15:43:56 -0800343 "//aos:init",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700344 "//aos/events:event_loop",
Austin Schuh217a9782019-12-21 23:02:50 -0800345 "//aos/events:shm_event_loop",
John Park33858a32018-09-28 23:05:48 -0700346 "//aos/logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800347 "//aos/time",
Brian Silverman003a4732018-03-11 14:02:15 -0700348 "//frc971/zeroing:averager",
349 "//third_party:wpilib",
350 ],
Brian Silverman5f17a972016-02-28 01:49:32 -0500351)
Brian Silvermanb5b46ca2016-03-13 01:14:17 -0500352
353cc_library(
Brian Silverman003a4732018-03-11 14:02:15 -0700354 name = "dma",
355 srcs = [
356 "dma.cc",
357 ],
358 hdrs = [
359 "dma.h",
360 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800361 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman003a4732018-03-11 14:02:15 -0700362 deps = [
363 "//third_party:wpilib",
364 ],
365)
366
367cc_library(
368 name = "spi_rx_clearer",
369 srcs = [
370 "spi_rx_clearer.cc",
371 ],
372 hdrs = [
373 "spi_rx_clearer.h",
374 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800375 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman003a4732018-03-11 14:02:15 -0700376 deps = [
John Park33858a32018-09-28 23:05:48 -0700377 "//aos/logging",
Brian Silverman003a4732018-03-11 14:02:15 -0700378 ],
Brian Silvermanb5b46ca2016-03-13 01:14:17 -0500379)
Sabina Davisadc58542019-02-01 22:23:00 -0800380
381cc_library(
382 name = "sensor_reader",
383 srcs = [
384 "sensor_reader.cc",
385 ],
386 hdrs = [
Austin Schuh45a549f2019-02-02 15:43:56 -0800387 "sensor_reader.h",
Sabina Davisadc58542019-02-01 22:23:00 -0800388 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800389 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Sabina Davisadc58542019-02-01 22:23:00 -0800390 deps = [
Sabina Davis1ffa4172019-02-01 22:38:33 -0800391 ":dma",
392 ":dma_edge_counting",
Austin Schuh54667ac2019-02-02 16:44:49 -0800393 ":encoder_and_potentiometer",
Brian Silverman7be68ba2020-01-08 22:08:40 -0800394 ":fpga_time_conversion",
Austin Schuh45a549f2019-02-02 15:43:56 -0800395 ":wpilib_interface",
396 "//aos:init",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700397 "//aos/events:event_loop",
Austin Schuh217a9782019-12-21 23:02:50 -0800398 "//aos/events:shm_event_loop",
Austin Schuha0c41ba2020-09-10 22:59:14 -0700399 "//aos/logging",
Austin Schuh45a549f2019-02-02 15:43:56 -0800400 "//aos/stl_mutex",
401 "//aos/time",
402 "//aos/util:phased_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700403 "//frc971/control_loops:control_loops_fbs",
Austin Schuh45a549f2019-02-02 15:43:56 -0800404 "//third_party:wpilib",
Sabina Davisadc58542019-02-01 22:23:00 -0800405 ],
406)
Sabina Davisd004fd62019-02-02 23:51:46 -0800407
408cc_library(
409 name = "drivetrain_writer",
410 srcs = [
411 "drivetrain_writer.cc",
412 ],
413 hdrs = [
414 "drivetrain_writer.h",
415 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800416 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Sabina Davisd004fd62019-02-02 23:51:46 -0800417 deps = [
418 ":loop_output_handler",
419 "//aos:math",
420 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700421 "//frc971/control_loops/drivetrain:drivetrain_output_fbs",
Sabina Davisd004fd62019-02-02 23:51:46 -0800422 "//third_party:wpilib",
423 ],
424)
Brian Silverman7be68ba2020-01-08 22:08:40 -0800425
426cc_library(
427 name = "fpga_time_conversion",
428 srcs = [
429 "fpga_time_conversion.cc",
430 ],
431 hdrs = [
432 "fpga_time_conversion.h",
433 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800434 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman7be68ba2020-01-08 22:08:40 -0800435 deps = [
436 "//aos/time",
437 "//aos/util:compiler_memory_barrier",
438 "//third_party:wpilib",
439 "@com_github_google_glog//:glog",
440 ],
441)
James Kuszmaul5f5e1232020-12-22 20:58:00 -0800442
Nathan Leong217cd762022-10-22 16:07:30 -0700443cc_library(
444 name = "wpilib_utils",
445 srcs = [
446 "wpilib_utils.cc",
447 ],
448 hdrs = [
449 "wpilib_utils.h",
450 ],
451 target_compatible_with = ["@platforms//os:linux"],
452 deps = [
453 "//frc971:constants",
454 ],
455)
456
457cc_test(
458 name = "wpilib_utils_test",
459 srcs = [
460 "wpilib_utils_test.cc",
461 ],
462 data = [
463 ],
464 target_compatible_with = ["@platforms//os:linux"],
465 deps = [
466 "//aos/testing:flatbuffer_eq",
467 "//aos/testing:test_logging",
468 "//frc971/wpilib:wpilib_utils",
469 ],
470)
471
Philipp Schrader3de4dfc2023-02-15 20:18:25 -0800472ts_project(
James Kuszmaul5f5e1232020-12-22 20:58:00 -0800473 name = "imu_plot_utils",
474 srcs = ["imu_plot_utils.ts"],
475 target_compatible_with = ["@platforms//os:linux"],
476 deps = [
477 ":imu_batch_ts_fbs",
478 "//aos:configuration_ts_fbs",
479 "//aos/network/www:aos_plotter",
James Kuszmaul0d7df892021-04-09 22:19:49 -0700480 "//aos/network/www:plotter",
James Kuszmaul5f5e1232020-12-22 20:58:00 -0800481 "//aos/network/www:reflection_ts",
James Kuszmauldac091f2022-03-22 09:35:06 -0700482 "@com_github_google_flatbuffers//reflection:reflection_ts_fbs",
James Kuszmaul5f5e1232020-12-22 20:58:00 -0800483 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
484 ],
485)
486
Philipp Schrader3de4dfc2023-02-15 20:18:25 -0800487ts_project(
James Kuszmaul5f5e1232020-12-22 20:58:00 -0800488 name = "imu_plotter",
489 srcs = ["imu_plotter.ts"],
490 target_compatible_with = ["@platforms//os:linux"],
491 deps = [
492 ":imu_plot_utils",
493 "//aos/network/www:aos_plotter",
494 "//aos/network/www:proxy",
495 ],
496)