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