blob: a39f3df3d1948c9e7a6268ccb48ef7de1853c397 [file] [log] [blame]
Stephan Massaltd021f972020-01-05 20:41:23 -08001package(default_visibility = ["//visibility:public"])
2
James Kuszmaul5e6aa252021-08-28 22:19:29 -07003load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
Austin Schuh7d63eab2021-03-06 20:15:02 -08004load("@npm_bazel_typescript//:defs.bzl", "ts_library")
Stephan Massaltd021f972020-01-05 20:41:23 -08005
6flatbuffer_cc_library(
7 name = "superstructure_goal_fbs",
8 srcs = [
9 "superstructure_goal.fbs",
10 ],
11 gen_reflections = 1,
12 includes = [
13 "//frc971/control_loops:control_loops_fbs_includes",
14 "//frc971/control_loops:profiled_subsystem_fbs_includes",
15 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080016 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080017)
18
19flatbuffer_cc_library(
20 name = "superstructure_output_fbs",
21 srcs = [
22 "superstructure_output.fbs",
23 ],
24 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080025 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080026)
27
James Kuszmaul5e6aa252021-08-28 22:19:29 -070028flatbuffer_ts_library(
29 name = "superstructure_status_ts_fbs",
30 srcs = [
31 "superstructure_status.fbs",
32 ],
33 includes = [
34 "//frc971/control_loops:control_loops_fbs_includes",
35 "//frc971/control_loops:profiled_subsystem_fbs_includes",
36 ],
37 target_compatible_with = ["@platforms//os:linux"],
38)
39
Stephan Massaltd021f972020-01-05 20:41:23 -080040flatbuffer_cc_library(
41 name = "superstructure_status_fbs",
42 srcs = [
43 "superstructure_status.fbs",
44 ],
45 gen_reflections = 1,
46 includes = [
47 "//frc971/control_loops:control_loops_fbs_includes",
48 "//frc971/control_loops:profiled_subsystem_fbs_includes",
49 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080050 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080051)
52
53flatbuffer_cc_library(
54 name = "superstructure_position_fbs",
55 srcs = [
56 "superstructure_position.fbs",
57 ],
58 gen_reflections = 1,
59 includes = [
60 "//frc971/control_loops:control_loops_fbs_includes",
61 "//frc971/control_loops:profiled_subsystem_fbs_includes",
62 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080063 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080064)
65
66cc_library(
67 name = "superstructure_lib",
68 srcs = [
69 "superstructure.cc",
70 ],
71 hdrs = [
72 "superstructure.h",
73 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080074 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080075 deps = [
John Park0a245a02020-02-02 14:10:15 -080076 ":climber",
Stephan Massaltd021f972020-01-05 20:41:23 -080077 ":superstructure_goal_fbs",
78 ":superstructure_output_fbs",
79 ":superstructure_position_fbs",
80 ":superstructure_status_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -080081 "//aos/events:event_loop",
Austin Schuh0a3c9d42021-07-15 22:36:24 -070082 "//frc971/control_loops:control_loop",
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080083 "//frc971/control_loops:control_loops_fbs",
84 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -080085 "//y2020:constants",
Sabina Davis0f31d3f2020-02-20 20:41:00 -080086 "//y2020/control_loops/superstructure/shooter",
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080087 "//y2020/control_loops/superstructure/turret:aiming",
Stephan Massaltd021f972020-01-05 20:41:23 -080088 ],
89)
90
91cc_binary(
92 name = "superstructure",
93 srcs = [
94 "superstructure_main.cc",
95 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080096 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080097 deps = [
98 ":superstructure_lib",
99 "//aos:init",
100 "//aos/events:shm_event_loop",
101 ],
102)
Sabina Davis7704a652020-02-01 11:42:14 -0800103
104cc_test(
105 name = "superstructure_lib_test",
106 srcs = [
107 "superstructure_lib_test.cc",
108 ],
109 data = [
Austin Schuh14d7d3d2020-09-10 18:14:36 -0700110 "//y2020:config",
milind-u7baf7342021-08-25 18:31:26 -0700111 "@superstructure_replay",
Sabina Davis7704a652020-02-01 11:42:14 -0800112 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800113 target_compatible_with = ["@platforms//os:linux"],
Sabina Davis7704a652020-02-01 11:42:14 -0800114 deps = [
115 ":superstructure_goal_fbs",
116 ":superstructure_lib",
117 ":superstructure_output_fbs",
118 ":superstructure_position_fbs",
119 ":superstructure_status_fbs",
120 "//aos:math",
milind-u7baf7342021-08-25 18:31:26 -0700121 "//aos/events/logging:log_reader",
Austin Schuhb06f03b2021-02-17 22:00:37 -0800122 "//aos/events/logging:log_writer",
milind-u7baf7342021-08-25 18:31:26 -0700123 "//aos/network:team_number",
Sabina Davis7704a652020-02-01 11:42:14 -0800124 "//aos/testing:googletest",
125 "//aos/time",
126 "//frc971/control_loops:capped_test_plant",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700127 "//frc971/control_loops:control_loop_test",
Sabina Davis7704a652020-02-01 11:42:14 -0800128 "//frc971/control_loops:position_sensor_sim",
129 "//frc971/control_loops:team_number_test_environment",
130 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
131 "//y2020/control_loops/superstructure/hood:hood_plants",
Sabina Davis0f2d38c2020-02-08 17:01:21 -0800132 "//y2020/control_loops/superstructure/intake:intake_plants",
Sabina Davis0f31d3f2020-02-20 20:41:00 -0800133 "//y2020/control_loops/superstructure/shooter:shooter_plants",
Sabina Davis7704a652020-02-01 11:42:14 -0800134 ],
135)
John Park0a245a02020-02-02 14:10:15 -0800136
137cc_library(
138 name = "climber",
139 srcs = [
140 "climber.cc",
141 ],
142 hdrs = [
143 "climber.h",
144 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800145 target_compatible_with = ["@platforms//os:linux"],
John Park0a245a02020-02-02 14:10:15 -0800146 deps = [
147 ":superstructure_goal_fbs",
148 ":superstructure_output_fbs",
James Kuszmaul61750662021-06-21 21:32:33 -0700149 "//frc971/control_loops:control_loop",
John Park0a245a02020-02-02 14:10:15 -0800150 "//frc971/control_loops:control_loops_fbs",
151 "//frc971/control_loops:profiled_subsystem_fbs",
152 ],
153)
Austin Schuh7d63eab2021-03-06 20:15:02 -0800154
155ts_library(
James Kuszmaul78101402021-09-11 12:42:21 -0700156 name = "turret_plotter",
157 srcs = ["turret_plotter.ts"],
158 target_compatible_with = ["@platforms//os:linux"],
159 deps = [
James Kuszmaulda52ce62021-09-25 21:51:42 -0700160 "//aos:configuration_ts_fbs",
James Kuszmaul78101402021-09-11 12:42:21 -0700161 "//aos/network/www:aos_plotter",
162 "//aos/network/www:colors",
James Kuszmaulda52ce62021-09-25 21:51:42 -0700163 "//aos/network/www:plotter",
James Kuszmaul78101402021-09-11 12:42:21 -0700164 "//aos/network/www:proxy",
James Kuszmaulda52ce62021-09-25 21:51:42 -0700165 "//aos/network/www:reflection_ts",
166 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
James Kuszmaul78101402021-09-11 12:42:21 -0700167 ],
168)
169
170ts_library(
Austin Schuh7d63eab2021-03-06 20:15:02 -0800171 name = "finisher_plotter",
172 srcs = ["finisher_plotter.ts"],
173 target_compatible_with = ["@platforms//os:linux"],
174 deps = [
175 "//aos/network/www:aos_plotter",
Ravago Jones819ba1f2021-03-10 10:48:10 -0800176 "//aos/network/www:colors",
Austin Schuh7d63eab2021-03-06 20:15:02 -0800177 "//aos/network/www:proxy",
178 ],
179)
180
181ts_library(
182 name = "accelerator_plotter",
183 srcs = ["accelerator_plotter.ts"],
184 target_compatible_with = ["@platforms//os:linux"],
185 deps = [
186 "//aos/network/www:aos_plotter",
Ravago Jones819ba1f2021-03-10 10:48:10 -0800187 "//aos/network/www:colors",
Austin Schuh7d63eab2021-03-06 20:15:02 -0800188 "//aos/network/www:proxy",
189 ],
190)
Austin Schuh2efe1682021-03-06 22:47:15 -0800191
192ts_library(
193 name = "hood_plotter",
194 srcs = ["hood_plotter.ts"],
195 target_compatible_with = ["@platforms//os:linux"],
196 deps = [
197 "//aos/network/www:aos_plotter",
Ravago Jones819ba1f2021-03-10 10:48:10 -0800198 "//aos/network/www:colors",
Austin Schuh2efe1682021-03-06 22:47:15 -0800199 "//aos/network/www:proxy",
200 ],
201)