blob: e4c4128d54adb0cd09953e0ff04be0e1ded77805 [file] [log] [blame]
Austin Schuh2a3e0632018-02-19 16:24:49 -08001load("//aos/downloader:downloader.bzl", "aos_downloader")
Brian Silverman37281fc2018-03-11 18:42:17 -07002load("//aos/build:queues.bzl", "queue_library")
Austin Schuh8d5fff42018-05-30 20:44:12 -07003load("//tools/build_rules:protobuf.bzl", "proto_cc_library")
Neil Balchacfca5b2018-01-28 14:04:08 -08004
5aos_downloader(
Austin Schuh2a3e0632018-02-19 16:24:49 -08006 name = "download",
7 srcs = [
8 "//aos:prime_binaries",
9 ],
10 restricted_to = ["//tools:roborio"],
11 start_srcs = [
12 ":joystick_reader",
13 ":wpilib_interface",
Austin Schuh8d5fff42018-05-30 20:44:12 -070014 "//y2018/vision:vision_status",
Austin Schuh2a3e0632018-02-19 16:24:49 -080015 "//aos:prime_start_binaries",
16 "//y2018/control_loops/drivetrain:drivetrain",
Austin Schuha3c148e2018-03-09 21:04:05 -080017 "//y2018/actors:autonomous_action",
18 "//y2018/control_loops/superstructure:superstructure",
Austin Schuh2a3e0632018-02-19 16:24:49 -080019 ],
Neil Balchacfca5b2018-01-28 14:04:08 -080020)
21
22aos_downloader(
Austin Schuh2a3e0632018-02-19 16:24:49 -080023 name = "download_stripped",
24 srcs = [
25 "//aos:prime_binaries_stripped",
26 ],
27 restricted_to = ["//tools:roborio"],
28 start_srcs = [
29 ":joystick_reader.stripped",
30 ":wpilib_interface.stripped",
Austin Schuh8d5fff42018-05-30 20:44:12 -070031 "//y2018/vision:vision_status.stripped",
Austin Schuh2a3e0632018-02-19 16:24:49 -080032 "//aos:prime_start_binaries_stripped",
Austin Schuha3c148e2018-03-09 21:04:05 -080033 "//y2018/actors:autonomous_action.stripped",
Austin Schuh2a3e0632018-02-19 16:24:49 -080034 "//y2018/control_loops/drivetrain:drivetrain.stripped",
Austin Schuh6829f762018-03-02 21:36:01 -080035 "//y2018/control_loops/superstructure:superstructure.stripped",
Austin Schuh2a3e0632018-02-19 16:24:49 -080036 ],
Neil Balchacfca5b2018-01-28 14:04:08 -080037)
38
39cc_binary(
Austin Schuh2a3e0632018-02-19 16:24:49 -080040 name = "joystick_reader",
41 srcs = [
42 "joystick_reader.cc",
43 ],
44 deps = [
Austin Schuh8d5fff42018-05-30 20:44:12 -070045 ":vision_proto",
46 "//aos/common:stl_mutex",
Austin Schuh2a3e0632018-02-19 16:24:49 -080047 "//aos/common:time",
48 "//aos/common/actions:action_lib",
49 "//aos/common/logging",
50 "//aos/common/util:log_interval",
51 "//aos/input:drivetrain_input",
52 "//aos/input:joystick_input",
53 "//aos/linux_code:init",
Austin Schuh8d5fff42018-05-30 20:44:12 -070054 "//aos/vision/events:udp",
Austin Schuh2a3e0632018-02-19 16:24:49 -080055 "//frc971/autonomous:auto_queue",
Austin Schuha3c148e2018-03-09 21:04:05 -080056 "//frc971/autonomous:base_autonomous_actor",
Austin Schuh2a3e0632018-02-19 16:24:49 -080057 "//frc971/control_loops/drivetrain:drivetrain_queue",
58 "//y2018/control_loops/drivetrain:drivetrain_base",
59 "//y2018/control_loops/superstructure:superstructure_queue",
Austin Schuhab15c4d2018-03-09 21:21:03 -080060 "//y2018/control_loops/superstructure/arm:generated_graph",
Austin Schuh2a3e0632018-02-19 16:24:49 -080061 ],
62)
63
64cc_library(
65 name = "constants",
66 srcs = [
67 "constants.cc",
68 ],
69 hdrs = [
70 "constants.h",
71 ],
72 visibility = ["//visibility:public"],
73 deps = [
74 "//aos:once",
75 "//aos/common:mutex",
76 "//aos/common/logging",
77 "//aos/common/network:team_number",
78 "//frc971:constants",
79 "//frc971/shooter_interpolation:interpolation",
80 "//y2018/control_loops/drivetrain:polydrivetrain_plants",
81 "//y2018/control_loops/superstructure/arm:dynamics",
82 "//y2018/control_loops/superstructure/intake:intake_plants",
83 ],
84)
85
86cc_binary(
87 name = "wpilib_interface",
88 srcs = [
89 "wpilib_interface.cc",
90 ],
91 restricted_to = ["//tools:roborio"],
92 deps = [
Brian Silverman37281fc2018-03-11 18:42:17 -070093 ":status_light",
Austin Schuh2a3e0632018-02-19 16:24:49 -080094 "//aos/common:math",
95 "//aos/common:stl_mutex",
96 "//aos/common:time",
97 "//aos/common/controls:control_loop",
98 "//aos/common/logging",
99 "//aos/common/logging:queue_logging",
100 "//aos/common/messages:robot_state",
101 "//aos/common/util:log_interval",
102 "//aos/common/util:phased_loop",
103 "//aos/common/util:wrapping_counter",
104 "//aos/linux_code:init",
105 "//frc971/autonomous:auto_queue",
106 "//frc971/control_loops:queues",
107 "//frc971/control_loops/drivetrain:drivetrain_queue",
108 "//frc971/wpilib:ADIS16448",
109 "//frc971/wpilib:buffered_pcm",
110 "//frc971/wpilib:dma",
111 "//frc971/wpilib:dma_edge_counting",
112 "//frc971/wpilib:encoder_and_potentiometer",
Austin Schuh2a3e0632018-02-19 16:24:49 -0800113 "//frc971/wpilib:interrupt_edge_counting",
114 "//frc971/wpilib:joystick_sender",
115 "//frc971/wpilib:logging_queue",
116 "//frc971/wpilib:loop_output_handler",
117 "//frc971/wpilib:pdp_fetcher",
118 "//frc971/wpilib:wpilib_interface",
119 "//frc971/wpilib:wpilib_robot_base",
120 "//third_party:wpilib",
Brian Silverman37281fc2018-03-11 18:42:17 -0700121 "//third_party/Phoenix-frc-lib:phoenix",
Austin Schuh2a3e0632018-02-19 16:24:49 -0800122 "//y2018:constants",
123 "//y2018/control_loops/superstructure:superstructure_queue",
Austin Schuh8d5fff42018-05-30 20:44:12 -0700124 "//y2018/vision:vision_queue",
Austin Schuh2a3e0632018-02-19 16:24:49 -0800125 ],
Neil Balchacfca5b2018-01-28 14:04:08 -0800126)
Brian Silverman37281fc2018-03-11 18:42:17 -0700127
128queue_library(
129 name = "status_light",
130 srcs = [
131 "status_light.q",
132 ],
Austin Schuh8d5fff42018-05-30 20:44:12 -0700133 visibility = ["//visibility:public"],
134)
135
136proto_cc_library(
137 name = "vision_proto",
138 src = "vision.proto",
139 visibility = ["//visibility:public"],
Brian Silverman37281fc2018-03-11 18:42:17 -0700140)
Brian Silverman6470f442018-08-05 12:08:16 -0700141
142py_library(
143 name = "python_init",
144 srcs = ["__init__.py"],
145 visibility = ["//visibility:public"],
146)