Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 1 | load("//aos:config.bzl", "aos_config") |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 2 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
Austin Schuh | a1d006e | 2022-09-14 21:50:42 -0700 | [diff] [blame] | 3 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 4 | |
Philipp Schrader | cc016b3 | 2021-12-30 08:59:58 -0800 | [diff] [blame] | 5 | package(default_visibility = ["//visibility:public"]) |
| 6 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 7 | cc_library( |
Niko Sohmers | e69ee2d | 2022-09-28 19:52:27 -0700 | [diff] [blame] | 8 | name = "subsystem_simulator", |
| 9 | testonly = True, |
| 10 | hdrs = [ |
| 11 | "subsystem_simulator.h", |
| 12 | ], |
| 13 | target_compatible_with = ["@platforms//os:linux"], |
| 14 | deps = [ |
| 15 | "//frc971:constants", |
| 16 | "//frc971/control_loops:capped_test_plant", |
| 17 | "//frc971/control_loops:control_loop_test", |
| 18 | "//frc971/control_loops:position_sensor_sim", |
| 19 | ], |
| 20 | ) |
| 21 | |
| 22 | cc_library( |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 23 | name = "control_loop_test", |
| 24 | testonly = True, |
| 25 | srcs = [ |
| 26 | "control_loop_test.cc", |
| 27 | ], |
| 28 | hdrs = [ |
| 29 | "control_loop_test.h", |
| 30 | ], |
| 31 | target_compatible_with = ["@platforms//os:linux"], |
| 32 | deps = [ |
| 33 | "//aos:flatbuffers", |
| 34 | "//aos:json_to_flatbuffer", |
| 35 | "//aos/events:simulated_event_loop", |
Austin Schuh | 0debde1 | 2022-08-17 16:25:17 -0700 | [diff] [blame] | 36 | "//aos/network:testing_time_converter", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 37 | "//aos/testing:googletest", |
| 38 | "//aos/testing:test_logging", |
| 39 | "//aos/time", |
| 40 | "//frc971/input:joystick_state_fbs", |
| 41 | "//frc971/input:robot_state_fbs", |
| 42 | ], |
| 43 | ) |
| 44 | |
| 45 | cc_library( |
| 46 | name = "polytope", |
| 47 | hdrs = [ |
| 48 | "polytope.h", |
| 49 | ], |
| 50 | deps = [ |
| 51 | "@org_tuxfamily_eigen//:eigen", |
| 52 | ] + select({ |
| 53 | "@platforms//os:linux": [ |
| 54 | "//aos/logging", |
| 55 | "//third_party/cddlib", |
| 56 | "@com_github_google_glog//:glog", |
| 57 | ], |
| 58 | "//conditions:default": [], |
| 59 | }), |
| 60 | ) |
| 61 | |
| 62 | cc_test( |
| 63 | name = "polytope_test", |
| 64 | srcs = [ |
| 65 | "polytope_test.cc", |
| 66 | ], |
| 67 | target_compatible_with = ["@platforms//os:linux"], |
| 68 | deps = [ |
| 69 | ":polytope", |
| 70 | "//aos/testing:googletest", |
| 71 | "//aos/testing:test_logging", |
| 72 | "@org_tuxfamily_eigen//:eigen", |
| 73 | ], |
| 74 | ) |
| 75 | |
| 76 | cc_library( |
| 77 | name = "control_loop", |
| 78 | srcs = [ |
| 79 | "control_loop.cc", |
| 80 | "control_loop-tmpl.h", |
| 81 | ], |
| 82 | hdrs = [ |
| 83 | "control_loop.h", |
| 84 | ], |
| 85 | target_compatible_with = ["@platforms//os:linux"], |
| 86 | deps = [ |
| 87 | "//aos/events:event_loop", |
| 88 | "//aos/events:shm_event_loop", |
| 89 | "//aos/logging", |
| 90 | "//aos/time", |
| 91 | "//aos/util:log_interval", |
| 92 | "//frc971/input:joystick_state_fbs", |
| 93 | "//frc971/input:robot_state_fbs", |
| 94 | ], |
| 95 | ) |
| 96 | |
| 97 | cc_library( |
| 98 | name = "quaternion_utils", |
| 99 | srcs = [ |
| 100 | "quaternion_utils.cc", |
| 101 | ], |
| 102 | hdrs = [ |
| 103 | "quaternion_utils.h", |
| 104 | ], |
| 105 | target_compatible_with = ["@platforms//os:linux"], |
| 106 | deps = [ |
| 107 | "@com_github_google_glog//:glog", |
| 108 | "@org_tuxfamily_eigen//:eigen", |
| 109 | ], |
| 110 | ) |
| 111 | |
| 112 | cc_test( |
| 113 | name = "quarternion_utils_test", |
| 114 | srcs = [ |
| 115 | "quaternion_utils_test.cc", |
| 116 | ], |
| 117 | target_compatible_with = ["@platforms//os:linux"], |
| 118 | deps = [ |
milind-u | e53bf55 | 2021-12-11 14:42:00 -0800 | [diff] [blame] | 119 | ":jacobian", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 120 | ":quaternion_utils", |
milind-u | e53bf55 | 2021-12-11 14:42:00 -0800 | [diff] [blame] | 121 | ":runge_kutta", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 122 | "//aos/testing:googletest", |
| 123 | "//aos/testing:random_seed", |
| 124 | "@com_github_google_glog//:glog", |
| 125 | "@org_tuxfamily_eigen//:eigen", |
| 126 | ], |
| 127 | ) |
| 128 | |
| 129 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 130 | name = "team_number_test_environment", |
| 131 | testonly = True, |
| 132 | srcs = [ |
| 133 | "team_number_test_environment.cc", |
| 134 | ], |
| 135 | hdrs = [ |
| 136 | "team_number_test_environment.h", |
| 137 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 138 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 139 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 140 | "//aos/network:team_number", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 141 | "//aos/testing:googletest", |
| 142 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 143 | ) |
| 144 | |
| 145 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 146 | name = "hybrid_state_feedback_loop_test", |
| 147 | srcs = [ |
| 148 | "hybrid_state_feedback_loop_test.cc", |
| 149 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 150 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 151 | deps = [ |
| 152 | ":hybrid_state_feedback_loop", |
| 153 | "//aos/testing:googletest", |
| 154 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 155 | ) |
| 156 | |
| 157 | cc_library( |
James Kuszmaul | 9f9676d | 2019-01-25 21:27:58 -0800 | [diff] [blame] | 158 | name = "pose", |
| 159 | hdrs = ["pose.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 160 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 9f9676d | 2019-01-25 21:27:58 -0800 | [diff] [blame] | 161 | deps = [ |
| 162 | "//aos/util:math", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 163 | "@org_tuxfamily_eigen//:eigen", |
James Kuszmaul | 9f9676d | 2019-01-25 21:27:58 -0800 | [diff] [blame] | 164 | ], |
| 165 | ) |
| 166 | |
| 167 | cc_test( |
| 168 | name = "pose_test", |
| 169 | srcs = ["pose_test.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 170 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 9f9676d | 2019-01-25 21:27:58 -0800 | [diff] [blame] | 171 | deps = [ |
| 172 | ":pose", |
| 173 | "//aos/testing:googletest", |
| 174 | ], |
| 175 | ) |
| 176 | |
| 177 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 178 | name = "hall_effect_tracker", |
| 179 | hdrs = [ |
| 180 | "hall_effect_tracker.h", |
| 181 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 182 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 183 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 184 | ":control_loops_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 185 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 186 | ) |
| 187 | |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 188 | flatbuffer_ts_library( |
| 189 | name = "control_loops_ts_fbs", |
| 190 | srcs = [ |
| 191 | "control_loops.fbs", |
| 192 | ], |
| 193 | ) |
| 194 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 195 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 196 | name = "control_loops_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 197 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 198 | "control_loops.fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 199 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 200 | ) |
| 201 | |
Niko Sohmers | 76f4756 | 2023-12-20 20:59:06 -0800 | [diff] [blame] | 202 | flatbuffer_ts_library( |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 203 | name = "can_talonfx_ts_fbs", |
Niko Sohmers | 76f4756 | 2023-12-20 20:59:06 -0800 | [diff] [blame] | 204 | srcs = [ |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 205 | "can_talonfx.fbs", |
Niko Sohmers | 76f4756 | 2023-12-20 20:59:06 -0800 | [diff] [blame] | 206 | ], |
| 207 | ) |
| 208 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 209 | static_flatbuffer( |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 210 | name = "can_talonfx_fbs", |
Maxwell Henderson | ca1d18f | 2023-07-26 21:06:14 -0700 | [diff] [blame] | 211 | srcs = [ |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 212 | "can_talonfx.fbs", |
Maxwell Henderson | ca1d18f | 2023-07-26 21:06:14 -0700 | [diff] [blame] | 213 | ], |
| 214 | ) |
| 215 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 216 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 217 | name = "position_sensor_sim_test", |
| 218 | srcs = [ |
| 219 | "position_sensor_sim_test.cc", |
| 220 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 221 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 222 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 223 | ":control_loops_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 224 | ":position_sensor_sim", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 225 | "//aos/logging", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 226 | "//aos/testing:googletest", |
| 227 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 228 | ) |
| 229 | |
| 230 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 231 | name = "position_sensor_sim", |
| 232 | testonly = True, |
| 233 | srcs = [ |
| 234 | "position_sensor_sim.cc", |
| 235 | ], |
| 236 | hdrs = [ |
| 237 | "position_sensor_sim.h", |
| 238 | ], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 239 | linkopts = [ |
| 240 | "-lm", |
| 241 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 242 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 243 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 244 | ":control_loops_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 245 | ":gaussian_noise", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 246 | "//aos/testing:random_seed", |
Philipp Schrader | b3a057e | 2018-03-10 18:59:40 -0800 | [diff] [blame] | 247 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 248 | ) |
| 249 | |
| 250 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 251 | name = "gaussian_noise", |
| 252 | srcs = [ |
| 253 | "gaussian_noise.cc", |
| 254 | ], |
| 255 | hdrs = [ |
| 256 | "gaussian_noise.h", |
| 257 | ], |
Philipp Schrader | b3a057e | 2018-03-10 18:59:40 -0800 | [diff] [blame] | 258 | linkopts = [ |
| 259 | "-lm", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 260 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 261 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 262 | ) |
| 263 | |
| 264 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 265 | name = "coerce_goal", |
| 266 | srcs = [ |
| 267 | "coerce_goal.cc", |
| 268 | ], |
| 269 | hdrs = [ |
| 270 | "coerce_goal.h", |
| 271 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 272 | linkopts = select({ |
| 273 | "@platforms//os:linux": ["-lm"], |
| 274 | "//conditions:default": [], |
| 275 | }), |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 276 | deps = [ |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 277 | "//frc971/control_loops:polytope", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 278 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 279 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 280 | ) |
| 281 | |
Lee Mracek | 6568614 | 2020-01-10 22:21:39 -0500 | [diff] [blame] | 282 | cc_test( |
| 283 | name = "coerce_goal_test", |
| 284 | srcs = [ |
| 285 | "coerce_goal_test.cc", |
| 286 | ], |
| 287 | linkopts = [ |
| 288 | "-lm", |
| 289 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 290 | target_compatible_with = ["@platforms//os:linux"], |
Lee Mracek | 6568614 | 2020-01-10 22:21:39 -0500 | [diff] [blame] | 291 | deps = [ |
| 292 | ":coerce_goal", |
Lee Mracek | 6568614 | 2020-01-10 22:21:39 -0500 | [diff] [blame] | 293 | "//aos/testing:googletest", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 294 | "//frc971/control_loops:polytope", |
Lee Mracek | 6568614 | 2020-01-10 22:21:39 -0500 | [diff] [blame] | 295 | "@org_tuxfamily_eigen//:eigen", |
| 296 | ], |
| 297 | ) |
| 298 | |
Austin Schuh | 4cc4fe2 | 2017-11-23 19:13:09 -0800 | [diff] [blame] | 299 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 300 | name = "state_feedback_loop", |
| 301 | hdrs = [ |
| 302 | "state_feedback_loop.h", |
| 303 | ], |
| 304 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 305 | "//aos:macros", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 306 | "@org_tuxfamily_eigen//:eigen", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 307 | ] + select({ |
| 308 | "@platforms//os:linux": ["//aos/logging"], |
| 309 | "//conditions:default": [], |
| 310 | }), |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 311 | ) |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 312 | |
| 313 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 314 | name = "hybrid_state_feedback_loop", |
| 315 | hdrs = [ |
| 316 | "hybrid_state_feedback_loop.h", |
| 317 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 318 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 319 | deps = [ |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 320 | ":c2d", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 321 | ":state_feedback_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 322 | "//aos:macros", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 323 | "//aos/logging", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 324 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 325 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 326 | ], |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 327 | ) |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 328 | |
| 329 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 330 | name = "simple_capped_state_feedback_loop", |
| 331 | hdrs = [ |
| 332 | "simple_capped_state_feedback_loop.h", |
| 333 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 334 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 335 | deps = [ |
| 336 | ":state_feedback_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 337 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 338 | ], |
| 339 | ) |
| 340 | |
| 341 | cc_library( |
| 342 | name = "runge_kutta", |
| 343 | hdrs = [ |
| 344 | "runge_kutta.h", |
| 345 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 346 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 347 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 348 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 349 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 350 | ) |
| 351 | |
| 352 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 353 | name = "runge_kutta_test", |
| 354 | srcs = [ |
| 355 | "runge_kutta_test.cc", |
| 356 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 357 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 358 | deps = [ |
| 359 | ":runge_kutta", |
| 360 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 361 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 362 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 363 | ) |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 364 | |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 365 | cc_library( |
| 366 | name = "fixed_quadrature", |
| 367 | hdrs = [ |
| 368 | "fixed_quadrature.h", |
| 369 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 370 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a935a08 | 2023-02-20 21:45:54 -0800 | [diff] [blame] | 371 | deps = [ |
| 372 | "@org_tuxfamily_eigen//:eigen", |
| 373 | ], |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 374 | ) |
| 375 | |
| 376 | cc_test( |
| 377 | name = "fixed_quadrature_test", |
| 378 | srcs = [ |
| 379 | "fixed_quadrature_test.cc", |
| 380 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 381 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 382 | deps = [ |
| 383 | ":fixed_quadrature", |
| 384 | "//aos/testing:googletest", |
| 385 | ], |
| 386 | ) |
| 387 | |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 388 | flatbuffer_ts_library( |
| 389 | name = "profiled_subsystem_ts_fbs", |
| 390 | srcs = [ |
| 391 | "profiled_subsystem.fbs", |
| 392 | ], |
| 393 | deps = [ |
| 394 | ":control_loops_ts_fbs", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame^] | 395 | ":state_feedback_loop_ts_fbs", |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 396 | ], |
| 397 | ) |
| 398 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 399 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 400 | name = "profiled_subsystem_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 401 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 402 | "profiled_subsystem.fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 403 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 404 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 405 | deps = [ |
| 406 | ":control_loops_fbs", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame^] | 407 | ":state_feedback_loop_fbs", |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 408 | ], |
Austin Schuh | 9fe68f7 | 2019-08-10 19:32:03 -0700 | [diff] [blame] | 409 | ) |
| 410 | |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 411 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 412 | name = "profiled_subsystem", |
| 413 | srcs = [ |
| 414 | "profiled_subsystem.cc", |
| 415 | ], |
| 416 | hdrs = [ |
| 417 | "profiled_subsystem.h", |
| 418 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 419 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 420 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 421 | ":control_loops_fbs", |
| 422 | ":profiled_subsystem_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 423 | ":simple_capped_state_feedback_loop", |
| 424 | ":state_feedback_loop", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame^] | 425 | ":state_feedback_loop_converters", |
| 426 | "//aos:flatbuffer_merge", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 427 | "//aos/util:trapezoid_profile", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 428 | "//frc971/control_loops:control_loop", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 429 | "//frc971/zeroing", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 430 | "//frc971/zeroing:pot_and_index", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 431 | ], |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 432 | ) |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 433 | |
| 434 | cc_library( |
| 435 | name = "jacobian", |
| 436 | hdrs = [ |
| 437 | "jacobian.h", |
| 438 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 439 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 440 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 441 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 442 | ], |
| 443 | ) |
| 444 | |
| 445 | cc_test( |
| 446 | name = "jacobian_test", |
| 447 | srcs = [ |
| 448 | "jacobian_test.cc", |
| 449 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 450 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 451 | deps = [ |
| 452 | ":jacobian", |
| 453 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 454 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 455 | ], |
| 456 | ) |
| 457 | |
James Kuszmaul | 59a5c61 | 2019-01-22 07:56:08 -0800 | [diff] [blame] | 458 | cc_test( |
| 459 | name = "c2d_test", |
| 460 | srcs = [ |
| 461 | "c2d_test.cc", |
| 462 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 463 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 59a5c61 | 2019-01-22 07:56:08 -0800 | [diff] [blame] | 464 | visibility = ["//visibility:public"], |
| 465 | deps = [ |
| 466 | ":c2d", |
| 467 | ":runge_kutta", |
| 468 | "//aos/testing:googletest", |
| 469 | ], |
| 470 | ) |
| 471 | |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 472 | cc_library( |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 473 | name = "c2d", |
| 474 | hdrs = [ |
| 475 | "c2d.h", |
| 476 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 477 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 478 | visibility = ["//visibility:public"], |
| 479 | deps = [ |
James Kuszmaul | 651fc3f | 2019-05-15 21:14:25 -0700 | [diff] [blame] | 480 | "//aos/time", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 481 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 482 | ], |
| 483 | ) |
| 484 | |
| 485 | cc_library( |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 486 | name = "dlqr", |
| 487 | hdrs = [ |
| 488 | "dlqr.h", |
| 489 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 490 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 491 | visibility = ["//visibility:public"], |
| 492 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 493 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 494 | "@slycot_repo//:slicot", |
| 495 | ], |
| 496 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 497 | |
| 498 | py_library( |
| 499 | name = "python_init", |
| 500 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 501 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 502 | visibility = ["//visibility:public"], |
| 503 | deps = ["//frc971:python_init"], |
| 504 | ) |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame] | 505 | |
| 506 | cc_library( |
| 507 | name = "binomial", |
| 508 | hdrs = ["binomial.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 509 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame] | 510 | ) |
| 511 | |
| 512 | cc_test( |
| 513 | name = "binomial_test", |
| 514 | srcs = [ |
| 515 | "binomial_test.cc", |
| 516 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 517 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame] | 518 | deps = [ |
| 519 | ":binomial", |
| 520 | "//aos/testing:googletest", |
| 521 | ], |
| 522 | ) |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 523 | |
| 524 | cc_library( |
| 525 | name = "capped_test_plant", |
| 526 | testonly = True, |
| 527 | srcs = [ |
| 528 | "capped_test_plant.cc", |
| 529 | ], |
| 530 | hdrs = [ |
| 531 | "capped_test_plant.h", |
| 532 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 533 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 534 | deps = [ |
| 535 | ":state_feedback_loop", |
| 536 | "//aos/testing:googletest", |
| 537 | ], |
| 538 | ) |
| 539 | |
| 540 | cc_library( |
| 541 | name = "static_zeroing_single_dof_profiled_subsystem", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 542 | hdrs = [ |
| 543 | "static_zeroing_single_dof_profiled_subsystem.h", |
| 544 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 545 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 546 | deps = [ |
| 547 | "//frc971/control_loops:profiled_subsystem", |
| 548 | ], |
| 549 | ) |
| 550 | |
| 551 | genrule( |
| 552 | name = "genrule_static_zeroing_single_dof_profiled_subsystem_test", |
| 553 | outs = [ |
| 554 | "static_zeroing_single_dof_profiled_subsystem_test_plant.h", |
| 555 | "static_zeroing_single_dof_profiled_subsystem_test_plant.cc", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame^] | 556 | "static_zeroing_single_dof_profiled_subsystem_test_plant.json", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 557 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h", |
| 558 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame^] | 559 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.json", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 560 | ], |
| 561 | cmd = "$(location //frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test) $(OUTS)", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 562 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 563 | tools = [ |
| 564 | "//frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test", |
| 565 | ], |
| 566 | ) |
| 567 | |
| 568 | cc_library( |
| 569 | name = "static_zeroing_single_dof_profiled_subsystem_test_plants", |
| 570 | srcs = [ |
| 571 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc", |
| 572 | "static_zeroing_single_dof_profiled_subsystem_test_plant.cc", |
| 573 | ], |
| 574 | hdrs = [ |
| 575 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h", |
| 576 | "static_zeroing_single_dof_profiled_subsystem_test_plant.h", |
| 577 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 578 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 579 | deps = [ |
| 580 | ":state_feedback_loop", |
| 581 | ], |
| 582 | ) |
| 583 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 584 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 585 | name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 586 | srcs = [ |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 587 | "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal.fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 588 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 589 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 590 | deps = [ |
| 591 | ":control_loops_fbs", |
| 592 | ":profiled_subsystem_fbs", |
| 593 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 594 | ) |
| 595 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 596 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 597 | name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs", |
| 598 | srcs = [ |
| 599 | "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output.fbs", |
| 600 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 601 | target_compatible_with = ["@platforms//os:linux"], |
| 602 | ) |
| 603 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 604 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 605 | name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs", |
| 606 | srcs = [ |
| 607 | "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position.fbs", |
| 608 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 609 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 610 | deps = [ |
| 611 | ":control_loops_fbs", |
| 612 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 613 | ) |
| 614 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 615 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 616 | name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs", |
| 617 | srcs = [ |
| 618 | "static_zeroing_single_dof_profiled_subsystem_test_absolute_position.fbs", |
| 619 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 620 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 621 | deps = [ |
| 622 | ":control_loops_fbs", |
| 623 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 624 | ) |
| 625 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 626 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 627 | name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs", |
| 628 | srcs = [ |
| 629 | "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status.fbs", |
| 630 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 631 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 632 | deps = [ |
| 633 | ":control_loops_fbs", |
| 634 | ":profiled_subsystem_fbs", |
| 635 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 636 | ) |
| 637 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 638 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 639 | name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs", |
| 640 | srcs = [ |
| 641 | "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status.fbs", |
| 642 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 643 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 644 | deps = [ |
| 645 | ":control_loops_fbs", |
| 646 | ":profiled_subsystem_fbs", |
| 647 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 648 | ) |
| 649 | |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 650 | cc_test( |
| 651 | name = "static_zeroing_single_dof_profiled_subsystem_test", |
| 652 | srcs = [ |
| 653 | "static_zeroing_single_dof_profiled_subsystem_test.cc", |
| 654 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 655 | data = [ |
| 656 | ":static_zeroing_single_dof_profiled_subsystem_test_config", |
| 657 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 658 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 659 | deps = [ |
| 660 | ":capped_test_plant", |
| 661 | ":position_sensor_sim", |
| 662 | ":static_zeroing_single_dof_profiled_subsystem", |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 663 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs", |
| 664 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 665 | ":static_zeroing_single_dof_profiled_subsystem_test_plants", |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 666 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs", |
| 667 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs", |
| 668 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs", |
| 669 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 670 | "//aos/testing:googletest", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 671 | "//frc971/control_loops:control_loop_test", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 672 | "//frc971/zeroing:absolute_and_absolute_encoder", |
| 673 | "//frc971/zeroing:absolute_encoder", |
| 674 | "//frc971/zeroing:pot_and_absolute_encoder", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 675 | ], |
| 676 | ) |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 677 | |
| 678 | aos_config( |
| 679 | name = "static_zeroing_single_dof_profiled_subsystem_test_config", |
| 680 | src = "static_zeroing_single_dof_profiled_subsystem_test_config_source.json", |
| 681 | flatbuffers = [ |
| 682 | "//frc971/input:joystick_state_fbs", |
| 683 | "//frc971/input:robot_state_fbs", |
| 684 | "//aos/logging:log_message_fbs", |
| 685 | "//aos/events:event_loop_fbs", |
| 686 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs", |
| 687 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs", |
| 688 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs", |
| 689 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs", |
| 690 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs", |
| 691 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs", |
| 692 | ], |
| 693 | target_compatible_with = ["@platforms//os:linux"], |
| 694 | ) |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame^] | 695 | |
| 696 | static_flatbuffer( |
| 697 | name = "state_feedback_loop_fbs", |
| 698 | srcs = ["state_feedback_loop.fbs"], |
| 699 | deps = ["//frc971/math:matrix_fbs"], |
| 700 | ) |
| 701 | |
| 702 | flatbuffer_ts_library( |
| 703 | name = "state_feedback_loop_ts_fbs", |
| 704 | srcs = ["state_feedback_loop.fbs"], |
| 705 | deps = ["//frc971/math:matrix_ts_fbs"], |
| 706 | ) |
| 707 | |
| 708 | cc_library( |
| 709 | name = "hybrid_state_feedback_loop_converters", |
| 710 | srcs = ["hybrid_state_feedback_loop_converters.h"], |
| 711 | deps = [ |
| 712 | ":hybrid_state_feedback_loop", |
| 713 | ":state_feedback_loop_converters", |
| 714 | ":state_feedback_loop_fbs", |
| 715 | "//frc971/math:flatbuffers_matrix", |
| 716 | ], |
| 717 | ) |
| 718 | |
| 719 | cc_library( |
| 720 | name = "state_feedback_loop_converters", |
| 721 | srcs = ["state_feedback_loop_converters.h"], |
| 722 | deps = [ |
| 723 | ":state_feedback_loop", |
| 724 | ":state_feedback_loop_fbs", |
| 725 | "//frc971/math:flatbuffers_matrix", |
| 726 | ], |
| 727 | ) |