blob: d2e6082991b85c9f6886736292d940270c3e8fbe [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",
Stephan Massaltd021f972020-01-05 20:41:23 -080038 "@com_google_absl//absl/base",
39 ],
40)
41
42cc_binary(
43 name = "wpilib_interface",
44 srcs = [
45 "wpilib_interface.cc",
46 ],
47 restricted_to = ["//tools:roborio"],
48 deps = [
49 ":constants",
50 "//aos:init",
51 "//aos:make_unique",
52 "//aos:math",
53 "//aos/controls:control_loop",
54 "//aos/events:shm_event_loop",
55 "//aos/logging",
56 "//aos/robot_state:robot_state_fbs",
57 "//aos/stl_mutex",
58 "//aos/time",
59 "//aos/util:log_interval",
60 "//aos/util:phased_loop",
61 "//aos/util:wrapping_counter",
62 "//frc971/autonomous:auto_mode_fbs",
63 "//frc971/control_loops:control_loops_fbs",
64 "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
James Kuszmaula244a912020-01-18 13:50:50 -080065 "//frc971/wpilib:ADIS16470",
Stephan Massaltd021f972020-01-05 20:41:23 -080066 "//frc971/wpilib:buffered_pcm",
67 "//frc971/wpilib:drivetrain_writer",
68 "//frc971/wpilib:encoder_and_potentiometer",
69 "//frc971/wpilib:interrupt_edge_counting",
70 "//frc971/wpilib:joystick_sender",
71 "//frc971/wpilib:logging_fbs",
72 "//frc971/wpilib:loop_output_handler",
73 "//frc971/wpilib:pdp_fetcher",
74 "//frc971/wpilib:sensor_reader",
75 "//frc971/wpilib:wpilib_interface",
76 "//frc971/wpilib:wpilib_robot_base",
Stephan Massaltd021f972020-01-05 20:41:23 -080077 "//third_party:wpilib",
78 "//y2020/control_loops/superstructure:superstructure_output_fbs",
79 "//y2020/control_loops/superstructure:superstructure_position_fbs",
80 ],
81)
82
83cc_binary(
84 name = "joystick_reader",
85 srcs = [
86 ":joystick_reader.cc",
87 ],
88 deps = [
89 "//aos:init",
90 "//aos/actions:action_lib",
91 "//aos/input:action_joystick_input",
92 "//aos/input:drivetrain_input",
93 "//aos/input:joystick_input",
94 "//aos/logging",
95 "//frc971/autonomous:auto_fbs",
96 "//frc971/autonomous:base_autonomous_actor",
97 "//frc971/control_loops:profiled_subsystem_fbs",
98 "//y2020/control_loops/drivetrain:drivetrain_base",
99 "//y2020/control_loops/superstructure:superstructure_goal_fbs",
100 "//y2020/control_loops/superstructure:superstructure_status_fbs",
101 ],
102)
103
104aos_config(
105 name = "config",
106 src = "y2020.json",
107 flatbuffers = [
108 "//y2020/control_loops/superstructure:superstructure_goal_fbs",
109 "//y2020/control_loops/superstructure:superstructure_output_fbs",
110 "//y2020/control_loops/superstructure:superstructure_position_fbs",
James Kuszmaula244a912020-01-18 13:50:50 -0800111 "//y2019/control_loops/drivetrain:target_selector_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -0800112 "//y2020/control_loops/superstructure:superstructure_status_fbs",
Brian Silverman9dd793b2020-01-31 23:52:21 -0800113 "//y2020/vision:vision_fbs",
Stephan Massaltd021f972020-01-05 20:41:23 -0800114 ],
115 visibility = ["//visibility:public"],
116 deps = [
117 "//aos/robot_state:config",
118 "//frc971/autonomous:config",
119 "//frc971/control_loops/drivetrain:config",
120 "//frc971/wpilib:config",
121 ],
122)
123
124py_library(
125 name = "python_init",
126 srcs = ["__init__.py"],
127 visibility = ["//visibility:public"],
128)