blob: 3c1fe218494cbb1409b96b7594516768d6b78087 [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 = [
John Park33858a32018-09-28 23:05:48 -070014 "//aos/logging",
15 "//aos/network:team_number",
Brian Silverman1463c092020-10-30 17:28:24 -070016 "//aos/stl_mutex",
Brian Silverman6470f442018-08-05 12:08:16 -070017 "//frc971:constants",
18 "//frc971/shooter_interpolation:interpolation",
19 "//y2017/control_loops/drivetrain:polydrivetrain_plants",
20 "//y2017/control_loops/superstructure/column:column_plants",
21 "//y2017/control_loops/superstructure/hood:hood_plants",
22 "//y2017/control_loops/superstructure/intake:intake_plants",
23 "//y2017/control_loops/superstructure/shooter:shooter_plants",
Austin Schuhed5b26d2019-12-05 20:51:59 -080024 "@com_google_absl//absl/base",
Brian Silverman6470f442018-08-05 12:08:16 -070025 ],
Tyler Chatow6107aba2017-01-22 01:39:40 +000026)
Brian Silverman06016bc2017-02-11 16:34:34 -080027
28cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070029 name = "joystick_reader",
30 srcs = [
31 "joystick_reader.cc",
32 ],
33 deps = [
34 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -080035 "//aos:init",
John Park33858a32018-09-28 23:05:48 -070036 "//aos/actions:action_lib",
Austin Schuha250b2d2019-05-27 16:14:02 -070037 "//aos/input:action_joystick_input",
Brian Silverman6470f442018-08-05 12:08:16 -070038 "//aos/input:drivetrain_input",
Brian Silvermanf819b442019-01-20 16:51:04 -080039 "//aos/logging",
40 "//aos/time",
41 "//aos/util:log_interval",
Brian Silverman6470f442018-08-05 12:08:16 -070042 "//y2017/actors:autonomous_action_lib",
43 "//y2017/control_loops/drivetrain:drivetrain_base",
Alex Perrycb7da4b2019-08-28 19:35:56 -070044 "//y2017/control_loops/superstructure:superstructure_goal_fbs",
45 "//y2017/control_loops/superstructure:superstructure_status_fbs",
46 ],
47)
48
49aos_config(
50 name = "config",
51 src = "y2017.json",
52 flatbuffers = [
53 "//y2017/control_loops/superstructure:superstructure_goal_fbs",
54 "//y2017/control_loops/superstructure:superstructure_output_fbs",
55 "//y2017/control_loops/superstructure:superstructure_position_fbs",
56 "//y2017/control_loops/superstructure:superstructure_status_fbs",
57 "//y2017/vision:vision_fbs",
58 ],
59 visibility = ["//visibility:public"],
60 deps = [
61 "//aos/robot_state:config",
62 "//frc971/control_loops/drivetrain:config",
Brian Silverman6470f442018-08-05 12:08:16 -070063 ],
Campbell Crowley71b5f132017-02-18 13:16:08 -080064)
65
66cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070067 name = "wpilib_interface",
68 srcs = [
69 "wpilib_interface.cc",
70 ],
71 restricted_to = ["//tools:roborio"],
72 deps = [
73 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -080074 "//aos:init",
75 "//aos:make_unique",
John Park33858a32018-09-28 23:05:48 -070076 "//aos:math",
John Park33858a32018-09-28 23:05:48 -070077 "//aos/controls:control_loop",
78 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -070079 "//aos/robot_state:robot_state_fbs",
Brian Silvermanf819b442019-01-20 16:51:04 -080080 "//aos/stl_mutex",
81 "//aos/time",
John Park33858a32018-09-28 23:05:48 -070082 "//aos/util:log_interval",
83 "//aos/util:phased_loop",
84 "//aos/util:wrapping_counter",
Alex Perrycb7da4b2019-08-28 19:35:56 -070085 "//frc971/autonomous:auto_fbs",
Austin Schuhed5b26d2019-12-05 20:51:59 -080086 "//frc971/autonomous:auto_mode_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -070087 "//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)