blob: 215c760923f4544744ec82888f77aaba316f1b54 [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",
Stephan Massaltd021f972020-01-05 20:41:23 -080039 "@com_google_absl//absl/base",
40 ],
41)
42
43cc_binary(
44 name = "wpilib_interface",
45 srcs = [
46 "wpilib_interface.cc",
47 ],
48 restricted_to = ["//tools:roborio"],
49 deps = [
50 ":constants",
51 "//aos:init",
52 "//aos:make_unique",
53 "//aos:math",
54 "//aos/controls:control_loop",
55 "//aos/events:shm_event_loop",
56 "//aos/logging",
57 "//aos/robot_state:robot_state_fbs",
58 "//aos/stl_mutex",
59 "//aos/time",
60 "//aos/util:log_interval",
61 "//aos/util:phased_loop",
62 "//aos/util:wrapping_counter",
63 "//frc971/autonomous:auto_mode_fbs",
64 "//frc971/control_loops:control_loops_fbs",
65 "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
James Kuszmaula244a912020-01-18 13:50:50 -080066 "//frc971/wpilib:ADIS16470",
Stephan Massaltd021f972020-01-05 20:41:23 -080067 "//frc971/wpilib:buffered_pcm",
68 "//frc971/wpilib:drivetrain_writer",
69 "//frc971/wpilib:encoder_and_potentiometer",
70 "//frc971/wpilib:interrupt_edge_counting",
71 "//frc971/wpilib:joystick_sender",
72 "//frc971/wpilib:logging_fbs",
73 "//frc971/wpilib:loop_output_handler",
74 "//frc971/wpilib:pdp_fetcher",
75 "//frc971/wpilib:sensor_reader",
76 "//frc971/wpilib:wpilib_interface",
77 "//frc971/wpilib:wpilib_robot_base",
Stephan Massaltd021f972020-01-05 20:41:23 -080078 "//third_party:wpilib",
79 "//y2020/control_loops/superstructure:superstructure_output_fbs",
80 "//y2020/control_loops/superstructure:superstructure_position_fbs",
81 ],
82)
83
84cc_binary(
85 name = "joystick_reader",
86 srcs = [
87 ":joystick_reader.cc",
88 ],
89 deps = [
90 "//aos:init",
91 "//aos/actions:action_lib",
92 "//aos/input:action_joystick_input",
93 "//aos/input:drivetrain_input",
94 "//aos/input:joystick_input",
95 "//aos/logging",
96 "//frc971/autonomous:auto_fbs",
97 "//frc971/autonomous:base_autonomous_actor",
98 "//frc971/control_loops:profiled_subsystem_fbs",
99 "//y2020/control_loops/drivetrain:drivetrain_base",
100 "//y2020/control_loops/superstructure:superstructure_goal_fbs",
101 "//y2020/control_loops/superstructure:superstructure_status_fbs",
102 ],
103)
104
105aos_config(
106 name = "config",
107 src = "y2020.json",
108 flatbuffers = [
109 "//y2020/control_loops/superstructure:superstructure_goal_fbs",
110 "//y2020/control_loops/superstructure:superstructure_output_fbs",
111 "//y2020/control_loops/superstructure:superstructure_position_fbs",
James Kuszmaula244a912020-01-18 13:50:50 -0800112 "//y2019/control_loops/drivetrain:target_selector_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -0800113 "//y2020/control_loops/superstructure:superstructure_status_fbs",
Brian Silverman9dd793b2020-01-31 23:52:21 -0800114 "//y2020/vision:vision_fbs",
Brian Silverman967e5df2020-02-09 16:43:34 -0800115 "//y2020/vision/sift:sift_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -0800116 ],
117 visibility = ["//visibility:public"],
118 deps = [
119 "//aos/robot_state:config",
120 "//frc971/autonomous:config",
121 "//frc971/control_loops/drivetrain:config",
122 "//frc971/wpilib:config",
123 ],
124)
125
126py_library(
127 name = "python_init",
128 srcs = ["__init__.py"],
129 visibility = ["//visibility:public"],
130)
Alex Perry5f474f22020-02-01 12:14:24 -0800131
132sh_binary(
133 name = "web_proxy",
134 srcs = ["web_proxy.sh"],
135 data = [
136 ":config.json",
137 "//aos/network:web_proxy_main",
Alex Perry5f474f22020-02-01 12:14:24 -0800138 "//y2020/www:files",
139 "//y2020/www:flatbuffers",
Kai Tinkess10943cf2020-02-01 15:49:57 -0800140 "//y2020/www:main_bundle",
Alex Perry5f474f22020-02-01 12:14:24 -0800141 ],
142)