blob: 885bf783e9b6fbac32ba7821a1fea161a4573b57 [file] [log] [blame]
Stephan Massaltd021f972020-01-05 20:41:23 -08001package(default_visibility = ["//visibility:public"])
2
3load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_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
28flatbuffer_cc_library(
29 name = "superstructure_status_fbs",
30 srcs = [
31 "superstructure_status.fbs",
32 ],
33 gen_reflections = 1,
34 includes = [
35 "//frc971/control_loops:control_loops_fbs_includes",
36 "//frc971/control_loops:profiled_subsystem_fbs_includes",
37 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080038 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080039)
40
41flatbuffer_cc_library(
42 name = "superstructure_position_fbs",
43 srcs = [
44 "superstructure_position.fbs",
45 ],
46 gen_reflections = 1,
47 includes = [
48 "//frc971/control_loops:control_loops_fbs_includes",
49 "//frc971/control_loops:profiled_subsystem_fbs_includes",
50 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080051 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080052)
53
54cc_library(
55 name = "superstructure_lib",
56 srcs = [
57 "superstructure.cc",
58 ],
59 hdrs = [
60 "superstructure.h",
61 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080062 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080063 deps = [
John Park0a245a02020-02-02 14:10:15 -080064 ":climber",
Stephan Massaltd021f972020-01-05 20:41:23 -080065 ":superstructure_goal_fbs",
66 ":superstructure_output_fbs",
67 ":superstructure_position_fbs",
68 ":superstructure_status_fbs",
69 "//aos/controls:control_loop",
70 "//aos/events:event_loop",
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080071 "//frc971/control_loops:control_loops_fbs",
72 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -080073 "//y2020:constants",
Sabina Davis0f31d3f2020-02-20 20:41:00 -080074 "//y2020/control_loops/superstructure/shooter",
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080075 "//y2020/control_loops/superstructure/turret:aiming",
Stephan Massaltd021f972020-01-05 20:41:23 -080076 ],
77)
78
79cc_binary(
80 name = "superstructure",
81 srcs = [
82 "superstructure_main.cc",
83 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080084 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080085 deps = [
86 ":superstructure_lib",
87 "//aos:init",
88 "//aos/events:shm_event_loop",
89 ],
90)
Sabina Davis7704a652020-02-01 11:42:14 -080091
92cc_test(
93 name = "superstructure_lib_test",
94 srcs = [
95 "superstructure_lib_test.cc",
96 ],
97 data = [
Austin Schuh14d7d3d2020-09-10 18:14:36 -070098 "//y2020:config",
Sabina Davis7704a652020-02-01 11:42:14 -080099 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800100 target_compatible_with = ["@platforms//os:linux"],
Sabina Davis7704a652020-02-01 11:42:14 -0800101 deps = [
102 ":superstructure_goal_fbs",
103 ":superstructure_lib",
104 ":superstructure_output_fbs",
105 ":superstructure_position_fbs",
106 ":superstructure_status_fbs",
107 "//aos:math",
108 "//aos/controls:control_loop_test",
Austin Schuhb06f03b2021-02-17 22:00:37 -0800109 "//aos/events/logging:log_writer",
Sabina Davis7704a652020-02-01 11:42:14 -0800110 "//aos/testing:googletest",
111 "//aos/time",
112 "//frc971/control_loops:capped_test_plant",
113 "//frc971/control_loops:position_sensor_sim",
114 "//frc971/control_loops:team_number_test_environment",
115 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
116 "//y2020/control_loops/superstructure/hood:hood_plants",
Sabina Davis0f2d38c2020-02-08 17:01:21 -0800117 "//y2020/control_loops/superstructure/intake:intake_plants",
Sabina Davis0f31d3f2020-02-20 20:41:00 -0800118 "//y2020/control_loops/superstructure/shooter:shooter_plants",
Sabina Davis7704a652020-02-01 11:42:14 -0800119 ],
120)
John Park0a245a02020-02-02 14:10:15 -0800121
122cc_library(
123 name = "climber",
124 srcs = [
125 "climber.cc",
126 ],
127 hdrs = [
128 "climber.h",
129 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800130 target_compatible_with = ["@platforms//os:linux"],
John Park0a245a02020-02-02 14:10:15 -0800131 deps = [
132 ":superstructure_goal_fbs",
133 ":superstructure_output_fbs",
134 "//aos/controls:control_loop",
135 "//frc971/control_loops:control_loops_fbs",
136 "//frc971/control_loops:profiled_subsystem_fbs",
137 ],
138)
Austin Schuh7d63eab2021-03-06 20:15:02 -0800139
140ts_library(
141 name = "finisher_plotter",
142 srcs = ["finisher_plotter.ts"],
143 target_compatible_with = ["@platforms//os:linux"],
144 deps = [
145 "//aos/network/www:aos_plotter",
146 "//aos/network/www:proxy",
147 ],
148)
149
150ts_library(
151 name = "accelerator_plotter",
152 srcs = ["accelerator_plotter.ts"],
153 target_compatible_with = ["@platforms//os:linux"],
154 deps = [
155 "//aos/network/www:aos_plotter",
156 "//aos/network/www:proxy",
157 ],
158)