Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 2 | |
Philipp Schrader | 29d54f2 | 2016-04-02 22:14:48 +0000 | [diff] [blame] | 3 | cc_library( |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 4 | name = "averager", |
| 5 | hdrs = [ |
| 6 | "averager.h", |
| 7 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 8 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | d3f9eb2 | 2020-01-12 15:02:07 -0800 | [diff] [blame] | 9 | deps = [ |
| 10 | "@com_github_google_glog//:glog", |
| 11 | "@org_tuxfamily_eigen//:eigen", |
| 12 | ], |
Philipp Schrader | 29d54f2 | 2016-04-02 22:14:48 +0000 | [diff] [blame] | 13 | ) |
| 14 | |
| 15 | cc_test( |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 16 | name = "averager_test", |
| 17 | srcs = [ |
| 18 | "averager_test.cc", |
| 19 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 20 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 21 | deps = [ |
| 22 | ":averager", |
| 23 | "//aos/testing:googletest", |
James Kuszmaul | d3f9eb2 | 2020-01-12 15:02:07 -0800 | [diff] [blame] | 24 | "@org_tuxfamily_eigen//:eigen", |
| 25 | ], |
| 26 | ) |
| 27 | |
| 28 | cc_library( |
| 29 | name = "imu_zeroer", |
| 30 | srcs = [ |
| 31 | "imu_zeroer.cc", |
| 32 | ], |
| 33 | hdrs = [ |
| 34 | "imu_zeroer.h", |
| 35 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 36 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | d3f9eb2 | 2020-01-12 15:02:07 -0800 | [diff] [blame] | 37 | deps = [ |
| 38 | ":averager", |
James Kuszmaul | b1e2937 | 2020-02-11 16:55:36 -0800 | [diff] [blame] | 39 | "//frc971/control_loops:control_loops_fbs", |
| 40 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
James Kuszmaul | d3f9eb2 | 2020-01-12 15:02:07 -0800 | [diff] [blame] | 41 | "//frc971/wpilib:imu_fbs", |
| 42 | "@com_github_google_glog//:glog", |
| 43 | "@org_tuxfamily_eigen//:eigen", |
| 44 | ], |
| 45 | ) |
| 46 | |
| 47 | cc_test( |
| 48 | name = "imu_zeroer_test", |
| 49 | srcs = [ |
| 50 | "imu_zeroer_test.cc", |
| 51 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 52 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | d3f9eb2 | 2020-01-12 15:02:07 -0800 | [diff] [blame] | 53 | deps = [ |
| 54 | ":imu_zeroer", |
| 55 | "//aos:flatbuffers", |
| 56 | "//aos/testing:googletest", |
| 57 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 58 | ], |
Philipp Schrader | 29d54f2 | 2016-04-02 22:14:48 +0000 | [diff] [blame] | 59 | ) |
| 60 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 61 | cc_library( |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 62 | name = "zeroing", |
| 63 | srcs = [ |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 64 | ], |
| 65 | hdrs = [ |
| 66 | "zeroing.h", |
| 67 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 68 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 69 | deps = [ |
| 70 | ":wrap", |
Ravago Jones | 726deb0 | 2021-05-29 14:36:43 -0700 | [diff] [blame] | 71 | "//aos/containers:error_list", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 72 | "//aos/logging", |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 73 | "//frc971:constants", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 74 | "//frc971/control_loops:control_loops_fbs", |
| 75 | "@com_github_google_glog//:glog", |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 76 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 77 | ) |
| 78 | |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 79 | cc_library( |
| 80 | name = "zeroing_test_lib", |
| 81 | testonly = True, |
| 82 | hdrs = ["zeroing_test.h"], |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 83 | deps = [ |
| 84 | ":zeroing", |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 85 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 86 | "//frc971/control_loops:control_loops_fbs", |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 87 | "//frc971/control_loops:position_sensor_sim", |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 88 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 89 | ) |
Austin Schuh | c6423e6 | 2017-02-11 16:56:30 -0800 | [diff] [blame] | 90 | |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 91 | [ |
| 92 | ( |
| 93 | cc_library( |
| 94 | name = lib, |
| 95 | srcs = [lib + ".cc"], |
| 96 | hdrs = [lib + ".h"], |
| 97 | deps = [ |
| 98 | ":wrap", |
| 99 | ":zeroing", |
| 100 | "//aos/containers:error_list", |
| 101 | "//aos/logging", |
| 102 | "//frc971:constants", |
| 103 | "//frc971/control_loops:control_loops_fbs", |
| 104 | "@com_github_google_glog//:glog", |
| 105 | ], |
| 106 | ), |
| 107 | cc_test( |
| 108 | name = lib + "_test", |
| 109 | srcs = [lib + "_test.cc"], |
| 110 | deps = [ |
| 111 | lib, |
| 112 | ":zeroing", |
| 113 | ":zeroing_test_lib", |
| 114 | "//aos/testing:googletest", |
| 115 | "//frc971/control_loops:control_loops_fbs", |
| 116 | "//frc971/control_loops:position_sensor_sim", |
| 117 | ], |
| 118 | ), |
| 119 | ) |
| 120 | for lib in [ |
| 121 | "absolute_and_absolute_encoder", |
| 122 | "absolute_encoder", |
| 123 | "continuous_absolute_encoder", |
| 124 | "hall_effect_and_position", |
| 125 | "pot_and_absolute_encoder", |
| 126 | "pot_and_index", |
| 127 | "pulse_index", |
| 128 | ] |
| 129 | ] |
| 130 | |
Austin Schuh | c6423e6 | 2017-02-11 16:56:30 -0800 | [diff] [blame] | 131 | cc_library( |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 132 | name = "wrap", |
| 133 | srcs = [ |
| 134 | "wrap.cc", |
| 135 | ], |
| 136 | hdrs = [ |
| 137 | "wrap.h", |
| 138 | ], |
Austin Schuh | c6423e6 | 2017-02-11 16:56:30 -0800 | [diff] [blame] | 139 | ) |
| 140 | |
| 141 | cc_test( |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 142 | name = "wrap_test", |
| 143 | srcs = [ |
| 144 | "wrap_test.cc", |
| 145 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 146 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 4fae0fc | 2018-03-27 23:51:42 -0700 | [diff] [blame] | 147 | deps = [ |
| 148 | ":wrap", |
| 149 | "//aos/testing:googletest", |
| 150 | ], |
Austin Schuh | c6423e6 | 2017-02-11 16:56:30 -0800 | [diff] [blame] | 151 | ) |
Stephan Massalt | 4d1e74f | 2020-01-11 17:50:39 -0800 | [diff] [blame] | 152 | |
| 153 | cc_test( |
| 154 | name = "unwrap_test", |
| 155 | srcs = [ |
| 156 | "unwrap_test.cc", |
| 157 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 158 | target_compatible_with = ["@platforms//os:linux"], |
Stephan Massalt | 4d1e74f | 2020-01-11 17:50:39 -0800 | [diff] [blame] | 159 | deps = [ |
| 160 | ":wrap", |
| 161 | "//aos/testing:googletest", |
| 162 | ], |
| 163 | ) |