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