blob: 3414331dd4008bab1d72280d60361d8bc583e196 [file] [log] [blame]
Brian Silverman6470f442018-08-05 12:08:16 -07001load("//aos/downloader:downloader.bzl", "aos_downloader")
Comran Morshed9a9948c2016-01-16 15:58:04 +00002
3cc_library(
Brian Silverman6470f442018-08-05 12:08:16 -07004 name = "constants",
5 srcs = [
6 "constants.cc",
7 ],
8 hdrs = [
9 "constants.h",
10 ],
Brian Silverman7a7c24d2018-09-01 17:49:09 -070011 compatible_with = [
12 "//tools:armhf-debian",
13 ],
Brian Silverman6470f442018-08-05 12:08:16 -070014 visibility = ["//visibility:public"],
15 deps = [
16 "//aos:once",
John Park33858a32018-09-28 23:05:48 -070017 "//aos/mutex:mutex",
18 "//aos/logging",
19 "//aos/network:team_number",
Brian Silverman6470f442018-08-05 12:08:16 -070020 "//frc971:constants",
21 "//frc971:shifter_hall_effect",
22 "//frc971/control_loops:state_feedback_loop",
23 "//y2016/control_loops/drivetrain:polydrivetrain_plants",
24 ],
Comran Morshed9a9948c2016-01-16 15:58:04 +000025)
26
27cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070028 name = "joystick_reader",
29 srcs = [
30 "joystick_reader.cc",
31 ],
32 deps = [
33 ":constants",
John Park33858a32018-09-28 23:05:48 -070034 "//aos/time:time",
35 "//aos/actions:action_lib",
36 "//aos/logging",
37 "//aos/util:log_interval",
Brian Silverman6470f442018-08-05 12:08:16 -070038 "//aos/input:joystick_input",
John Park398c74a2018-10-20 21:17:39 -070039 "//aos:init",
Brian Silverman6470f442018-08-05 12:08:16 -070040 "//frc971/autonomous:auto_queue",
41 "//frc971/control_loops/drivetrain:drivetrain_queue",
42 "//frc971/queues:gyro",
43 "//y2016/actors:autonomous_action_lib",
44 "//y2016/actors:superstructure_action_lib",
45 "//y2016/actors:vision_align_action_lib",
46 "//y2016/control_loops/shooter:shooter_queue",
47 "//y2016/control_loops/superstructure:superstructure_lib",
48 "//y2016/control_loops/superstructure:superstructure_queue",
49 "//y2016/queues:ball_detector",
50 ],
Comran Morshed9a9948c2016-01-16 15:58:04 +000051)
52
53aos_downloader(
Brian Silverman6470f442018-08-05 12:08:16 -070054 name = "download",
55 srcs = [
56 "//aos:prime_binaries",
57 ],
58 dirs = [
59 "//y2016/dashboard:www_files",
60 ],
61 restricted_to = ["//tools:roborio"],
62 start_srcs = [
63 ":joystick_reader",
64 ":wpilib_interface",
65 "//aos:prime_start_binaries",
66 "//y2016/control_loops/drivetrain:drivetrain",
67 "//y2016/control_loops/superstructure:superstructure",
68 "//y2016/control_loops/shooter:shooter",
69 "//y2016/dashboard:dashboard",
70 "//y2016/actors:autonomous_action",
71 "//y2016/actors:superstructure_action",
72 "//y2016/actors:vision_align_action",
73 "//y2016/vision:target_receiver",
74 ],
Comran Morshed9a9948c2016-01-16 15:58:04 +000075)
Austin Schuhc80dd152016-02-29 01:47:44 -080076
77aos_downloader(
Brian Silverman6470f442018-08-05 12:08:16 -070078 name = "download_stripped",
79 srcs = [
80 "//aos:prime_binaries_stripped",
81 ],
82 dirs = [
83 "//y2016/dashboard:www_files",
84 ],
85 restricted_to = ["//tools:roborio"],
86 start_srcs = [
87 ":joystick_reader.stripped",
88 ":wpilib_interface.stripped",
89 "//aos:prime_start_binaries_stripped",
90 "//y2016/control_loops/drivetrain:drivetrain.stripped",
91 "//y2016/control_loops/superstructure:superstructure.stripped",
92 "//y2016/control_loops/shooter:shooter.stripped",
93 "//y2016/dashboard:dashboard.stripped",
94 "//y2016/actors:autonomous_action.stripped",
95 "//y2016/actors:superstructure_action.stripped",
96 "//y2016/actors:vision_align_action.stripped",
97 "//y2016/vision:target_receiver.stripped",
98 ],
Austin Schuhc80dd152016-02-29 01:47:44 -080099)
Brian Silverman06016bc2017-02-11 16:34:34 -0800100
101cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -0700102 name = "wpilib_interface",
103 srcs = [
104 "wpilib_interface.cc",
105 ],
106 restricted_to = ["//tools:roborio"],
107 deps = [
108 ":constants",
John Park33858a32018-09-28 23:05:48 -0700109 "//aos:math",
110 "//aos/stl_mutex:stl_mutex",
111 "//aos/time:time",
112 "//aos/controls:control_loop",
113 "//aos/logging",
114 "//aos/logging:queue_logging",
115 "//aos/robot_state:robot_state",
116 "//aos/util:log_interval",
117 "//aos/util:phased_loop",
118 "//aos/util:wrapping_counter",
John Park398c74a2018-10-20 21:17:39 -0700119 "//aos:init",
Brian Silverman6470f442018-08-05 12:08:16 -0700120 "//frc971/autonomous:auto_queue",
121 "//frc971/control_loops:queues",
122 "//frc971/control_loops/drivetrain:drivetrain_queue",
123 "//frc971/wpilib:ADIS16448",
124 "//frc971/wpilib:buffered_pcm",
125 "//frc971/wpilib:dma",
126 "//frc971/wpilib:dma_edge_counting",
127 "//frc971/wpilib:encoder_and_potentiometer",
128 "//frc971/wpilib:gyro_sender",
129 "//frc971/wpilib:interrupt_edge_counting",
130 "//frc971/wpilib:joystick_sender",
131 "//frc971/wpilib:logging_queue",
132 "//frc971/wpilib:loop_output_handler",
133 "//frc971/wpilib:pdp_fetcher",
134 "//frc971/wpilib:wpilib_interface",
135 "//frc971/wpilib:wpilib_robot_base",
136 "//third_party:wpilib",
137 "//y2016/control_loops/drivetrain:polydrivetrain_plants",
138 "//y2016/control_loops/shooter:shooter_queue",
139 "//y2016/control_loops/superstructure:superstructure_queue",
140 "//y2016/queues:ball_detector",
141 ],
142)
143
144py_library(
145 name = "python_init",
146 srcs = ["__init__.py"],
147 visibility = ["//visibility:public"],
Brian Silverman06016bc2017-02-11 16:34:34 -0800148)