blob: 9ec277264a2e1e1d0f06d2592db5c0851c9f08da [file] [log] [blame]
Austin Schuh4fae0fc2018-03-27 23:51:42 -07001package(default_visibility = ["//visibility:public"])
Brian Silverman100534c2015-09-07 15:51:23 -04002
Philipp Schrader29d54f22016-04-02 22:14:48 +00003cc_library(
Austin Schuh4fae0fc2018-03-27 23:51:42 -07004 name = "averager",
5 hdrs = [
6 "averager.h",
7 ],
Philipp Schraderdada1072020-11-24 11:34:46 -08008 target_compatible_with = ["@platforms//os:linux"],
James Kuszmauld3f9eb22020-01-12 15:02:07 -08009 deps = [
10 "@com_github_google_glog//:glog",
11 "@org_tuxfamily_eigen//:eigen",
12 ],
Philipp Schrader29d54f22016-04-02 22:14:48 +000013)
14
15cc_test(
Austin Schuh4fae0fc2018-03-27 23:51:42 -070016 name = "averager_test",
17 srcs = [
18 "averager_test.cc",
19 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080020 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh4fae0fc2018-03-27 23:51:42 -070021 deps = [
22 ":averager",
23 "//aos/testing:googletest",
James Kuszmauld3f9eb22020-01-12 15:02:07 -080024 "@org_tuxfamily_eigen//:eigen",
25 ],
26)
27
28cc_library(
29 name = "imu_zeroer",
30 srcs = [
31 "imu_zeroer.cc",
32 ],
33 hdrs = [
34 "imu_zeroer.h",
35 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080036 target_compatible_with = ["@platforms//os:linux"],
James Kuszmauld3f9eb22020-01-12 15:02:07 -080037 deps = [
38 ":averager",
James Kuszmaulb1e29372020-02-11 16:55:36 -080039 "//frc971/control_loops:control_loops_fbs",
40 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
James Kuszmauld3f9eb22020-01-12 15:02:07 -080041 "//frc971/wpilib:imu_fbs",
42 "@com_github_google_glog//:glog",
43 "@org_tuxfamily_eigen//:eigen",
44 ],
45)
46
47cc_test(
48 name = "imu_zeroer_test",
49 srcs = [
50 "imu_zeroer_test.cc",
51 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080052 target_compatible_with = ["@platforms//os:linux"],
James Kuszmauld3f9eb22020-01-12 15:02:07 -080053 deps = [
54 ":imu_zeroer",
55 "//aos:flatbuffers",
56 "//aos/testing:googletest",
57 "@org_tuxfamily_eigen//:eigen",
Austin Schuh4fae0fc2018-03-27 23:51:42 -070058 ],
Philipp Schrader29d54f22016-04-02 22:14:48 +000059)
60
Brian Silverman100534c2015-09-07 15:51:23 -040061cc_library(
Austin Schuh4fae0fc2018-03-27 23:51:42 -070062 name = "zeroing",
63 srcs = [
Philipp Schraderdada1072020-11-24 11:34:46 -080064 "absolute_and_absolute_encoder.cc",
Brian Silvermana57b7012020-03-11 20:19:23 -070065 "absolute_encoder.cc",
66 "hall_effect_and_position.cc",
67 "pot_and_absolute_encoder.cc",
68 "pot_and_index.cc",
69 "pulse_index.cc",
Austin Schuh4fae0fc2018-03-27 23:51:42 -070070 ],
71 hdrs = [
Philipp Schraderdada1072020-11-24 11:34:46 -080072 "absolute_and_absolute_encoder.h",
Brian Silvermana57b7012020-03-11 20:19:23 -070073 "absolute_encoder.h",
74 "hall_effect_and_position.h",
75 "pot_and_absolute_encoder.h",
76 "pot_and_index.h",
77 "pulse_index.h",
Austin Schuh4fae0fc2018-03-27 23:51:42 -070078 "zeroing.h",
79 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080080 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh4fae0fc2018-03-27 23:51:42 -070081 deps = [
82 ":wrap",
Alex Perrycb7da4b2019-08-28 19:35:56 -070083 "//aos/logging",
Austin Schuh4fae0fc2018-03-27 23:51:42 -070084 "//frc971:constants",
Alex Perrycb7da4b2019-08-28 19:35:56 -070085 "//frc971/control_loops:control_loops_fbs",
86 "@com_github_google_glog//:glog",
Austin Schuh4fae0fc2018-03-27 23:51:42 -070087 ],
Brian Silverman100534c2015-09-07 15:51:23 -040088)
89
90cc_test(
Austin Schuh4fae0fc2018-03-27 23:51:42 -070091 name = "zeroing_test",
92 srcs = [
Philipp Schraderdada1072020-11-24 11:34:46 -080093 "absolute_and_absolute_encoder_test.cc",
Brian Silvermana57b7012020-03-11 20:19:23 -070094 "absolute_encoder_test.cc",
95 "hall_effect_and_position_test.cc",
96 "pot_and_absolute_encoder_test.cc",
97 "pot_and_index_test.cc",
98 "pulse_index_test.cc",
99 "relative_encoder_test.cc",
100 "zeroing_test.h",
Austin Schuh4fae0fc2018-03-27 23:51:42 -0700101 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800102 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh4fae0fc2018-03-27 23:51:42 -0700103 deps = [
104 ":zeroing",
Austin Schuh4fae0fc2018-03-27 23:51:42 -0700105 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700106 "//frc971/control_loops:control_loops_fbs",
Austin Schuh4fae0fc2018-03-27 23:51:42 -0700107 "//frc971/control_loops:position_sensor_sim",
Austin Schuh4fae0fc2018-03-27 23:51:42 -0700108 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400109)
Austin Schuhc6423e62017-02-11 16:56:30 -0800110
111cc_library(
Austin Schuh4fae0fc2018-03-27 23:51:42 -0700112 name = "wrap",
113 srcs = [
114 "wrap.cc",
115 ],
116 hdrs = [
117 "wrap.h",
118 ],
Austin Schuhc6423e62017-02-11 16:56:30 -0800119)
120
121cc_test(
Austin Schuh4fae0fc2018-03-27 23:51:42 -0700122 name = "wrap_test",
123 srcs = [
124 "wrap_test.cc",
125 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800126 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh4fae0fc2018-03-27 23:51:42 -0700127 deps = [
128 ":wrap",
129 "//aos/testing:googletest",
130 ],
Austin Schuhc6423e62017-02-11 16:56:30 -0800131)
Stephan Massalt4d1e74f2020-01-11 17:50:39 -0800132
133cc_test(
134 name = "unwrap_test",
135 srcs = [
136 "unwrap_test.cc",
137 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800138 target_compatible_with = ["@platforms//os:linux"],
Stephan Massalt4d1e74f2020-01-11 17:50:39 -0800139 deps = [
140 ":wrap",
141 "//aos/testing:googletest",
142 ],
143)