blob: c7a5dd72ab49a336fe3e0380e2162431af78b35f [file] [log] [blame]
Austin Schuha647d602018-02-18 14:05:15 -08001package(default_visibility = ["//visibility:public"])
Brian Silverman100534c2015-09-07 15:51:23 -04002
Austin Schuha9df9ad2021-06-16 14:49:39 -07003load("//aos:config.bzl", "aos_config")
Alex Perrycb7da4b2019-08-28 19:35:56 -07004load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
Brian Silverman100534c2015-09-07 15:51:23 -04005
6cc_library(
James Kuszmaul61750662021-06-21 21:32:33 -07007 name = "control_loop_test",
8 testonly = True,
9 srcs = [
10 "control_loop_test.cc",
11 ],
12 hdrs = [
13 "control_loop_test.h",
14 ],
15 target_compatible_with = ["@platforms//os:linux"],
16 deps = [
17 "//aos:flatbuffers",
18 "//aos:json_to_flatbuffer",
19 "//aos/events:simulated_event_loop",
20 "//aos/testing:googletest",
21 "//aos/testing:test_logging",
22 "//aos/time",
23 "//frc971/input:joystick_state_fbs",
24 "//frc971/input:robot_state_fbs",
25 ],
26)
27
28cc_library(
29 name = "polytope",
30 hdrs = [
31 "polytope.h",
32 ],
33 deps = [
34 "@org_tuxfamily_eigen//:eigen",
35 ] + select({
36 "@platforms//os:linux": [
37 "//aos/logging",
38 "//third_party/cddlib",
39 "@com_github_google_glog//:glog",
40 ],
41 "//conditions:default": [],
42 }),
43)
44
45cc_test(
46 name = "polytope_test",
47 srcs = [
48 "polytope_test.cc",
49 ],
50 target_compatible_with = ["@platforms//os:linux"],
51 deps = [
52 ":polytope",
53 "//aos/testing:googletest",
54 "//aos/testing:test_logging",
55 "@org_tuxfamily_eigen//:eigen",
56 ],
57)
58
59cc_library(
60 name = "control_loop",
61 srcs = [
62 "control_loop.cc",
63 "control_loop-tmpl.h",
64 ],
65 hdrs = [
66 "control_loop.h",
67 ],
68 target_compatible_with = ["@platforms//os:linux"],
69 deps = [
70 "//aos/events:event_loop",
71 "//aos/events:shm_event_loop",
72 "//aos/logging",
73 "//aos/time",
74 "//aos/util:log_interval",
75 "//frc971/input:joystick_state_fbs",
76 "//frc971/input:robot_state_fbs",
77 ],
78)
79
80cc_library(
81 name = "quaternion_utils",
82 srcs = [
83 "quaternion_utils.cc",
84 ],
85 hdrs = [
86 "quaternion_utils.h",
87 ],
88 target_compatible_with = ["@platforms//os:linux"],
89 deps = [
90 "@com_github_google_glog//:glog",
91 "@org_tuxfamily_eigen//:eigen",
92 ],
93)
94
95cc_test(
96 name = "quarternion_utils_test",
97 srcs = [
98 "quaternion_utils_test.cc",
99 ],
100 target_compatible_with = ["@platforms//os:linux"],
101 deps = [
milind-ue53bf552021-12-11 14:42:00 -0800102 ":jacobian",
James Kuszmaul61750662021-06-21 21:32:33 -0700103 ":quaternion_utils",
milind-ue53bf552021-12-11 14:42:00 -0800104 ":runge_kutta",
James Kuszmaul61750662021-06-21 21:32:33 -0700105 "//aos/testing:googletest",
106 "//aos/testing:random_seed",
107 "@com_github_google_glog//:glog",
108 "@org_tuxfamily_eigen//:eigen",
109 ],
110)
111
112cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800113 name = "team_number_test_environment",
114 testonly = True,
115 srcs = [
116 "team_number_test_environment.cc",
117 ],
118 hdrs = [
119 "team_number_test_environment.h",
120 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800121 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800122 deps = [
John Park33858a32018-09-28 23:05:48 -0700123 "//aos/network:team_number",
Austin Schuha647d602018-02-18 14:05:15 -0800124 "//aos/testing:googletest",
125 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400126)
127
128cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800129 name = "hybrid_state_feedback_loop_test",
130 srcs = [
131 "hybrid_state_feedback_loop_test.cc",
132 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800133 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800134 deps = [
135 ":hybrid_state_feedback_loop",
136 "//aos/testing:googletest",
137 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400138)
139
140cc_library(
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800141 name = "pose",
142 hdrs = ["pose.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800143 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800144 deps = [
145 "//aos/util:math",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700146 "@org_tuxfamily_eigen//:eigen",
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800147 ],
148)
149
150cc_test(
151 name = "pose_test",
152 srcs = ["pose_test.cc"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800153 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800154 deps = [
155 ":pose",
156 "//aos/testing:googletest",
157 ],
158)
159
160cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800161 name = "hall_effect_tracker",
162 hdrs = [
163 "hall_effect_tracker.h",
164 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800165 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800166 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700167 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800168 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400169)
170
Alex Perrycb7da4b2019-08-28 19:35:56 -0700171flatbuffer_cc_library(
172 name = "control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800173 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700174 "control_loops.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800175 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400176)
177
178cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800179 name = "position_sensor_sim_test",
180 srcs = [
181 "position_sensor_sim_test.cc",
182 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800183 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800184 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700185 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800186 ":position_sensor_sim",
John Park33858a32018-09-28 23:05:48 -0700187 "//aos/logging",
Austin Schuha647d602018-02-18 14:05:15 -0800188 "//aos/testing:googletest",
189 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400190)
191
192cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800193 name = "position_sensor_sim",
194 testonly = True,
195 srcs = [
196 "position_sensor_sim.cc",
197 ],
198 hdrs = [
199 "position_sensor_sim.h",
200 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700201 linkopts = [
202 "-lm",
203 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800204 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800205 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700206 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800207 ":gaussian_noise",
Austin Schuha647d602018-02-18 14:05:15 -0800208 "//aos/testing:random_seed",
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800209 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400210)
211
212cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800213 name = "gaussian_noise",
214 srcs = [
215 "gaussian_noise.cc",
216 ],
217 hdrs = [
218 "gaussian_noise.h",
219 ],
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800220 linkopts = [
221 "-lm",
Austin Schuha647d602018-02-18 14:05:15 -0800222 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800223 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhbcce26a2018-03-26 23:41:24 -0700224)
225
226cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800227 name = "coerce_goal",
228 srcs = [
229 "coerce_goal.cc",
230 ],
231 hdrs = [
232 "coerce_goal.h",
233 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800234 linkopts = select({
235 "@platforms//os:linux": ["-lm"],
236 "//conditions:default": [],
237 }),
Austin Schuha647d602018-02-18 14:05:15 -0800238 deps = [
James Kuszmaul61750662021-06-21 21:32:33 -0700239 "//frc971/control_loops:polytope",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700240 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800241 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400242)
243
Lee Mracek65686142020-01-10 22:21:39 -0500244cc_test(
245 name = "coerce_goal_test",
246 srcs = [
247 "coerce_goal_test.cc",
248 ],
249 linkopts = [
250 "-lm",
251 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800252 target_compatible_with = ["@platforms//os:linux"],
Lee Mracek65686142020-01-10 22:21:39 -0500253 deps = [
254 ":coerce_goal",
Lee Mracek65686142020-01-10 22:21:39 -0500255 "//aos/testing:googletest",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700256 "//frc971/control_loops:polytope",
Lee Mracek65686142020-01-10 22:21:39 -0500257 "@org_tuxfamily_eigen//:eigen",
258 ],
259)
260
Austin Schuh4cc4fe22017-11-23 19:13:09 -0800261cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800262 name = "state_feedback_loop",
263 hdrs = [
264 "state_feedback_loop.h",
265 ],
266 deps = [
John Park33858a32018-09-28 23:05:48 -0700267 "//aos:macros",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700268 "@org_tuxfamily_eigen//:eigen",
Philipp Schraderdada1072020-11-24 11:34:46 -0800269 ] + select({
270 "@platforms//os:linux": ["//aos/logging"],
271 "//conditions:default": [],
272 }),
Brian Silverman100534c2015-09-07 15:51:23 -0400273)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500274
275cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800276 name = "hybrid_state_feedback_loop",
277 hdrs = [
278 "hybrid_state_feedback_loop.h",
279 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800280 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800281 deps = [
Austin Schuh9b881ae2019-01-04 07:29:20 +1100282 ":c2d",
Austin Schuha647d602018-02-18 14:05:15 -0800283 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700284 "//aos:macros",
John Park33858a32018-09-28 23:05:48 -0700285 "//aos/logging",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700286 "//frc971/control_loops:control_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700287 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800288 ],
Brian Silverman2b1957a2016-02-14 20:29:57 -0500289)
Austin Schuhacd335a2017-01-01 16:20:54 -0800290
291cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800292 name = "simple_capped_state_feedback_loop",
293 hdrs = [
294 "simple_capped_state_feedback_loop.h",
295 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800296 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800297 deps = [
298 ":state_feedback_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700299 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800300 ],
301)
302
303cc_library(
304 name = "runge_kutta",
305 hdrs = [
306 "runge_kutta.h",
307 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800308 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800309 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700310 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800311 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800312)
313
314cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800315 name = "runge_kutta_test",
316 srcs = [
317 "runge_kutta_test.cc",
318 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800319 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800320 deps = [
321 ":runge_kutta",
322 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700323 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800324 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800325)
Austin Schuh473a5652017-02-05 01:30:42 -0800326
Austin Schuh173a1592018-12-19 16:20:54 +1100327cc_library(
328 name = "fixed_quadrature",
329 hdrs = [
330 "fixed_quadrature.h",
331 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800332 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100333)
334
335cc_test(
336 name = "fixed_quadrature_test",
337 srcs = [
338 "fixed_quadrature_test.cc",
339 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800340 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100341 deps = [
342 ":fixed_quadrature",
343 "//aos/testing:googletest",
344 ],
345)
346
Alex Perrycb7da4b2019-08-28 19:35:56 -0700347flatbuffer_cc_library(
348 name = "profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800349 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700350 "profiled_subsystem.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800351 ],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700352 includes = [
353 ":control_loops_fbs_includes",
Austin Schuh9fe68f72019-08-10 19:32:03 -0700354 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800355 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9fe68f72019-08-10 19:32:03 -0700356)
357
Austin Schuh473a5652017-02-05 01:30:42 -0800358cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800359 name = "profiled_subsystem",
360 srcs = [
361 "profiled_subsystem.cc",
362 ],
363 hdrs = [
364 "profiled_subsystem.h",
365 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800366 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800367 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700368 ":control_loops_fbs",
369 ":profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800370 ":simple_capped_state_feedback_loop",
371 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700372 "//aos/util:trapezoid_profile",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700373 "//frc971/control_loops:control_loop",
Austin Schuha647d602018-02-18 14:05:15 -0800374 "//frc971/zeroing",
375 ],
Austin Schuh473a5652017-02-05 01:30:42 -0800376)
Austin Schuha647d602018-02-18 14:05:15 -0800377
378cc_library(
379 name = "jacobian",
380 hdrs = [
381 "jacobian.h",
382 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800383 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800384 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700385 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800386 ],
387)
388
389cc_test(
390 name = "jacobian_test",
391 srcs = [
392 "jacobian_test.cc",
393 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800394 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800395 deps = [
396 ":jacobian",
397 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700398 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800399 ],
400)
401
James Kuszmaul59a5c612019-01-22 07:56:08 -0800402cc_test(
403 name = "c2d_test",
404 srcs = [
405 "c2d_test.cc",
406 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800407 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul59a5c612019-01-22 07:56:08 -0800408 visibility = ["//visibility:public"],
409 deps = [
410 ":c2d",
411 ":runge_kutta",
412 "//aos/testing:googletest",
413 ],
414)
415
Austin Schuh03785132018-02-19 18:29:06 -0800416cc_library(
Austin Schuh9b881ae2019-01-04 07:29:20 +1100417 name = "c2d",
418 hdrs = [
419 "c2d.h",
420 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800421 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9b881ae2019-01-04 07:29:20 +1100422 visibility = ["//visibility:public"],
423 deps = [
James Kuszmaul651fc3f2019-05-15 21:14:25 -0700424 "//aos/time",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700425 "@org_tuxfamily_eigen//:eigen",
Austin Schuh9b881ae2019-01-04 07:29:20 +1100426 ],
427)
428
429cc_library(
Austin Schuh03785132018-02-19 18:29:06 -0800430 name = "dlqr",
431 hdrs = [
432 "dlqr.h",
433 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800434 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh03785132018-02-19 18:29:06 -0800435 visibility = ["//visibility:public"],
436 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700437 "@org_tuxfamily_eigen//:eigen",
Austin Schuh03785132018-02-19 18:29:06 -0800438 "@slycot_repo//:slicot",
439 ],
440)
Brian Silverman6470f442018-08-05 12:08:16 -0700441
442py_library(
443 name = "python_init",
444 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800445 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700446 visibility = ["//visibility:public"],
447 deps = ["//frc971:python_init"],
448)
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800449
450cc_library(
451 name = "binomial",
452 hdrs = ["binomial.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800453 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800454)
455
456cc_test(
457 name = "binomial_test",
458 srcs = [
459 "binomial_test.cc",
460 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800461 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800462 deps = [
463 ":binomial",
464 "//aos/testing:googletest",
465 ],
466)
Tyler Chatow12581562019-01-26 20:42:42 -0800467
468cc_library(
469 name = "capped_test_plant",
470 testonly = True,
471 srcs = [
472 "capped_test_plant.cc",
473 ],
474 hdrs = [
475 "capped_test_plant.h",
476 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800477 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800478 deps = [
479 ":state_feedback_loop",
480 "//aos/testing:googletest",
481 ],
482)
483
484cc_library(
485 name = "static_zeroing_single_dof_profiled_subsystem",
Tyler Chatow12581562019-01-26 20:42:42 -0800486 hdrs = [
487 "static_zeroing_single_dof_profiled_subsystem.h",
488 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800489 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800490 deps = [
491 "//frc971/control_loops:profiled_subsystem",
492 ],
493)
494
495genrule(
496 name = "genrule_static_zeroing_single_dof_profiled_subsystem_test",
497 outs = [
498 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
499 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
500 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
501 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
502 ],
503 cmd = "$(location //frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test) $(OUTS)",
Philipp Schraderdada1072020-11-24 11:34:46 -0800504 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800505 tools = [
506 "//frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test",
507 ],
508)
509
510cc_library(
511 name = "static_zeroing_single_dof_profiled_subsystem_test_plants",
512 srcs = [
513 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
514 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
515 ],
516 hdrs = [
517 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
518 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
519 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800520 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800521 deps = [
522 ":state_feedback_loop",
523 ],
524)
525
Alex Perrycb7da4b2019-08-28 19:35:56 -0700526flatbuffer_cc_library(
Austin Schuha9df9ad2021-06-16 14:49:39 -0700527 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700528 srcs = [
Austin Schuha9df9ad2021-06-16 14:49:39 -0700529 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal.fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700530 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700531 gen_reflections = 1,
532 includes = [
533 ":control_loops_fbs_includes",
534 ":profiled_subsystem_fbs_includes",
535 ],
536 target_compatible_with = ["@platforms//os:linux"],
537)
538
539flatbuffer_cc_library(
540 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
541 srcs = [
542 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output.fbs",
543 ],
544 gen_reflections = 1,
545 target_compatible_with = ["@platforms//os:linux"],
546)
547
548flatbuffer_cc_library(
549 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
550 srcs = [
551 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position.fbs",
552 ],
553 gen_reflections = 1,
554 includes = [
555 ":control_loops_fbs_includes",
556 ],
557 target_compatible_with = ["@platforms//os:linux"],
558)
559
560flatbuffer_cc_library(
561 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
562 srcs = [
563 "static_zeroing_single_dof_profiled_subsystem_test_absolute_position.fbs",
564 ],
565 gen_reflections = 1,
566 includes = [
567 ":control_loops_fbs_includes",
568 ],
569 target_compatible_with = ["@platforms//os:linux"],
570)
571
572flatbuffer_cc_library(
573 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
574 srcs = [
575 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status.fbs",
576 ],
577 gen_reflections = 1,
578 includes = [
579 ":control_loops_fbs_includes",
580 ":profiled_subsystem_fbs_includes",
581 ],
582 target_compatible_with = ["@platforms//os:linux"],
583)
584
585flatbuffer_cc_library(
586 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
587 srcs = [
588 "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status.fbs",
589 ],
590 gen_reflections = 1,
Alex Perrycb7da4b2019-08-28 19:35:56 -0700591 includes = [
592 ":control_loops_fbs_includes",
593 ":profiled_subsystem_fbs_includes",
594 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800595 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700596)
597
Tyler Chatow12581562019-01-26 20:42:42 -0800598cc_test(
599 name = "static_zeroing_single_dof_profiled_subsystem_test",
600 srcs = [
601 "static_zeroing_single_dof_profiled_subsystem_test.cc",
602 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700603 data = [
604 ":static_zeroing_single_dof_profiled_subsystem_test_config",
605 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800606 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800607 deps = [
608 ":capped_test_plant",
609 ":position_sensor_sim",
610 ":static_zeroing_single_dof_profiled_subsystem",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700611 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
612 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
Tyler Chatow12581562019-01-26 20:42:42 -0800613 ":static_zeroing_single_dof_profiled_subsystem_test_plants",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700614 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
615 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
616 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
617 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
Tyler Chatow12581562019-01-26 20:42:42 -0800618 "//aos/testing:googletest",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700619 "//frc971/control_loops:control_loop_test",
Tyler Chatow12581562019-01-26 20:42:42 -0800620 ],
621)
Austin Schuha9df9ad2021-06-16 14:49:39 -0700622
623aos_config(
624 name = "static_zeroing_single_dof_profiled_subsystem_test_config",
625 src = "static_zeroing_single_dof_profiled_subsystem_test_config_source.json",
626 flatbuffers = [
627 "//frc971/input:joystick_state_fbs",
628 "//frc971/input:robot_state_fbs",
629 "//aos/logging:log_message_fbs",
630 "//aos/events:event_loop_fbs",
631 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
632 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
633 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
634 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
635 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
636 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
637 ],
638 target_compatible_with = ["@platforms//os:linux"],
639)