blob: 459929b65f6dbd0650d7e3e2cac312126cd79eed [file] [log] [blame]
Austin Schuha9df9ad2021-06-16 14:49:39 -07001load("//aos:config.bzl", "aos_config")
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")
Brian Silverman100534c2015-09-07 15:51:23 -04004
Philipp Schradercc016b32021-12-30 08:59:58 -08005package(default_visibility = ["//visibility:public"])
6
Brian Silverman100534c2015-09-07 15:51:23 -04007cc_library(
James Kuszmaul61750662021-06-21 21:32:33 -07008 name = "control_loop_test",
9 testonly = True,
10 srcs = [
11 "control_loop_test.cc",
12 ],
13 hdrs = [
14 "control_loop_test.h",
15 ],
16 target_compatible_with = ["@platforms//os:linux"],
17 deps = [
18 "//aos:flatbuffers",
19 "//aos:json_to_flatbuffer",
20 "//aos/events:simulated_event_loop",
Austin Schuh0debde12022-08-17 16:25:17 -070021 "//aos/network:testing_time_converter",
James Kuszmaul61750662021-06-21 21:32:33 -070022 "//aos/testing:googletest",
23 "//aos/testing:test_logging",
24 "//aos/time",
25 "//frc971/input:joystick_state_fbs",
26 "//frc971/input:robot_state_fbs",
27 ],
28)
29
30cc_library(
31 name = "polytope",
32 hdrs = [
33 "polytope.h",
34 ],
35 deps = [
36 "@org_tuxfamily_eigen//:eigen",
37 ] + select({
38 "@platforms//os:linux": [
39 "//aos/logging",
40 "//third_party/cddlib",
41 "@com_github_google_glog//:glog",
42 ],
43 "//conditions:default": [],
44 }),
45)
46
47cc_test(
48 name = "polytope_test",
49 srcs = [
50 "polytope_test.cc",
51 ],
52 target_compatible_with = ["@platforms//os:linux"],
53 deps = [
54 ":polytope",
55 "//aos/testing:googletest",
56 "//aos/testing:test_logging",
57 "@org_tuxfamily_eigen//:eigen",
58 ],
59)
60
61cc_library(
62 name = "control_loop",
63 srcs = [
64 "control_loop.cc",
65 "control_loop-tmpl.h",
66 ],
67 hdrs = [
68 "control_loop.h",
69 ],
70 target_compatible_with = ["@platforms//os:linux"],
71 deps = [
72 "//aos/events:event_loop",
73 "//aos/events:shm_event_loop",
74 "//aos/logging",
75 "//aos/time",
76 "//aos/util:log_interval",
77 "//frc971/input:joystick_state_fbs",
78 "//frc971/input:robot_state_fbs",
79 ],
80)
81
82cc_library(
83 name = "quaternion_utils",
84 srcs = [
85 "quaternion_utils.cc",
86 ],
87 hdrs = [
88 "quaternion_utils.h",
89 ],
90 target_compatible_with = ["@platforms//os:linux"],
91 deps = [
92 "@com_github_google_glog//:glog",
93 "@org_tuxfamily_eigen//:eigen",
94 ],
95)
96
97cc_test(
98 name = "quarternion_utils_test",
99 srcs = [
100 "quaternion_utils_test.cc",
101 ],
102 target_compatible_with = ["@platforms//os:linux"],
103 deps = [
milind-ue53bf552021-12-11 14:42:00 -0800104 ":jacobian",
James Kuszmaul61750662021-06-21 21:32:33 -0700105 ":quaternion_utils",
milind-ue53bf552021-12-11 14:42:00 -0800106 ":runge_kutta",
James Kuszmaul61750662021-06-21 21:32:33 -0700107 "//aos/testing:googletest",
108 "//aos/testing:random_seed",
109 "@com_github_google_glog//:glog",
110 "@org_tuxfamily_eigen//:eigen",
111 ],
112)
113
114cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800115 name = "team_number_test_environment",
116 testonly = True,
117 srcs = [
118 "team_number_test_environment.cc",
119 ],
120 hdrs = [
121 "team_number_test_environment.h",
122 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800123 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800124 deps = [
John Park33858a32018-09-28 23:05:48 -0700125 "//aos/network:team_number",
Austin Schuha647d602018-02-18 14:05:15 -0800126 "//aos/testing:googletest",
127 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400128)
129
130cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800131 name = "hybrid_state_feedback_loop_test",
132 srcs = [
133 "hybrid_state_feedback_loop_test.cc",
134 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800135 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800136 deps = [
137 ":hybrid_state_feedback_loop",
138 "//aos/testing:googletest",
139 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400140)
141
142cc_library(
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800143 name = "pose",
144 hdrs = ["pose.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800145 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800146 deps = [
147 "//aos/util:math",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700148 "@org_tuxfamily_eigen//:eigen",
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800149 ],
150)
151
152cc_test(
153 name = "pose_test",
154 srcs = ["pose_test.cc"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800155 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800156 deps = [
157 ":pose",
158 "//aos/testing:googletest",
159 ],
160)
161
162cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800163 name = "hall_effect_tracker",
164 hdrs = [
165 "hall_effect_tracker.h",
166 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800167 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800168 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700169 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800170 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400171)
172
James Kuszmauldac091f2022-03-22 09:35:06 -0700173flatbuffer_ts_library(
174 name = "control_loops_ts_fbs",
175 srcs = [
176 "control_loops.fbs",
177 ],
178)
179
Alex Perrycb7da4b2019-08-28 19:35:56 -0700180flatbuffer_cc_library(
181 name = "control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800182 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700183 "control_loops.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800184 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400185)
186
187cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800188 name = "position_sensor_sim_test",
189 srcs = [
190 "position_sensor_sim_test.cc",
191 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800192 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800193 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700194 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800195 ":position_sensor_sim",
John Park33858a32018-09-28 23:05:48 -0700196 "//aos/logging",
Austin Schuha647d602018-02-18 14:05:15 -0800197 "//aos/testing:googletest",
198 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400199)
200
201cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800202 name = "position_sensor_sim",
203 testonly = True,
204 srcs = [
205 "position_sensor_sim.cc",
206 ],
207 hdrs = [
208 "position_sensor_sim.h",
209 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700210 linkopts = [
211 "-lm",
212 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800213 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800214 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700215 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800216 ":gaussian_noise",
Austin Schuha647d602018-02-18 14:05:15 -0800217 "//aos/testing:random_seed",
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800218 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400219)
220
221cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800222 name = "gaussian_noise",
223 srcs = [
224 "gaussian_noise.cc",
225 ],
226 hdrs = [
227 "gaussian_noise.h",
228 ],
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800229 linkopts = [
230 "-lm",
Austin Schuha647d602018-02-18 14:05:15 -0800231 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800232 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhbcce26a2018-03-26 23:41:24 -0700233)
234
235cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800236 name = "coerce_goal",
237 srcs = [
238 "coerce_goal.cc",
239 ],
240 hdrs = [
241 "coerce_goal.h",
242 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800243 linkopts = select({
244 "@platforms//os:linux": ["-lm"],
245 "//conditions:default": [],
246 }),
Austin Schuha647d602018-02-18 14:05:15 -0800247 deps = [
James Kuszmaul61750662021-06-21 21:32:33 -0700248 "//frc971/control_loops:polytope",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700249 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800250 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400251)
252
Lee Mracek65686142020-01-10 22:21:39 -0500253cc_test(
254 name = "coerce_goal_test",
255 srcs = [
256 "coerce_goal_test.cc",
257 ],
258 linkopts = [
259 "-lm",
260 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800261 target_compatible_with = ["@platforms//os:linux"],
Lee Mracek65686142020-01-10 22:21:39 -0500262 deps = [
263 ":coerce_goal",
Lee Mracek65686142020-01-10 22:21:39 -0500264 "//aos/testing:googletest",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700265 "//frc971/control_loops:polytope",
Lee Mracek65686142020-01-10 22:21:39 -0500266 "@org_tuxfamily_eigen//:eigen",
267 ],
268)
269
Austin Schuh4cc4fe22017-11-23 19:13:09 -0800270cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800271 name = "state_feedback_loop",
272 hdrs = [
273 "state_feedback_loop.h",
274 ],
275 deps = [
John Park33858a32018-09-28 23:05:48 -0700276 "//aos:macros",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700277 "@org_tuxfamily_eigen//:eigen",
Philipp Schraderdada1072020-11-24 11:34:46 -0800278 ] + select({
279 "@platforms//os:linux": ["//aos/logging"],
280 "//conditions:default": [],
281 }),
Brian Silverman100534c2015-09-07 15:51:23 -0400282)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500283
284cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800285 name = "hybrid_state_feedback_loop",
286 hdrs = [
287 "hybrid_state_feedback_loop.h",
288 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800289 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800290 deps = [
Austin Schuh9b881ae2019-01-04 07:29:20 +1100291 ":c2d",
Austin Schuha647d602018-02-18 14:05:15 -0800292 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700293 "//aos:macros",
John Park33858a32018-09-28 23:05:48 -0700294 "//aos/logging",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700295 "//frc971/control_loops:control_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700296 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800297 ],
Brian Silverman2b1957a2016-02-14 20:29:57 -0500298)
Austin Schuhacd335a2017-01-01 16:20:54 -0800299
300cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800301 name = "simple_capped_state_feedback_loop",
302 hdrs = [
303 "simple_capped_state_feedback_loop.h",
304 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800305 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800306 deps = [
307 ":state_feedback_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700308 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800309 ],
310)
311
312cc_library(
313 name = "runge_kutta",
314 hdrs = [
315 "runge_kutta.h",
316 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800317 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800318 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700319 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800320 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800321)
322
323cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800324 name = "runge_kutta_test",
325 srcs = [
326 "runge_kutta_test.cc",
327 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800328 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800329 deps = [
330 ":runge_kutta",
331 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700332 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800333 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800334)
Austin Schuh473a5652017-02-05 01:30:42 -0800335
Austin Schuh173a1592018-12-19 16:20:54 +1100336cc_library(
337 name = "fixed_quadrature",
338 hdrs = [
339 "fixed_quadrature.h",
340 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800341 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100342)
343
344cc_test(
345 name = "fixed_quadrature_test",
346 srcs = [
347 "fixed_quadrature_test.cc",
348 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800349 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100350 deps = [
351 ":fixed_quadrature",
352 "//aos/testing:googletest",
353 ],
354)
355
James Kuszmauldac091f2022-03-22 09:35:06 -0700356flatbuffer_ts_library(
357 name = "profiled_subsystem_ts_fbs",
358 srcs = [
359 "profiled_subsystem.fbs",
360 ],
361 deps = [
362 ":control_loops_ts_fbs",
363 ],
364)
365
Alex Perrycb7da4b2019-08-28 19:35:56 -0700366flatbuffer_cc_library(
367 name = "profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800368 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700369 "profiled_subsystem.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800370 ],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700371 includes = [
372 ":control_loops_fbs_includes",
Austin Schuh9fe68f72019-08-10 19:32:03 -0700373 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800374 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9fe68f72019-08-10 19:32:03 -0700375)
376
Austin Schuh473a5652017-02-05 01:30:42 -0800377cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800378 name = "profiled_subsystem",
379 srcs = [
380 "profiled_subsystem.cc",
381 ],
382 hdrs = [
383 "profiled_subsystem.h",
384 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800385 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800386 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700387 ":control_loops_fbs",
388 ":profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800389 ":simple_capped_state_feedback_loop",
390 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700391 "//aos/util:trapezoid_profile",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700392 "//frc971/control_loops:control_loop",
Austin Schuha647d602018-02-18 14:05:15 -0800393 "//frc971/zeroing",
394 ],
Austin Schuh473a5652017-02-05 01:30:42 -0800395)
Austin Schuha647d602018-02-18 14:05:15 -0800396
397cc_library(
398 name = "jacobian",
399 hdrs = [
400 "jacobian.h",
401 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800402 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800403 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700404 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800405 ],
406)
407
408cc_test(
409 name = "jacobian_test",
410 srcs = [
411 "jacobian_test.cc",
412 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800413 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800414 deps = [
415 ":jacobian",
416 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700417 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800418 ],
419)
420
James Kuszmaul59a5c612019-01-22 07:56:08 -0800421cc_test(
422 name = "c2d_test",
423 srcs = [
424 "c2d_test.cc",
425 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800426 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul59a5c612019-01-22 07:56:08 -0800427 visibility = ["//visibility:public"],
428 deps = [
429 ":c2d",
430 ":runge_kutta",
431 "//aos/testing:googletest",
432 ],
433)
434
Austin Schuh03785132018-02-19 18:29:06 -0800435cc_library(
Austin Schuh9b881ae2019-01-04 07:29:20 +1100436 name = "c2d",
437 hdrs = [
438 "c2d.h",
439 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800440 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9b881ae2019-01-04 07:29:20 +1100441 visibility = ["//visibility:public"],
442 deps = [
James Kuszmaul651fc3f2019-05-15 21:14:25 -0700443 "//aos/time",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700444 "@org_tuxfamily_eigen//:eigen",
Austin Schuh9b881ae2019-01-04 07:29:20 +1100445 ],
446)
447
448cc_library(
Austin Schuh03785132018-02-19 18:29:06 -0800449 name = "dlqr",
450 hdrs = [
451 "dlqr.h",
452 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800453 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh03785132018-02-19 18:29:06 -0800454 visibility = ["//visibility:public"],
455 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700456 "@org_tuxfamily_eigen//:eigen",
Austin Schuh03785132018-02-19 18:29:06 -0800457 "@slycot_repo//:slicot",
458 ],
459)
Brian Silverman6470f442018-08-05 12:08:16 -0700460
461py_library(
462 name = "python_init",
463 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800464 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700465 visibility = ["//visibility:public"],
466 deps = ["//frc971:python_init"],
467)
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800468
469cc_library(
470 name = "binomial",
471 hdrs = ["binomial.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800472 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800473)
474
475cc_test(
476 name = "binomial_test",
477 srcs = [
478 "binomial_test.cc",
479 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800480 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800481 deps = [
482 ":binomial",
483 "//aos/testing:googletest",
484 ],
485)
Tyler Chatow12581562019-01-26 20:42:42 -0800486
487cc_library(
488 name = "capped_test_plant",
489 testonly = True,
490 srcs = [
491 "capped_test_plant.cc",
492 ],
493 hdrs = [
494 "capped_test_plant.h",
495 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800496 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800497 deps = [
498 ":state_feedback_loop",
499 "//aos/testing:googletest",
500 ],
501)
502
503cc_library(
504 name = "static_zeroing_single_dof_profiled_subsystem",
Tyler Chatow12581562019-01-26 20:42:42 -0800505 hdrs = [
506 "static_zeroing_single_dof_profiled_subsystem.h",
507 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800508 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800509 deps = [
510 "//frc971/control_loops:profiled_subsystem",
511 ],
512)
513
514genrule(
515 name = "genrule_static_zeroing_single_dof_profiled_subsystem_test",
516 outs = [
517 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
518 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
519 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
520 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
521 ],
522 cmd = "$(location //frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test) $(OUTS)",
Philipp Schraderdada1072020-11-24 11:34:46 -0800523 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800524 tools = [
525 "//frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test",
526 ],
527)
528
529cc_library(
530 name = "static_zeroing_single_dof_profiled_subsystem_test_plants",
531 srcs = [
532 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
533 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
534 ],
535 hdrs = [
536 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
537 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
538 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800539 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800540 deps = [
541 ":state_feedback_loop",
542 ],
543)
544
Alex Perrycb7da4b2019-08-28 19:35:56 -0700545flatbuffer_cc_library(
Austin Schuha9df9ad2021-06-16 14:49:39 -0700546 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700547 srcs = [
Austin Schuha9df9ad2021-06-16 14:49:39 -0700548 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal.fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700549 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700550 gen_reflections = 1,
551 includes = [
552 ":control_loops_fbs_includes",
553 ":profiled_subsystem_fbs_includes",
554 ],
555 target_compatible_with = ["@platforms//os:linux"],
556)
557
558flatbuffer_cc_library(
559 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
560 srcs = [
561 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output.fbs",
562 ],
563 gen_reflections = 1,
564 target_compatible_with = ["@platforms//os:linux"],
565)
566
567flatbuffer_cc_library(
568 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
569 srcs = [
570 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position.fbs",
571 ],
572 gen_reflections = 1,
573 includes = [
574 ":control_loops_fbs_includes",
575 ],
576 target_compatible_with = ["@platforms//os:linux"],
577)
578
579flatbuffer_cc_library(
580 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
581 srcs = [
582 "static_zeroing_single_dof_profiled_subsystem_test_absolute_position.fbs",
583 ],
584 gen_reflections = 1,
585 includes = [
586 ":control_loops_fbs_includes",
587 ],
588 target_compatible_with = ["@platforms//os:linux"],
589)
590
591flatbuffer_cc_library(
592 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
593 srcs = [
594 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status.fbs",
595 ],
596 gen_reflections = 1,
597 includes = [
598 ":control_loops_fbs_includes",
599 ":profiled_subsystem_fbs_includes",
600 ],
601 target_compatible_with = ["@platforms//os:linux"],
602)
603
604flatbuffer_cc_library(
605 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
606 srcs = [
607 "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status.fbs",
608 ],
609 gen_reflections = 1,
Alex Perrycb7da4b2019-08-28 19:35:56 -0700610 includes = [
611 ":control_loops_fbs_includes",
612 ":profiled_subsystem_fbs_includes",
613 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800614 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700615)
616
Tyler Chatow12581562019-01-26 20:42:42 -0800617cc_test(
618 name = "static_zeroing_single_dof_profiled_subsystem_test",
619 srcs = [
620 "static_zeroing_single_dof_profiled_subsystem_test.cc",
621 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700622 data = [
623 ":static_zeroing_single_dof_profiled_subsystem_test_config",
624 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800625 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800626 deps = [
627 ":capped_test_plant",
628 ":position_sensor_sim",
629 ":static_zeroing_single_dof_profiled_subsystem",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700630 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
631 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
Tyler Chatow12581562019-01-26 20:42:42 -0800632 ":static_zeroing_single_dof_profiled_subsystem_test_plants",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700633 ":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 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
636 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
Tyler Chatow12581562019-01-26 20:42:42 -0800637 "//aos/testing:googletest",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700638 "//frc971/control_loops:control_loop_test",
Tyler Chatow12581562019-01-26 20:42:42 -0800639 ],
640)
Austin Schuha9df9ad2021-06-16 14:49:39 -0700641
642aos_config(
643 name = "static_zeroing_single_dof_profiled_subsystem_test_config",
644 src = "static_zeroing_single_dof_profiled_subsystem_test_config_source.json",
645 flatbuffers = [
646 "//frc971/input:joystick_state_fbs",
647 "//frc971/input:robot_state_fbs",
648 "//aos/logging:log_message_fbs",
649 "//aos/events:event_loop_fbs",
650 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
651 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
652 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
653 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
654 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
655 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
656 ],
657 target_compatible_with = ["@platforms//os:linux"],
658)