blob: cccc2cf7128500f2484794a7871e0c281978e353 [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",
Austin Schuha8de4a62018-09-03 18:04:28 -070050 "//aos/common/network:team_number",
Austin Schuh2a3e0632018-02-19 16:24:49 -080051 "//aos/common/util:log_interval",
52 "//aos/input:drivetrain_input",
53 "//aos/input:joystick_input",
54 "//aos/linux_code:init",
Austin Schuh8d5fff42018-05-30 20:44:12 -070055 "//aos/vision/events:udp",
Austin Schuh2a3e0632018-02-19 16:24:49 -080056 "//frc971/autonomous:auto_queue",
Austin Schuha3c148e2018-03-09 21:04:05 -080057 "//frc971/autonomous:base_autonomous_actor",
Austin Schuh2a3e0632018-02-19 16:24:49 -080058 "//frc971/control_loops/drivetrain:drivetrain_queue",
59 "//y2018/control_loops/drivetrain:drivetrain_base",
60 "//y2018/control_loops/superstructure:superstructure_queue",
Austin Schuhab15c4d2018-03-09 21:21:03 -080061 "//y2018/control_loops/superstructure/arm:generated_graph",
Austin Schuh2a3e0632018-02-19 16:24:49 -080062 ],
63)
64
65cc_library(
66 name = "constants",
67 srcs = [
68 "constants.cc",
69 ],
70 hdrs = [
71 "constants.h",
72 ],
73 visibility = ["//visibility:public"],
74 deps = [
75 "//aos:once",
76 "//aos/common:mutex",
77 "//aos/common/logging",
78 "//aos/common/network:team_number",
79 "//frc971:constants",
80 "//frc971/shooter_interpolation:interpolation",
81 "//y2018/control_loops/drivetrain:polydrivetrain_plants",
82 "//y2018/control_loops/superstructure/arm:dynamics",
83 "//y2018/control_loops/superstructure/intake:intake_plants",
84 ],
85)
86
87cc_binary(
88 name = "wpilib_interface",
89 srcs = [
90 "wpilib_interface.cc",
91 ],
92 restricted_to = ["//tools:roborio"],
93 deps = [
Brian Silverman37281fc2018-03-11 18:42:17 -070094 ":status_light",
Austin Schuh2a3e0632018-02-19 16:24:49 -080095 "//aos/common:math",
96 "//aos/common:stl_mutex",
97 "//aos/common:time",
98 "//aos/common/controls:control_loop",
99 "//aos/common/logging",
100 "//aos/common/logging:queue_logging",
101 "//aos/common/messages:robot_state",
102 "//aos/common/util:log_interval",
103 "//aos/common/util:phased_loop",
104 "//aos/common/util:wrapping_counter",
105 "//aos/linux_code:init",
106 "//frc971/autonomous:auto_queue",
107 "//frc971/control_loops:queues",
108 "//frc971/control_loops/drivetrain:drivetrain_queue",
109 "//frc971/wpilib:ADIS16448",
110 "//frc971/wpilib:buffered_pcm",
111 "//frc971/wpilib:dma",
112 "//frc971/wpilib:dma_edge_counting",
113 "//frc971/wpilib:encoder_and_potentiometer",
Austin Schuh2a3e0632018-02-19 16:24:49 -0800114 "//frc971/wpilib:interrupt_edge_counting",
115 "//frc971/wpilib:joystick_sender",
116 "//frc971/wpilib:logging_queue",
117 "//frc971/wpilib:loop_output_handler",
118 "//frc971/wpilib:pdp_fetcher",
119 "//frc971/wpilib:wpilib_interface",
120 "//frc971/wpilib:wpilib_robot_base",
121 "//third_party:wpilib",
Brian Silverman37281fc2018-03-11 18:42:17 -0700122 "//third_party/Phoenix-frc-lib:phoenix",
Austin Schuh2a3e0632018-02-19 16:24:49 -0800123 "//y2018:constants",
124 "//y2018/control_loops/superstructure:superstructure_queue",
Austin Schuh8d5fff42018-05-30 20:44:12 -0700125 "//y2018/vision:vision_queue",
Austin Schuh2a3e0632018-02-19 16:24:49 -0800126 ],
Neil Balchacfca5b2018-01-28 14:04:08 -0800127)
Brian Silverman37281fc2018-03-11 18:42:17 -0700128
129queue_library(
130 name = "status_light",
131 srcs = [
132 "status_light.q",
133 ],
Austin Schuh8d5fff42018-05-30 20:44:12 -0700134 visibility = ["//visibility:public"],
135)
136
137proto_cc_library(
138 name = "vision_proto",
139 src = "vision.proto",
140 visibility = ["//visibility:public"],
Brian Silverman37281fc2018-03-11 18:42:17 -0700141)
Brian Silverman6470f442018-08-05 12:08:16 -0700142
143py_library(
144 name = "python_init",
145 srcs = ["__init__.py"],
146 visibility = ["//visibility:public"],
147)