blob: 8bf2ff80e1517d813bf01aa4f05e57bab8382b35 [file] [log] [blame]
Brian Silvermanf819b442019-01-20 16:51:04 -08001load("//frc971:downloader.bzl", "robot_downloader")
Alex Perrycb7da4b2019-08-28 19:35:56 -07002load("//aos:config.bzl", "aos_config")
Austin Schuh7b9a3ba2017-02-19 23:11:45 -08003
Tyler Chatow6107aba2017-01-22 01:39:40 +00004cc_library(
Brian Silverman6470f442018-08-05 12:08:16 -07005 name = "constants",
6 srcs = [
7 "constants.cc",
8 ],
9 hdrs = [
10 "constants.h",
11 ],
12 visibility = ["//visibility:public"],
13 deps = [
14 "//aos:once",
John Park33858a32018-09-28 23:05:48 -070015 "//aos/logging",
Brian Silvermanf819b442019-01-20 16:51:04 -080016 "//aos/mutex",
John Parkbb458cd2019-11-03 19:18:43 -080017 "@com_google_absl//absl/base",
John Park33858a32018-09-28 23:05:48 -070018 "//aos/network:team_number",
Brian Silverman6470f442018-08-05 12:08:16 -070019 "//frc971:constants",
20 "//frc971/shooter_interpolation:interpolation",
21 "//y2017/control_loops/drivetrain:polydrivetrain_plants",
22 "//y2017/control_loops/superstructure/column:column_plants",
23 "//y2017/control_loops/superstructure/hood:hood_plants",
24 "//y2017/control_loops/superstructure/intake:intake_plants",
25 "//y2017/control_loops/superstructure/shooter:shooter_plants",
26 ],
Tyler Chatow6107aba2017-01-22 01:39:40 +000027)
Brian Silverman06016bc2017-02-11 16:34:34 -080028
29cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070030 name = "joystick_reader",
31 srcs = [
32 "joystick_reader.cc",
33 ],
34 deps = [
35 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -080036 "//aos:init",
John Park33858a32018-09-28 23:05:48 -070037 "//aos/actions:action_lib",
Austin Schuha250b2d2019-05-27 16:14:02 -070038 "//aos/input:action_joystick_input",
Brian Silverman6470f442018-08-05 12:08:16 -070039 "//aos/input:drivetrain_input",
Brian Silvermanf819b442019-01-20 16:51:04 -080040 "//aos/logging",
41 "//aos/time",
42 "//aos/util:log_interval",
Brian Silverman6470f442018-08-05 12:08:16 -070043 "//y2017/actors:autonomous_action_lib",
44 "//y2017/control_loops/drivetrain:drivetrain_base",
Alex Perrycb7da4b2019-08-28 19:35:56 -070045 "//y2017/control_loops/superstructure:superstructure_goal_fbs",
46 "//y2017/control_loops/superstructure:superstructure_status_fbs",
47 ],
48)
49
50aos_config(
51 name = "config",
52 src = "y2017.json",
53 flatbuffers = [
54 "//y2017/control_loops/superstructure:superstructure_goal_fbs",
55 "//y2017/control_loops/superstructure:superstructure_output_fbs",
56 "//y2017/control_loops/superstructure:superstructure_position_fbs",
57 "//y2017/control_loops/superstructure:superstructure_status_fbs",
58 "//y2017/vision:vision_fbs",
59 ],
60 visibility = ["//visibility:public"],
61 deps = [
62 "//aos/robot_state:config",
63 "//frc971/control_loops/drivetrain:config",
Brian Silverman6470f442018-08-05 12:08:16 -070064 ],
Campbell Crowley71b5f132017-02-18 13:16:08 -080065)
66
67cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070068 name = "wpilib_interface",
69 srcs = [
70 "wpilib_interface.cc",
71 ],
72 restricted_to = ["//tools:roborio"],
73 deps = [
74 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -080075 "//aos:init",
76 "//aos:make_unique",
John Park33858a32018-09-28 23:05:48 -070077 "//aos:math",
John Park33858a32018-09-28 23:05:48 -070078 "//aos/controls:control_loop",
79 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -070080 "//aos/robot_state:robot_state_fbs",
Brian Silvermanf819b442019-01-20 16:51:04 -080081 "//aos/stl_mutex",
82 "//aos/time",
John Park33858a32018-09-28 23:05:48 -070083 "//aos/util:log_interval",
84 "//aos/util:phased_loop",
85 "//aos/util:wrapping_counter",
Alex Perrycb7da4b2019-08-28 19:35:56 -070086 "//frc971/autonomous:auto_fbs",
87 "//frc971/control_loops:control_loops_fbs",
88 "//frc971/control_loops/drivetrain:drivetrain_output_fbs",
89 "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -070090 "//frc971/wpilib:ADIS16448",
91 "//frc971/wpilib:buffered_pcm",
92 "//frc971/wpilib:dma",
93 "//frc971/wpilib:dma_edge_counting",
Sabina Davis7af11ad2019-02-03 01:16:45 -080094 "//frc971/wpilib:drivetrain_writer",
Brian Silverman6470f442018-08-05 12:08:16 -070095 "//frc971/wpilib:encoder_and_potentiometer",
96 "//frc971/wpilib:interrupt_edge_counting",
97 "//frc971/wpilib:joystick_sender",
Alex Perrycb7da4b2019-08-28 19:35:56 -070098 "//frc971/wpilib:logging_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -070099 "//frc971/wpilib:loop_output_handler",
100 "//frc971/wpilib:pdp_fetcher",
Austin Schuhbf29b6f2019-02-02 21:45:27 -0800101 "//frc971/wpilib:sensor_reader",
Brian Silverman6470f442018-08-05 12:08:16 -0700102 "//frc971/wpilib:wpilib_robot_base",
103 "//third_party:wpilib",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700104 "//y2017/control_loops/superstructure:superstructure_output_fbs",
105 "//y2017/control_loops/superstructure:superstructure_position_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700106 ],
Brian Silverman06016bc2017-02-11 16:34:34 -0800107)
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800108
Lee Mracek6821fe02018-11-01 17:27:30 -0400109robot_downloader(
Brian Silvermanf819b442019-01-20 16:51:04 -0800110 start_binaries = [
111 ":joystick_reader",
112 ":wpilib_interface",
113 "//y2017/control_loops/drivetrain:drivetrain",
114 "//y2017/control_loops/superstructure:superstructure",
115 "//y2017/actors:autonomous_action",
116 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700117)
118
119py_library(
120 name = "python_init",
121 srcs = ["__init__.py"],
122 visibility = ["//visibility:public"],
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800123)