blob: 520dd4b237cfbf9c0fa290ac0c78000a9ae63c5e [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")
Comran Morshed9a9948c2016-01-16 15:58:04 +00003
4cc_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",
Brian Silvermanf819b442019-01-20 16:51:04 -080015 "//aos/mutex",
John Park33858a32018-09-28 23:05:48 -070016 "//aos/network:team_number",
Brian Silverman6470f442018-08-05 12:08:16 -070017 "//frc971:constants",
18 "//frc971:shifter_hall_effect",
19 "//frc971/control_loops:state_feedback_loop",
20 "//y2016/control_loops/drivetrain:polydrivetrain_plants",
Austin Schuhed5b26d2019-12-05 20:51:59 -080021 "@com_google_absl//absl/base",
Brian Silverman6470f442018-08-05 12:08:16 -070022 ],
Comran Morshed9a9948c2016-01-16 15:58:04 +000023)
24
25cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070026 name = "joystick_reader",
27 srcs = [
28 "joystick_reader.cc",
29 ],
30 deps = [
31 ":constants",
John Park398c74a2018-10-20 21:17:39 -070032 "//aos:init",
Brian Silvermanf819b442019-01-20 16:51:04 -080033 "//aos/actions:action_lib",
Austin Schuha250b2d2019-05-27 16:14:02 -070034 "//aos/input:action_joystick_input",
Brian Silvermanf819b442019-01-20 16:51:04 -080035 "//aos/logging",
36 "//aos/time",
37 "//aos/util:log_interval",
Alex Perrycb7da4b2019-08-28 19:35:56 -070038 "//frc971/autonomous:auto_fbs",
39 "//frc971/control_loops/drivetrain:drivetrain_goal_fbs",
40 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -070041 "//frc971/queues:gyro",
42 "//y2016/actors:autonomous_action_lib",
43 "//y2016/actors:superstructure_action_lib",
44 "//y2016/actors:vision_align_action_lib",
Alex Perrycb7da4b2019-08-28 19:35:56 -070045 "//y2016/control_loops/shooter:shooter_goal_fbs",
46 "//y2016/control_loops/superstructure:superstructure_goal_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -070047 "//y2016/control_loops/superstructure:superstructure_lib",
Alex Perrycb7da4b2019-08-28 19:35:56 -070048 "//y2016/control_loops/superstructure:superstructure_status_fbs",
49 "//y2016/queues:ball_detector_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -070050 ],
Comran Morshed9a9948c2016-01-16 15:58:04 +000051)
52
Lee Mracek6821fe02018-11-01 17:27:30 -040053robot_downloader(
Brian Silvermanf819b442019-01-20 16:51:04 -080054 dirs = [
55 "//y2016/dashboard:www_files",
56 ],
57 start_binaries = [
58 ":joystick_reader",
59 ":wpilib_interface",
60 "//y2016/control_loops/drivetrain:drivetrain",
61 "//y2016/control_loops/superstructure:superstructure",
62 "//y2016/control_loops/shooter:shooter",
63 "//y2016/dashboard:dashboard",
64 "//y2016/actors:autonomous_action",
65 "//y2016/actors:superstructure_action",
66 "//y2016/actors:vision_align_action",
67 "//y2016/vision:target_receiver",
68 ],
Austin Schuhc80dd152016-02-29 01:47:44 -080069)
Brian Silverman06016bc2017-02-11 16:34:34 -080070
Alex Perrycb7da4b2019-08-28 19:35:56 -070071aos_config(
72 name = "config",
73 src = "y2016.json",
74 flatbuffers = [
75 "//y2016/control_loops/shooter:shooter_goal_fbs",
76 "//y2016/control_loops/shooter:shooter_output_fbs",
77 "//y2016/control_loops/shooter:shooter_position_fbs",
78 "//y2016/control_loops/shooter:shooter_status_fbs",
79 "//y2016/control_loops/superstructure:superstructure_goal_fbs",
80 "//y2016/control_loops/superstructure:superstructure_output_fbs",
81 "//y2016/control_loops/superstructure:superstructure_position_fbs",
82 "//y2016/control_loops/superstructure:superstructure_status_fbs",
83 "//y2016/queues:ball_detector_fbs",
84 "//y2017/vision:vision_fbs",
85 ],
86 visibility = ["//visibility:public"],
87 deps = [
88 "//aos/robot_state:config",
89 "//frc971/control_loops/drivetrain:config",
90 ],
91)
92
Brian Silverman06016bc2017-02-11 16:34:34 -080093cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070094 name = "wpilib_interface",
95 srcs = [
96 "wpilib_interface.cc",
97 ],
98 restricted_to = ["//tools:roborio"],
99 deps = [
100 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -0800101 "//aos:init",
102 "//aos:make_unique",
John Park33858a32018-09-28 23:05:48 -0700103 "//aos:math",
John Park33858a32018-09-28 23:05:48 -0700104 "//aos/controls:control_loop",
105 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700106 "//aos/robot_state:robot_state_fbs",
Brian Silvermanf819b442019-01-20 16:51:04 -0800107 "//aos/stl_mutex",
108 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700109 "//aos/util:log_interval",
110 "//aos/util:phased_loop",
111 "//aos/util:wrapping_counter",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700112 "//frc971/autonomous:auto_fbs",
Austin Schuhed5b26d2019-12-05 20:51:59 -0800113 "//frc971/autonomous:auto_mode_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700114 "//frc971/control_loops:control_loops_fbs",
115 "//frc971/control_loops/drivetrain:drivetrain_output_fbs",
116 "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700117 "//frc971/wpilib:ADIS16448",
118 "//frc971/wpilib:buffered_pcm",
119 "//frc971/wpilib:dma",
120 "//frc971/wpilib:dma_edge_counting",
Sabina Davisb71bc282019-02-03 01:17:23 -0800121 "//frc971/wpilib:drivetrain_writer",
Brian Silverman6470f442018-08-05 12:08:16 -0700122 "//frc971/wpilib:encoder_and_potentiometer",
123 "//frc971/wpilib:gyro_sender",
124 "//frc971/wpilib:interrupt_edge_counting",
125 "//frc971/wpilib:joystick_sender",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700126 "//frc971/wpilib:logging_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700127 "//frc971/wpilib:loop_output_handler",
128 "//frc971/wpilib:pdp_fetcher",
Austin Schuh54667ac2019-02-02 16:44:49 -0800129 "//frc971/wpilib:sensor_reader",
Brian Silverman6470f442018-08-05 12:08:16 -0700130 "//frc971/wpilib:wpilib_robot_base",
131 "//third_party:wpilib",
132 "//y2016/control_loops/drivetrain:polydrivetrain_plants",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700133 "//y2016/control_loops/shooter:shooter_output_fbs",
134 "//y2016/control_loops/shooter:shooter_position_fbs",
135 "//y2016/control_loops/superstructure:superstructure_output_fbs",
136 "//y2016/control_loops/superstructure:superstructure_position_fbs",
137 "//y2016/queues:ball_detector_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700138 ],
139)
140
141py_library(
142 name = "python_init",
143 srcs = ["__init__.py"],
144 visibility = ["//visibility:public"],
Brian Silverman06016bc2017-02-11 16:34:34 -0800145)