blob: 3341402cf54c21714cfaf15389a5f1e964ee8883 [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 = [
102 ":quaternion_utils",
103 "//aos/testing:googletest",
104 "//aos/testing:random_seed",
105 "@com_github_google_glog//:glog",
106 "@org_tuxfamily_eigen//:eigen",
107 ],
108)
109
110cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800111 name = "team_number_test_environment",
112 testonly = True,
113 srcs = [
114 "team_number_test_environment.cc",
115 ],
116 hdrs = [
117 "team_number_test_environment.h",
118 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800119 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800120 deps = [
John Park33858a32018-09-28 23:05:48 -0700121 "//aos/network:team_number",
Austin Schuha647d602018-02-18 14:05:15 -0800122 "//aos/testing:googletest",
123 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400124)
125
126cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800127 name = "hybrid_state_feedback_loop_test",
128 srcs = [
129 "hybrid_state_feedback_loop_test.cc",
130 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800131 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800132 deps = [
133 ":hybrid_state_feedback_loop",
134 "//aos/testing:googletest",
135 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400136)
137
138cc_library(
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800139 name = "pose",
140 hdrs = ["pose.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800141 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800142 deps = [
143 "//aos/util:math",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700144 "@org_tuxfamily_eigen//:eigen",
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800145 ],
146)
147
148cc_test(
149 name = "pose_test",
150 srcs = ["pose_test.cc"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800151 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800152 deps = [
153 ":pose",
154 "//aos/testing:googletest",
155 ],
156)
157
158cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800159 name = "hall_effect_tracker",
160 hdrs = [
161 "hall_effect_tracker.h",
162 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800163 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800164 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700165 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800166 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400167)
168
Alex Perrycb7da4b2019-08-28 19:35:56 -0700169flatbuffer_cc_library(
170 name = "control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800171 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700172 "control_loops.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800173 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400174)
175
176cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800177 name = "position_sensor_sim_test",
178 srcs = [
179 "position_sensor_sim_test.cc",
180 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800181 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800182 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700183 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800184 ":position_sensor_sim",
John Park33858a32018-09-28 23:05:48 -0700185 "//aos/logging",
Austin Schuha647d602018-02-18 14:05:15 -0800186 "//aos/testing:googletest",
187 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400188)
189
190cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800191 name = "position_sensor_sim",
192 testonly = True,
193 srcs = [
194 "position_sensor_sim.cc",
195 ],
196 hdrs = [
197 "position_sensor_sim.h",
198 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700199 linkopts = [
200 "-lm",
201 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800202 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800203 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700204 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800205 ":gaussian_noise",
Austin Schuha647d602018-02-18 14:05:15 -0800206 "//aos/testing:random_seed",
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800207 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400208)
209
210cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800211 name = "gaussian_noise",
212 srcs = [
213 "gaussian_noise.cc",
214 ],
215 hdrs = [
216 "gaussian_noise.h",
217 ],
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800218 linkopts = [
219 "-lm",
Austin Schuha647d602018-02-18 14:05:15 -0800220 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800221 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhbcce26a2018-03-26 23:41:24 -0700222)
223
224cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800225 name = "coerce_goal",
226 srcs = [
227 "coerce_goal.cc",
228 ],
229 hdrs = [
230 "coerce_goal.h",
231 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800232 linkopts = select({
233 "@platforms//os:linux": ["-lm"],
234 "//conditions:default": [],
235 }),
Austin Schuha647d602018-02-18 14:05:15 -0800236 deps = [
James Kuszmaul61750662021-06-21 21:32:33 -0700237 "//frc971/control_loops:polytope",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700238 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800239 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400240)
241
Lee Mracek65686142020-01-10 22:21:39 -0500242cc_test(
243 name = "coerce_goal_test",
244 srcs = [
245 "coerce_goal_test.cc",
246 ],
247 linkopts = [
248 "-lm",
249 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800250 target_compatible_with = ["@platforms//os:linux"],
Lee Mracek65686142020-01-10 22:21:39 -0500251 deps = [
252 ":coerce_goal",
James Kuszmaul61750662021-06-21 21:32:33 -0700253 "//frc971/control_loops:polytope",
Lee Mracek65686142020-01-10 22:21:39 -0500254 "//aos/testing:googletest",
255 "@org_tuxfamily_eigen//:eigen",
256 ],
257)
258
Austin Schuh4cc4fe22017-11-23 19:13:09 -0800259cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800260 name = "state_feedback_loop",
261 hdrs = [
262 "state_feedback_loop.h",
263 ],
264 deps = [
John Park33858a32018-09-28 23:05:48 -0700265 "//aos:macros",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700266 "@org_tuxfamily_eigen//:eigen",
Philipp Schraderdada1072020-11-24 11:34:46 -0800267 ] + select({
268 "@platforms//os:linux": ["//aos/logging"],
269 "//conditions:default": [],
270 }),
Brian Silverman100534c2015-09-07 15:51:23 -0400271)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500272
273cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800274 name = "hybrid_state_feedback_loop",
275 hdrs = [
276 "hybrid_state_feedback_loop.h",
277 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800278 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800279 deps = [
Austin Schuh9b881ae2019-01-04 07:29:20 +1100280 ":c2d",
Austin Schuha647d602018-02-18 14:05:15 -0800281 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700282 "//aos:macros",
James Kuszmaul61750662021-06-21 21:32:33 -0700283 "//frc971/control_loops:control_loop",
John Park33858a32018-09-28 23:05:48 -0700284 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700285 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800286 ],
Brian Silverman2b1957a2016-02-14 20:29:57 -0500287)
Austin Schuhacd335a2017-01-01 16:20:54 -0800288
289cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800290 name = "simple_capped_state_feedback_loop",
291 hdrs = [
292 "simple_capped_state_feedback_loop.h",
293 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800294 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800295 deps = [
296 ":state_feedback_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700297 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800298 ],
299)
300
301cc_library(
302 name = "runge_kutta",
303 hdrs = [
304 "runge_kutta.h",
305 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800306 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800307 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700308 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800309 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800310)
311
312cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800313 name = "runge_kutta_test",
314 srcs = [
315 "runge_kutta_test.cc",
316 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800317 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800318 deps = [
319 ":runge_kutta",
320 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700321 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800322 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800323)
Austin Schuh473a5652017-02-05 01:30:42 -0800324
Austin Schuh173a1592018-12-19 16:20:54 +1100325cc_library(
326 name = "fixed_quadrature",
327 hdrs = [
328 "fixed_quadrature.h",
329 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800330 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100331)
332
333cc_test(
334 name = "fixed_quadrature_test",
335 srcs = [
336 "fixed_quadrature_test.cc",
337 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800338 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100339 deps = [
340 ":fixed_quadrature",
341 "//aos/testing:googletest",
342 ],
343)
344
Alex Perrycb7da4b2019-08-28 19:35:56 -0700345flatbuffer_cc_library(
346 name = "profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800347 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700348 "profiled_subsystem.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800349 ],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700350 includes = [
351 ":control_loops_fbs_includes",
Austin Schuh9fe68f72019-08-10 19:32:03 -0700352 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800353 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9fe68f72019-08-10 19:32:03 -0700354)
355
Austin Schuh473a5652017-02-05 01:30:42 -0800356cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800357 name = "profiled_subsystem",
358 srcs = [
359 "profiled_subsystem.cc",
360 ],
361 hdrs = [
362 "profiled_subsystem.h",
363 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800364 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800365 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700366 ":control_loops_fbs",
367 ":profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800368 ":simple_capped_state_feedback_loop",
369 ":state_feedback_loop",
James Kuszmaul61750662021-06-21 21:32:33 -0700370 "//frc971/control_loops:control_loop",
John Park33858a32018-09-28 23:05:48 -0700371 "//aos/util:trapezoid_profile",
Austin Schuha647d602018-02-18 14:05:15 -0800372 "//frc971/zeroing",
373 ],
Austin Schuh473a5652017-02-05 01:30:42 -0800374)
Austin Schuha647d602018-02-18 14:05:15 -0800375
376cc_library(
377 name = "jacobian",
378 hdrs = [
379 "jacobian.h",
380 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800381 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800382 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700383 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800384 ],
385)
386
387cc_test(
388 name = "jacobian_test",
389 srcs = [
390 "jacobian_test.cc",
391 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800392 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800393 deps = [
394 ":jacobian",
395 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700396 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800397 ],
398)
399
James Kuszmaul59a5c612019-01-22 07:56:08 -0800400cc_test(
401 name = "c2d_test",
402 srcs = [
403 "c2d_test.cc",
404 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800405 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul59a5c612019-01-22 07:56:08 -0800406 visibility = ["//visibility:public"],
407 deps = [
408 ":c2d",
409 ":runge_kutta",
410 "//aos/testing:googletest",
411 ],
412)
413
Austin Schuh03785132018-02-19 18:29:06 -0800414cc_library(
Austin Schuh9b881ae2019-01-04 07:29:20 +1100415 name = "c2d",
416 hdrs = [
417 "c2d.h",
418 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800419 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9b881ae2019-01-04 07:29:20 +1100420 visibility = ["//visibility:public"],
421 deps = [
James Kuszmaul651fc3f2019-05-15 21:14:25 -0700422 "//aos/time",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700423 "@org_tuxfamily_eigen//:eigen",
Austin Schuh9b881ae2019-01-04 07:29:20 +1100424 ],
425)
426
427cc_library(
Austin Schuh03785132018-02-19 18:29:06 -0800428 name = "dlqr",
429 hdrs = [
430 "dlqr.h",
431 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800432 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh03785132018-02-19 18:29:06 -0800433 visibility = ["//visibility:public"],
434 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700435 "@org_tuxfamily_eigen//:eigen",
Austin Schuh03785132018-02-19 18:29:06 -0800436 "@slycot_repo//:slicot",
437 ],
438)
Brian Silverman6470f442018-08-05 12:08:16 -0700439
440py_library(
441 name = "python_init",
442 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800443 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700444 visibility = ["//visibility:public"],
445 deps = ["//frc971:python_init"],
446)
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800447
448cc_library(
449 name = "binomial",
450 hdrs = ["binomial.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800451 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800452)
453
454cc_test(
455 name = "binomial_test",
456 srcs = [
457 "binomial_test.cc",
458 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800459 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800460 deps = [
461 ":binomial",
462 "//aos/testing:googletest",
463 ],
464)
Tyler Chatow12581562019-01-26 20:42:42 -0800465
466cc_library(
467 name = "capped_test_plant",
468 testonly = True,
469 srcs = [
470 "capped_test_plant.cc",
471 ],
472 hdrs = [
473 "capped_test_plant.h",
474 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800475 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800476 deps = [
477 ":state_feedback_loop",
478 "//aos/testing:googletest",
479 ],
480)
481
482cc_library(
483 name = "static_zeroing_single_dof_profiled_subsystem",
Tyler Chatow12581562019-01-26 20:42:42 -0800484 hdrs = [
485 "static_zeroing_single_dof_profiled_subsystem.h",
486 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800487 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800488 deps = [
489 "//frc971/control_loops:profiled_subsystem",
490 ],
491)
492
493genrule(
494 name = "genrule_static_zeroing_single_dof_profiled_subsystem_test",
495 outs = [
496 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
497 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
498 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
499 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
500 ],
501 cmd = "$(location //frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test) $(OUTS)",
Philipp Schraderdada1072020-11-24 11:34:46 -0800502 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800503 tools = [
504 "//frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test",
505 ],
506)
507
508cc_library(
509 name = "static_zeroing_single_dof_profiled_subsystem_test_plants",
510 srcs = [
511 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
512 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
513 ],
514 hdrs = [
515 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
516 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
517 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800518 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800519 deps = [
520 ":state_feedback_loop",
521 ],
522)
523
Alex Perrycb7da4b2019-08-28 19:35:56 -0700524flatbuffer_cc_library(
Austin Schuha9df9ad2021-06-16 14:49:39 -0700525 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700526 srcs = [
Austin Schuha9df9ad2021-06-16 14:49:39 -0700527 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal.fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700528 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700529 gen_reflections = 1,
530 includes = [
531 ":control_loops_fbs_includes",
532 ":profiled_subsystem_fbs_includes",
533 ],
534 target_compatible_with = ["@platforms//os:linux"],
535)
536
537flatbuffer_cc_library(
538 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
539 srcs = [
540 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output.fbs",
541 ],
542 gen_reflections = 1,
543 target_compatible_with = ["@platforms//os:linux"],
544)
545
546flatbuffer_cc_library(
547 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
548 srcs = [
549 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position.fbs",
550 ],
551 gen_reflections = 1,
552 includes = [
553 ":control_loops_fbs_includes",
554 ],
555 target_compatible_with = ["@platforms//os:linux"],
556)
557
558flatbuffer_cc_library(
559 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
560 srcs = [
561 "static_zeroing_single_dof_profiled_subsystem_test_absolute_position.fbs",
562 ],
563 gen_reflections = 1,
564 includes = [
565 ":control_loops_fbs_includes",
566 ],
567 target_compatible_with = ["@platforms//os:linux"],
568)
569
570flatbuffer_cc_library(
571 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
572 srcs = [
573 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status.fbs",
574 ],
575 gen_reflections = 1,
576 includes = [
577 ":control_loops_fbs_includes",
578 ":profiled_subsystem_fbs_includes",
579 ],
580 target_compatible_with = ["@platforms//os:linux"],
581)
582
583flatbuffer_cc_library(
584 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
585 srcs = [
586 "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status.fbs",
587 ],
588 gen_reflections = 1,
Alex Perrycb7da4b2019-08-28 19:35:56 -0700589 includes = [
590 ":control_loops_fbs_includes",
591 ":profiled_subsystem_fbs_includes",
592 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800593 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700594)
595
Tyler Chatow12581562019-01-26 20:42:42 -0800596cc_test(
597 name = "static_zeroing_single_dof_profiled_subsystem_test",
598 srcs = [
599 "static_zeroing_single_dof_profiled_subsystem_test.cc",
600 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700601 data = [
602 ":static_zeroing_single_dof_profiled_subsystem_test_config",
603 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800604 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800605 deps = [
606 ":capped_test_plant",
607 ":position_sensor_sim",
608 ":static_zeroing_single_dof_profiled_subsystem",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700609 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
610 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
Tyler Chatow12581562019-01-26 20:42:42 -0800611 ":static_zeroing_single_dof_profiled_subsystem_test_plants",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700612 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
613 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
614 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
615 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
James Kuszmaul61750662021-06-21 21:32:33 -0700616 "//frc971/control_loops:control_loop_test",
Tyler Chatow12581562019-01-26 20:42:42 -0800617 "//aos/testing:googletest",
618 ],
619)
Austin Schuha9df9ad2021-06-16 14:49:39 -0700620
621aos_config(
622 name = "static_zeroing_single_dof_profiled_subsystem_test_config",
623 src = "static_zeroing_single_dof_profiled_subsystem_test_config_source.json",
624 flatbuffers = [
625 "//frc971/input:joystick_state_fbs",
626 "//frc971/input:robot_state_fbs",
627 "//aos/logging:log_message_fbs",
628 "//aos/events:event_loop_fbs",
629 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
630 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
631 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
632 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
633 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
634 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
635 ],
636 target_compatible_with = ["@platforms//os:linux"],
637)