blob: 4491bbaa2624ce18391f5e4be574feb46c6a00ea [file] [log] [blame]
Austin Schuha9df9ad2021-06-16 14:49:39 -07001load("//aos:config.bzl", "aos_config")
James Kuszmauldac091f2022-03-22 09:35:06 -07002load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
Brian Silverman100534c2015-09-07 15:51:23 -04003
Philipp Schradercc016b32021-12-30 08:59:58 -08004package(default_visibility = ["//visibility:public"])
5
Brian Silverman100534c2015-09-07 15:51:23 -04006cc_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",
Austin Schuh0debde12022-08-17 16:25:17 -070020 "//aos/network:testing_time_converter",
James Kuszmaul61750662021-06-21 21:32:33 -070021 "//aos/testing:googletest",
22 "//aos/testing:test_logging",
23 "//aos/time",
24 "//frc971/input:joystick_state_fbs",
25 "//frc971/input:robot_state_fbs",
26 ],
27)
28
29cc_library(
30 name = "polytope",
31 hdrs = [
32 "polytope.h",
33 ],
34 deps = [
35 "@org_tuxfamily_eigen//:eigen",
36 ] + select({
37 "@platforms//os:linux": [
38 "//aos/logging",
39 "//third_party/cddlib",
40 "@com_github_google_glog//:glog",
41 ],
42 "//conditions:default": [],
43 }),
44)
45
46cc_test(
47 name = "polytope_test",
48 srcs = [
49 "polytope_test.cc",
50 ],
51 target_compatible_with = ["@platforms//os:linux"],
52 deps = [
53 ":polytope",
54 "//aos/testing:googletest",
55 "//aos/testing:test_logging",
56 "@org_tuxfamily_eigen//:eigen",
57 ],
58)
59
60cc_library(
61 name = "control_loop",
62 srcs = [
63 "control_loop.cc",
64 "control_loop-tmpl.h",
65 ],
66 hdrs = [
67 "control_loop.h",
68 ],
69 target_compatible_with = ["@platforms//os:linux"],
70 deps = [
71 "//aos/events:event_loop",
72 "//aos/events:shm_event_loop",
73 "//aos/logging",
74 "//aos/time",
75 "//aos/util:log_interval",
76 "//frc971/input:joystick_state_fbs",
77 "//frc971/input:robot_state_fbs",
78 ],
79)
80
81cc_library(
82 name = "quaternion_utils",
83 srcs = [
84 "quaternion_utils.cc",
85 ],
86 hdrs = [
87 "quaternion_utils.h",
88 ],
89 target_compatible_with = ["@platforms//os:linux"],
90 deps = [
91 "@com_github_google_glog//:glog",
92 "@org_tuxfamily_eigen//:eigen",
93 ],
94)
95
96cc_test(
97 name = "quarternion_utils_test",
98 srcs = [
99 "quaternion_utils_test.cc",
100 ],
101 target_compatible_with = ["@platforms//os:linux"],
102 deps = [
milind-ue53bf552021-12-11 14:42:00 -0800103 ":jacobian",
James Kuszmaul61750662021-06-21 21:32:33 -0700104 ":quaternion_utils",
milind-ue53bf552021-12-11 14:42:00 -0800105 ":runge_kutta",
James Kuszmaul61750662021-06-21 21:32:33 -0700106 "//aos/testing:googletest",
107 "//aos/testing:random_seed",
108 "@com_github_google_glog//:glog",
109 "@org_tuxfamily_eigen//:eigen",
110 ],
111)
112
113cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800114 name = "team_number_test_environment",
115 testonly = True,
116 srcs = [
117 "team_number_test_environment.cc",
118 ],
119 hdrs = [
120 "team_number_test_environment.h",
121 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800122 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800123 deps = [
John Park33858a32018-09-28 23:05:48 -0700124 "//aos/network:team_number",
Austin Schuha647d602018-02-18 14:05:15 -0800125 "//aos/testing:googletest",
126 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400127)
128
129cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800130 name = "hybrid_state_feedback_loop_test",
131 srcs = [
132 "hybrid_state_feedback_loop_test.cc",
133 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800134 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800135 deps = [
136 ":hybrid_state_feedback_loop",
137 "//aos/testing:googletest",
138 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400139)
140
141cc_library(
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800142 name = "pose",
143 hdrs = ["pose.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800144 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800145 deps = [
146 "//aos/util:math",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700147 "@org_tuxfamily_eigen//:eigen",
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800148 ],
149)
150
151cc_test(
152 name = "pose_test",
153 srcs = ["pose_test.cc"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800154 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800155 deps = [
156 ":pose",
157 "//aos/testing:googletest",
158 ],
159)
160
161cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800162 name = "hall_effect_tracker",
163 hdrs = [
164 "hall_effect_tracker.h",
165 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800166 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800167 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700168 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800169 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400170)
171
James Kuszmauldac091f2022-03-22 09:35:06 -0700172flatbuffer_ts_library(
173 name = "control_loops_ts_fbs",
174 srcs = [
175 "control_loops.fbs",
176 ],
177)
178
Alex Perrycb7da4b2019-08-28 19:35:56 -0700179flatbuffer_cc_library(
180 name = "control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800181 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700182 "control_loops.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800183 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400184)
185
186cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800187 name = "position_sensor_sim_test",
188 srcs = [
189 "position_sensor_sim_test.cc",
190 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800191 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800192 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700193 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800194 ":position_sensor_sim",
John Park33858a32018-09-28 23:05:48 -0700195 "//aos/logging",
Austin Schuha647d602018-02-18 14:05:15 -0800196 "//aos/testing:googletest",
197 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400198)
199
200cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800201 name = "position_sensor_sim",
202 testonly = True,
203 srcs = [
204 "position_sensor_sim.cc",
205 ],
206 hdrs = [
207 "position_sensor_sim.h",
208 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700209 linkopts = [
210 "-lm",
211 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800212 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800213 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700214 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800215 ":gaussian_noise",
Austin Schuha647d602018-02-18 14:05:15 -0800216 "//aos/testing:random_seed",
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800217 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400218)
219
220cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800221 name = "gaussian_noise",
222 srcs = [
223 "gaussian_noise.cc",
224 ],
225 hdrs = [
226 "gaussian_noise.h",
227 ],
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800228 linkopts = [
229 "-lm",
Austin Schuha647d602018-02-18 14:05:15 -0800230 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800231 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhbcce26a2018-03-26 23:41:24 -0700232)
233
234cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800235 name = "coerce_goal",
236 srcs = [
237 "coerce_goal.cc",
238 ],
239 hdrs = [
240 "coerce_goal.h",
241 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800242 linkopts = select({
243 "@platforms//os:linux": ["-lm"],
244 "//conditions:default": [],
245 }),
Austin Schuha647d602018-02-18 14:05:15 -0800246 deps = [
James Kuszmaul61750662021-06-21 21:32:33 -0700247 "//frc971/control_loops:polytope",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700248 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800249 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400250)
251
Lee Mracek65686142020-01-10 22:21:39 -0500252cc_test(
253 name = "coerce_goal_test",
254 srcs = [
255 "coerce_goal_test.cc",
256 ],
257 linkopts = [
258 "-lm",
259 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800260 target_compatible_with = ["@platforms//os:linux"],
Lee Mracek65686142020-01-10 22:21:39 -0500261 deps = [
262 ":coerce_goal",
Lee Mracek65686142020-01-10 22:21:39 -0500263 "//aos/testing:googletest",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700264 "//frc971/control_loops:polytope",
Lee Mracek65686142020-01-10 22:21:39 -0500265 "@org_tuxfamily_eigen//:eigen",
266 ],
267)
268
Austin Schuh4cc4fe22017-11-23 19:13:09 -0800269cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800270 name = "state_feedback_loop",
271 hdrs = [
272 "state_feedback_loop.h",
273 ],
274 deps = [
John Park33858a32018-09-28 23:05:48 -0700275 "//aos:macros",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700276 "@org_tuxfamily_eigen//:eigen",
Philipp Schraderdada1072020-11-24 11:34:46 -0800277 ] + select({
278 "@platforms//os:linux": ["//aos/logging"],
279 "//conditions:default": [],
280 }),
Brian Silverman100534c2015-09-07 15:51:23 -0400281)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500282
283cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800284 name = "hybrid_state_feedback_loop",
285 hdrs = [
286 "hybrid_state_feedback_loop.h",
287 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800288 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800289 deps = [
Austin Schuh9b881ae2019-01-04 07:29:20 +1100290 ":c2d",
Austin Schuha647d602018-02-18 14:05:15 -0800291 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700292 "//aos:macros",
John Park33858a32018-09-28 23:05:48 -0700293 "//aos/logging",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700294 "//frc971/control_loops:control_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700295 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800296 ],
Brian Silverman2b1957a2016-02-14 20:29:57 -0500297)
Austin Schuhacd335a2017-01-01 16:20:54 -0800298
299cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800300 name = "simple_capped_state_feedback_loop",
301 hdrs = [
302 "simple_capped_state_feedback_loop.h",
303 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800304 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800305 deps = [
306 ":state_feedback_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700307 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800308 ],
309)
310
311cc_library(
312 name = "runge_kutta",
313 hdrs = [
314 "runge_kutta.h",
315 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800316 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800317 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700318 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800319 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800320)
321
322cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800323 name = "runge_kutta_test",
324 srcs = [
325 "runge_kutta_test.cc",
326 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800327 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800328 deps = [
329 ":runge_kutta",
330 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700331 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800332 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800333)
Austin Schuh473a5652017-02-05 01:30:42 -0800334
Austin Schuh173a1592018-12-19 16:20:54 +1100335cc_library(
336 name = "fixed_quadrature",
337 hdrs = [
338 "fixed_quadrature.h",
339 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800340 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100341)
342
343cc_test(
344 name = "fixed_quadrature_test",
345 srcs = [
346 "fixed_quadrature_test.cc",
347 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800348 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100349 deps = [
350 ":fixed_quadrature",
351 "//aos/testing:googletest",
352 ],
353)
354
James Kuszmauldac091f2022-03-22 09:35:06 -0700355flatbuffer_ts_library(
356 name = "profiled_subsystem_ts_fbs",
357 srcs = [
358 "profiled_subsystem.fbs",
359 ],
360 deps = [
361 ":control_loops_ts_fbs",
362 ],
363)
364
Alex Perrycb7da4b2019-08-28 19:35:56 -0700365flatbuffer_cc_library(
366 name = "profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800367 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700368 "profiled_subsystem.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800369 ],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700370 includes = [
371 ":control_loops_fbs_includes",
Austin Schuh9fe68f72019-08-10 19:32:03 -0700372 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800373 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9fe68f72019-08-10 19:32:03 -0700374)
375
Austin Schuh473a5652017-02-05 01:30:42 -0800376cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800377 name = "profiled_subsystem",
378 srcs = [
379 "profiled_subsystem.cc",
380 ],
381 hdrs = [
382 "profiled_subsystem.h",
383 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800384 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800385 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700386 ":control_loops_fbs",
387 ":profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800388 ":simple_capped_state_feedback_loop",
389 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700390 "//aos/util:trapezoid_profile",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700391 "//frc971/control_loops:control_loop",
Austin Schuha647d602018-02-18 14:05:15 -0800392 "//frc971/zeroing",
393 ],
Austin Schuh473a5652017-02-05 01:30:42 -0800394)
Austin Schuha647d602018-02-18 14:05:15 -0800395
396cc_library(
397 name = "jacobian",
398 hdrs = [
399 "jacobian.h",
400 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800401 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800402 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700403 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800404 ],
405)
406
407cc_test(
408 name = "jacobian_test",
409 srcs = [
410 "jacobian_test.cc",
411 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800412 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800413 deps = [
414 ":jacobian",
415 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700416 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800417 ],
418)
419
James Kuszmaul59a5c612019-01-22 07:56:08 -0800420cc_test(
421 name = "c2d_test",
422 srcs = [
423 "c2d_test.cc",
424 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800425 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul59a5c612019-01-22 07:56:08 -0800426 visibility = ["//visibility:public"],
427 deps = [
428 ":c2d",
429 ":runge_kutta",
430 "//aos/testing:googletest",
431 ],
432)
433
Austin Schuh03785132018-02-19 18:29:06 -0800434cc_library(
Austin Schuh9b881ae2019-01-04 07:29:20 +1100435 name = "c2d",
436 hdrs = [
437 "c2d.h",
438 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800439 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9b881ae2019-01-04 07:29:20 +1100440 visibility = ["//visibility:public"],
441 deps = [
James Kuszmaul651fc3f2019-05-15 21:14:25 -0700442 "//aos/time",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700443 "@org_tuxfamily_eigen//:eigen",
Austin Schuh9b881ae2019-01-04 07:29:20 +1100444 ],
445)
446
447cc_library(
Austin Schuh03785132018-02-19 18:29:06 -0800448 name = "dlqr",
449 hdrs = [
450 "dlqr.h",
451 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800452 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh03785132018-02-19 18:29:06 -0800453 visibility = ["//visibility:public"],
454 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700455 "@org_tuxfamily_eigen//:eigen",
Austin Schuh03785132018-02-19 18:29:06 -0800456 "@slycot_repo//:slicot",
457 ],
458)
Brian Silverman6470f442018-08-05 12:08:16 -0700459
460py_library(
461 name = "python_init",
462 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800463 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700464 visibility = ["//visibility:public"],
465 deps = ["//frc971:python_init"],
466)
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800467
468cc_library(
469 name = "binomial",
470 hdrs = ["binomial.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800471 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800472)
473
474cc_test(
475 name = "binomial_test",
476 srcs = [
477 "binomial_test.cc",
478 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800479 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800480 deps = [
481 ":binomial",
482 "//aos/testing:googletest",
483 ],
484)
Tyler Chatow12581562019-01-26 20:42:42 -0800485
486cc_library(
487 name = "capped_test_plant",
488 testonly = True,
489 srcs = [
490 "capped_test_plant.cc",
491 ],
492 hdrs = [
493 "capped_test_plant.h",
494 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800495 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800496 deps = [
497 ":state_feedback_loop",
498 "//aos/testing:googletest",
499 ],
500)
501
502cc_library(
503 name = "static_zeroing_single_dof_profiled_subsystem",
Tyler Chatow12581562019-01-26 20:42:42 -0800504 hdrs = [
505 "static_zeroing_single_dof_profiled_subsystem.h",
506 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800507 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800508 deps = [
509 "//frc971/control_loops:profiled_subsystem",
510 ],
511)
512
513genrule(
514 name = "genrule_static_zeroing_single_dof_profiled_subsystem_test",
515 outs = [
516 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
517 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
518 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
519 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
520 ],
521 cmd = "$(location //frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test) $(OUTS)",
Philipp Schraderdada1072020-11-24 11:34:46 -0800522 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800523 tools = [
524 "//frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test",
525 ],
526)
527
528cc_library(
529 name = "static_zeroing_single_dof_profiled_subsystem_test_plants",
530 srcs = [
531 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
532 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
533 ],
534 hdrs = [
535 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
536 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
537 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800538 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800539 deps = [
540 ":state_feedback_loop",
541 ],
542)
543
Alex Perrycb7da4b2019-08-28 19:35:56 -0700544flatbuffer_cc_library(
Austin Schuha9df9ad2021-06-16 14:49:39 -0700545 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700546 srcs = [
Austin Schuha9df9ad2021-06-16 14:49:39 -0700547 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal.fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700548 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700549 gen_reflections = 1,
550 includes = [
551 ":control_loops_fbs_includes",
552 ":profiled_subsystem_fbs_includes",
553 ],
554 target_compatible_with = ["@platforms//os:linux"],
555)
556
557flatbuffer_cc_library(
558 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
559 srcs = [
560 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output.fbs",
561 ],
562 gen_reflections = 1,
563 target_compatible_with = ["@platforms//os:linux"],
564)
565
566flatbuffer_cc_library(
567 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
568 srcs = [
569 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position.fbs",
570 ],
571 gen_reflections = 1,
572 includes = [
573 ":control_loops_fbs_includes",
574 ],
575 target_compatible_with = ["@platforms//os:linux"],
576)
577
578flatbuffer_cc_library(
579 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
580 srcs = [
581 "static_zeroing_single_dof_profiled_subsystem_test_absolute_position.fbs",
582 ],
583 gen_reflections = 1,
584 includes = [
585 ":control_loops_fbs_includes",
586 ],
587 target_compatible_with = ["@platforms//os:linux"],
588)
589
590flatbuffer_cc_library(
591 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
592 srcs = [
593 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status.fbs",
594 ],
595 gen_reflections = 1,
596 includes = [
597 ":control_loops_fbs_includes",
598 ":profiled_subsystem_fbs_includes",
599 ],
600 target_compatible_with = ["@platforms//os:linux"],
601)
602
603flatbuffer_cc_library(
604 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
605 srcs = [
606 "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status.fbs",
607 ],
608 gen_reflections = 1,
Alex Perrycb7da4b2019-08-28 19:35:56 -0700609 includes = [
610 ":control_loops_fbs_includes",
611 ":profiled_subsystem_fbs_includes",
612 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800613 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700614)
615
Tyler Chatow12581562019-01-26 20:42:42 -0800616cc_test(
617 name = "static_zeroing_single_dof_profiled_subsystem_test",
618 srcs = [
619 "static_zeroing_single_dof_profiled_subsystem_test.cc",
620 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700621 data = [
622 ":static_zeroing_single_dof_profiled_subsystem_test_config",
623 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800624 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800625 deps = [
626 ":capped_test_plant",
627 ":position_sensor_sim",
628 ":static_zeroing_single_dof_profiled_subsystem",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700629 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
630 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
Tyler Chatow12581562019-01-26 20:42:42 -0800631 ":static_zeroing_single_dof_profiled_subsystem_test_plants",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700632 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
633 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
634 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
635 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
Tyler Chatow12581562019-01-26 20:42:42 -0800636 "//aos/testing:googletest",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700637 "//frc971/control_loops:control_loop_test",
Tyler Chatow12581562019-01-26 20:42:42 -0800638 ],
639)
Austin Schuha9df9ad2021-06-16 14:49:39 -0700640
641aos_config(
642 name = "static_zeroing_single_dof_profiled_subsystem_test_config",
643 src = "static_zeroing_single_dof_profiled_subsystem_test_config_source.json",
644 flatbuffers = [
645 "//frc971/input:joystick_state_fbs",
646 "//frc971/input:robot_state_fbs",
647 "//aos/logging:log_message_fbs",
648 "//aos/events:event_loop_fbs",
649 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
650 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
651 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
652 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
653 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
654 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
655 ],
656 target_compatible_with = ["@platforms//os:linux"],
657)