blob: 3ea3dbf6cef0dc34cf3144f891af8d955e9f9d4d [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")
4
5flatbuffer_cc_library(
6 name = "superstructure_goal_fbs",
7 srcs = [
8 "superstructure_goal.fbs",
9 ],
10 gen_reflections = 1,
11 includes = [
12 "//frc971/control_loops:control_loops_fbs_includes",
13 "//frc971/control_loops:profiled_subsystem_fbs_includes",
14 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080015 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080016)
17
18flatbuffer_cc_library(
19 name = "superstructure_output_fbs",
20 srcs = [
21 "superstructure_output.fbs",
22 ],
23 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080024 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080025)
26
27flatbuffer_cc_library(
28 name = "superstructure_status_fbs",
29 srcs = [
30 "superstructure_status.fbs",
31 ],
32 gen_reflections = 1,
33 includes = [
34 "//frc971/control_loops:control_loops_fbs_includes",
35 "//frc971/control_loops:profiled_subsystem_fbs_includes",
36 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080037 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080038)
39
40flatbuffer_cc_library(
41 name = "superstructure_position_fbs",
42 srcs = [
43 "superstructure_position.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
53cc_library(
54 name = "superstructure_lib",
55 srcs = [
56 "superstructure.cc",
57 ],
58 hdrs = [
59 "superstructure.h",
60 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080061 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080062 deps = [
John Park0a245a02020-02-02 14:10:15 -080063 ":climber",
Stephan Massaltd021f972020-01-05 20:41:23 -080064 ":superstructure_goal_fbs",
65 ":superstructure_output_fbs",
66 ":superstructure_position_fbs",
67 ":superstructure_status_fbs",
68 "//aos/controls:control_loop",
69 "//aos/events:event_loop",
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080070 "//frc971/control_loops:control_loops_fbs",
71 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -080072 "//y2020:constants",
Sabina Davis0f31d3f2020-02-20 20:41:00 -080073 "//y2020/control_loops/superstructure/shooter",
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080074 "//y2020/control_loops/superstructure/turret:aiming",
Stephan Massaltd021f972020-01-05 20:41:23 -080075 ],
76)
77
78cc_binary(
79 name = "superstructure",
80 srcs = [
81 "superstructure_main.cc",
82 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080083 target_compatible_with = ["@platforms//os:linux"],
Stephan Massaltd021f972020-01-05 20:41:23 -080084 deps = [
85 ":superstructure_lib",
86 "//aos:init",
87 "//aos/events:shm_event_loop",
88 ],
89)
Sabina Davis7704a652020-02-01 11:42:14 -080090
91cc_test(
92 name = "superstructure_lib_test",
93 srcs = [
94 "superstructure_lib_test.cc",
95 ],
96 data = [
Austin Schuh14d7d3d2020-09-10 18:14:36 -070097 "//y2020:config",
Sabina Davis7704a652020-02-01 11:42:14 -080098 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080099 target_compatible_with = ["@platforms//os:linux"],
Sabina Davis7704a652020-02-01 11:42:14 -0800100 deps = [
101 ":superstructure_goal_fbs",
102 ":superstructure_lib",
103 ":superstructure_output_fbs",
104 ":superstructure_position_fbs",
105 ":superstructure_status_fbs",
106 "//aos:math",
107 "//aos/controls:control_loop_test",
Austin Schuhb06f03b2021-02-17 22:00:37 -0800108 "//aos/events/logging:log_writer",
Sabina Davis7704a652020-02-01 11:42:14 -0800109 "//aos/testing:googletest",
110 "//aos/time",
111 "//frc971/control_loops:capped_test_plant",
112 "//frc971/control_loops:position_sensor_sim",
113 "//frc971/control_loops:team_number_test_environment",
114 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
115 "//y2020/control_loops/superstructure/hood:hood_plants",
Sabina Davis0f2d38c2020-02-08 17:01:21 -0800116 "//y2020/control_loops/superstructure/intake:intake_plants",
Sabina Davis0f31d3f2020-02-20 20:41:00 -0800117 "//y2020/control_loops/superstructure/shooter:shooter_plants",
Sabina Davis7704a652020-02-01 11:42:14 -0800118 ],
119)
John Park0a245a02020-02-02 14:10:15 -0800120
121cc_library(
122 name = "climber",
123 srcs = [
124 "climber.cc",
125 ],
126 hdrs = [
127 "climber.h",
128 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800129 target_compatible_with = ["@platforms//os:linux"],
John Park0a245a02020-02-02 14:10:15 -0800130 deps = [
131 ":superstructure_goal_fbs",
132 ":superstructure_output_fbs",
133 "//aos/controls:control_loop",
134 "//frc971/control_loops:control_loops_fbs",
135 "//frc971/control_loops:profiled_subsystem_fbs",
136 ],
137)