blob: f0f87d2c5b895f76c0c9e758903572f39db35dbc [file] [log] [blame]
Stephan Massaltd021f972020-01-05 20:41:23 -08001load("//frc971:downloader.bzl", "robot_downloader")
2load("//aos:config.bzl", "aos_config")
3load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
4load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
5
6robot_downloader(
7 data = [
8 ":config.json",
9 ],
10 start_binaries = [
11 ":joystick_reader",
12 ":wpilib_interface",
13 "//y2020/control_loops/drivetrain:drivetrain",
14 "//y2020/control_loops/superstructure:superstructure",
15 "//y2020/actors:binaries",
16 ],
17)
18
19cc_library(
20 name = "constants",
21 srcs = [
22 "constants.cc",
23 ],
24 hdrs = [
25 "constants.h",
26 ],
27 visibility = ["//visibility:public"],
28 deps = [
29 "//aos/logging",
30 "//aos/mutex",
31 "//aos/network:team_number",
32 "//frc971:constants",
33 "//frc971/control_loops:pose",
34 "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem",
35 "//y2020/control_loops/drivetrain:polydrivetrain_plants",
Sabina Davisa587fbd2020-01-31 22:11:15 -080036 "//y2020/control_loops/superstructure/hood:hood_plants",
Sabina Davise8d38992020-02-02 15:00:31 -080037 "//y2020/control_loops/superstructure/intake:intake_plants",
Kai Tinkess10943cf2020-02-01 15:49:57 -080038 "//y2020/control_loops/superstructure/turret:turret_plants",
ravago901c4262020-02-16 15:33:14 -080039 "//y2020/control_loops/superstructure/control_panel:control_panel_plants",
Stephan Massaltd021f972020-01-05 20:41:23 -080040 "@com_google_absl//absl/base",
41 ],
42)
43
44cc_binary(
45 name = "wpilib_interface",
46 srcs = [
47 "wpilib_interface.cc",
48 ],
49 restricted_to = ["//tools:roborio"],
50 deps = [
51 ":constants",
52 "//aos:init",
53 "//aos:make_unique",
54 "//aos:math",
55 "//aos/controls:control_loop",
56 "//aos/events:shm_event_loop",
57 "//aos/logging",
58 "//aos/robot_state:robot_state_fbs",
59 "//aos/stl_mutex",
60 "//aos/time",
61 "//aos/util:log_interval",
62 "//aos/util:phased_loop",
63 "//aos/util:wrapping_counter",
64 "//frc971/autonomous:auto_mode_fbs",
65 "//frc971/control_loops:control_loops_fbs",
66 "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
James Kuszmaula244a912020-01-18 13:50:50 -080067 "//frc971/wpilib:ADIS16470",
Stephan Massaltd021f972020-01-05 20:41:23 -080068 "//frc971/wpilib:buffered_pcm",
69 "//frc971/wpilib:drivetrain_writer",
70 "//frc971/wpilib:encoder_and_potentiometer",
71 "//frc971/wpilib:interrupt_edge_counting",
72 "//frc971/wpilib:joystick_sender",
73 "//frc971/wpilib:logging_fbs",
74 "//frc971/wpilib:loop_output_handler",
75 "//frc971/wpilib:pdp_fetcher",
76 "//frc971/wpilib:sensor_reader",
77 "//frc971/wpilib:wpilib_interface",
78 "//frc971/wpilib:wpilib_robot_base",
Stephan Massaltd021f972020-01-05 20:41:23 -080079 "//third_party:wpilib",
80 "//y2020/control_loops/superstructure:superstructure_output_fbs",
81 "//y2020/control_loops/superstructure:superstructure_position_fbs",
82 ],
83)
84
85cc_binary(
86 name = "joystick_reader",
87 srcs = [
88 ":joystick_reader.cc",
89 ],
90 deps = [
91 "//aos:init",
92 "//aos/actions:action_lib",
93 "//aos/input:action_joystick_input",
94 "//aos/input:drivetrain_input",
95 "//aos/input:joystick_input",
96 "//aos/logging",
97 "//frc971/autonomous:auto_fbs",
98 "//frc971/autonomous:base_autonomous_actor",
99 "//frc971/control_loops:profiled_subsystem_fbs",
100 "//y2020/control_loops/drivetrain:drivetrain_base",
101 "//y2020/control_loops/superstructure:superstructure_goal_fbs",
102 "//y2020/control_loops/superstructure:superstructure_status_fbs",
103 ],
104)
105
106aos_config(
107 name = "config",
108 src = "y2020.json",
109 flatbuffers = [
110 "//y2020/control_loops/superstructure:superstructure_goal_fbs",
111 "//y2020/control_loops/superstructure:superstructure_output_fbs",
112 "//y2020/control_loops/superstructure:superstructure_position_fbs",
James Kuszmaula244a912020-01-18 13:50:50 -0800113 "//y2019/control_loops/drivetrain:target_selector_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -0800114 "//y2020/control_loops/superstructure:superstructure_status_fbs",
Brian Silverman9dd793b2020-01-31 23:52:21 -0800115 "//y2020/vision:vision_fbs",
Brian Silverman967e5df2020-02-09 16:43:34 -0800116 "//y2020/vision/sift:sift_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -0800117 ],
118 visibility = ["//visibility:public"],
119 deps = [
120 "//aos/robot_state:config",
121 "//frc971/autonomous:config",
122 "//frc971/control_loops/drivetrain:config",
123 "//frc971/wpilib:config",
124 ],
125)
126
127py_library(
128 name = "python_init",
129 srcs = ["__init__.py"],
130 visibility = ["//visibility:public"],
131)
Alex Perry5f474f22020-02-01 12:14:24 -0800132
133sh_binary(
134 name = "web_proxy",
135 srcs = ["web_proxy.sh"],
136 data = [
137 ":config.json",
138 "//aos/network:web_proxy_main",
Alex Perry5f474f22020-02-01 12:14:24 -0800139 "//y2020/www:files",
140 "//y2020/www:flatbuffers",
Kai Tinkess10943cf2020-02-01 15:49:57 -0800141 "//y2020/www:main_bundle",
Alex Perry5f474f22020-02-01 12:14:24 -0800142 ],
143)