blob: 533a369265c355d53e014f23ec74df84934c3af1 [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 = [
58 ":superstructure_goal_fbs",
59 ":superstructure_output_fbs",
60 ":superstructure_position_fbs",
61 ":superstructure_status_fbs",
62 "//aos/controls:control_loop",
63 "//aos/events:event_loop",
64 "//y2020:constants",
65 ],
66)
67
68cc_binary(
69 name = "superstructure",
70 srcs = [
71 "superstructure_main.cc",
72 ],
73 deps = [
74 ":superstructure_lib",
75 "//aos:init",
76 "//aos/events:shm_event_loop",
77 ],
78)