blob: 4534404d9f0c1b8b13dfa48f046f7a3707a8b8a2 [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 ],
15)
16
17flatbuffer_cc_library(
18 name = "superstructure_output_fbs",
19 srcs = [
20 "superstructure_output.fbs",
21 ],
22 gen_reflections = 1,
23)
24
25flatbuffer_cc_library(
26 name = "superstructure_status_fbs",
27 srcs = [
28 "superstructure_status.fbs",
29 ],
30 gen_reflections = 1,
31 includes = [
32 "//frc971/control_loops:control_loops_fbs_includes",
33 "//frc971/control_loops:profiled_subsystem_fbs_includes",
34 ],
35)
36
37flatbuffer_cc_library(
38 name = "superstructure_position_fbs",
39 srcs = [
40 "superstructure_position.fbs",
41 ],
42 gen_reflections = 1,
43 includes = [
44 "//frc971/control_loops:control_loops_fbs_includes",
45 "//frc971/control_loops:profiled_subsystem_fbs_includes",
46 ],
47)
48
49cc_library(
50 name = "superstructure_lib",
51 srcs = [
52 "superstructure.cc",
53 ],
54 hdrs = [
55 "superstructure.h",
56 ],
57 deps = [
John Park0a245a02020-02-02 14:10:15 -080058 ":climber",
Stephan Massaltd021f972020-01-05 20:41:23 -080059 ":superstructure_goal_fbs",
60 ":superstructure_output_fbs",
61 ":superstructure_position_fbs",
62 ":superstructure_status_fbs",
63 "//aos/controls:control_loop",
64 "//aos/events:event_loop",
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080065 "//frc971/control_loops:control_loops_fbs",
66 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -080067 "//y2020:constants",
Sabina Davis0f31d3f2020-02-20 20:41:00 -080068 "//y2020/control_loops/superstructure/shooter",
James Kuszmaulb1b2d8e2020-02-21 21:11:46 -080069 "//y2020/control_loops/superstructure/turret:aiming",
Stephan Massaltd021f972020-01-05 20:41:23 -080070 ],
71)
72
73cc_binary(
74 name = "superstructure",
75 srcs = [
76 "superstructure_main.cc",
77 ],
78 deps = [
79 ":superstructure_lib",
80 "//aos:init",
81 "//aos/events:shm_event_loop",
82 ],
83)
Sabina Davis7704a652020-02-01 11:42:14 -080084
85cc_test(
86 name = "superstructure_lib_test",
87 srcs = [
88 "superstructure_lib_test.cc",
89 ],
90 data = [
91 "//y2020:config.json",
92 ],
93 deps = [
94 ":superstructure_goal_fbs",
95 ":superstructure_lib",
96 ":superstructure_output_fbs",
97 ":superstructure_position_fbs",
98 ":superstructure_status_fbs",
99 "//aos:math",
100 "//aos/controls:control_loop_test",
Austin Schuh3290c632020-02-20 20:07:33 -0800101 "//aos/events/logging:logger",
Sabina Davis7704a652020-02-01 11:42:14 -0800102 "//aos/testing:googletest",
103 "//aos/time",
104 "//frc971/control_loops:capped_test_plant",
105 "//frc971/control_loops:position_sensor_sim",
106 "//frc971/control_loops:team_number_test_environment",
107 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
108 "//y2020/control_loops/superstructure/hood:hood_plants",
Sabina Davis0f2d38c2020-02-08 17:01:21 -0800109 "//y2020/control_loops/superstructure/intake:intake_plants",
Sabina Davis0f31d3f2020-02-20 20:41:00 -0800110 "//y2020/control_loops/superstructure/shooter:shooter_plants",
Sabina Davis7704a652020-02-01 11:42:14 -0800111 ],
112)
John Park0a245a02020-02-02 14:10:15 -0800113
114cc_library(
115 name = "climber",
116 srcs = [
117 "climber.cc",
118 ],
119 hdrs = [
120 "climber.h",
121 ],
122 deps = [
123 ":superstructure_goal_fbs",
124 ":superstructure_output_fbs",
125 "//aos/controls:control_loop",
126 "//frc971/control_loops:control_loops_fbs",
127 "//frc971/control_loops:profiled_subsystem_fbs",
128 ],
129)