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