blob: 3fae9e589307a1a6bda43001a858688eacfc4184 [file] [log] [blame]
Sabina Davis1b84afa2019-02-09 01:20:21 -08001load("//frc971:downloader.bzl", "robot_downloader")
2
3robot_downloader(
4 start_binaries = [
5 ":joystick_reader",
6 ":wpilib_interface",
7 "//y2019/control_loops/drivetrain:drivetrain",
Austin Schuh355f3272019-02-15 23:09:29 -08008 "//y2019/control_loops/superstructure:superstructure",
Sabina Davis1b84afa2019-02-09 01:20:21 -08009 ],
10)
11
Tyler Chatow37ecdcd2019-01-26 20:18:42 -080012cc_library(
13 name = "constants",
14 srcs = [
15 "constants.cc",
16 ],
17 hdrs = [
18 "constants.h",
19 ],
20 visibility = ["//visibility:public"],
21 deps = [
22 "//aos:once",
23 "//aos/logging",
24 "//aos/mutex",
25 "//aos/network:team_number",
26 "//frc971:constants",
James Kuszmaul22c5ab32019-02-09 14:45:58 -080027 "//frc971/control_loops:pose",
Theo Bafrali00e42272019-02-12 01:07:46 -080028 "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem",
James Kuszmaul22c5ab32019-02-09 14:45:58 -080029 "//y2019/control_loops/drivetrain:camera",
Sabina Davis7be49f32019-02-02 00:30:19 -080030 "//y2019/control_loops/drivetrain:polydrivetrain_plants",
Alex Perry5fb5ff22019-02-09 21:53:17 -080031 "//y2019/control_loops/superstructure/elevator:elevator_plants",
32 "//y2019/control_loops/superstructure/intake:intake_plants",
33 "//y2019/control_loops/superstructure/stilts:stilts_plants",
Austin Schuhc1d6f832019-02-15 23:22:17 -080034 "//y2019/control_loops/superstructure/wrist:wrist_plants",
Tyler Chatow37ecdcd2019-01-26 20:18:42 -080035 ],
36)
37
Sabina Davisabeae332019-02-01 21:12:57 -080038cc_binary(
39 name = "wpilib_interface",
40 srcs = [
41 "wpilib_interface.cc",
42 ],
43 restricted_to = ["//tools:roborio"],
44 deps = [
Sabina Davis7be49f32019-02-02 00:30:19 -080045 ":constants",
Sabina Davisabeae332019-02-01 21:12:57 -080046 "//aos:init",
47 "//aos:make_unique",
48 "//aos:math",
49 "//aos/controls:control_loop",
50 "//aos/logging",
51 "//aos/logging:queue_logging",
52 "//aos/robot_state",
53 "//aos/stl_mutex",
54 "//aos/time",
55 "//aos/util:log_interval",
56 "//aos/util:phased_loop",
57 "//aos/util:wrapping_counter",
58 "//frc971/autonomous:auto_queue",
59 "//frc971/control_loops:queues",
60 "//frc971/control_loops/drivetrain:drivetrain_queue",
61 "//frc971/wpilib:ADIS16448",
Austin Schuhc1d6f832019-02-15 23:22:17 -080062 "//frc971/wpilib:buffered_pcm",
Sabina Davisd004fd62019-02-02 23:51:46 -080063 "//frc971/wpilib:drivetrain_writer",
Sabina Davisabeae332019-02-01 21:12:57 -080064 "//frc971/wpilib:encoder_and_potentiometer",
65 "//frc971/wpilib:interrupt_edge_counting",
66 "//frc971/wpilib:joystick_sender",
67 "//frc971/wpilib:logging_queue",
68 "//frc971/wpilib:loop_output_handler",
69 "//frc971/wpilib:pdp_fetcher",
Sabina Davisadc58542019-02-01 22:23:00 -080070 "//frc971/wpilib:sensor_reader",
Sabina Davisabeae332019-02-01 21:12:57 -080071 "//frc971/wpilib:wpilib_interface",
72 "//frc971/wpilib:wpilib_robot_base",
Austin Schuhf6b94632019-02-02 22:11:27 -080073 "//third_party:phoenix",
Sabina Davisabeae332019-02-01 21:12:57 -080074 "//third_party:wpilib",
Brian Silvermanc41fb862019-03-02 21:14:46 -080075 "//y2019/control_loops/drivetrain:camera_queue",
Alex Perry5fb5ff22019-02-09 21:53:17 -080076 "//y2019/control_loops/superstructure:superstructure_queue",
Brian Silvermanf8b75252019-02-24 16:13:58 -080077 "//y2019/jevois:spi",
Sabina Davisabeae332019-02-01 21:12:57 -080078 ],
79)
Sabina Davis1b84afa2019-02-09 01:20:21 -080080
Tyler Chatowd28951f2019-02-16 20:12:28 -080081cc_library(
82 name = "joystick_angle",
83 srcs = [
84 "joystick_angle.cc",
85 ],
86 hdrs = [
87 "joystick_angle.h",
88 ],
89 deps = [
90 "//aos/input:drivetrain_input",
Tyler Chatowc8012ca2019-02-18 22:33:01 -080091 "//frc971/zeroing:wrap",
Tyler Chatowd28951f2019-02-16 20:12:28 -080092 ],
93)
94
95cc_test(
96 name = "joystick_angle_test",
97 srcs = [
98 "joystick_angle_test.cc",
99 ],
100 deps = [
101 ":joystick_angle",
102 "//aos/testing:googletest",
103 ],
104)
105
Sabina Davis1b84afa2019-02-09 01:20:21 -0800106cc_binary(
Sabina Davis91b23602019-01-21 00:06:01 -0800107 name = "joystick_reader",
108 srcs = [
109 ":joystick_reader.cc",
110 ],
111 deps = [
112 "//aos:init",
113 "//aos/actions:action_lib",
Sabina Davis1b84afa2019-02-09 01:20:21 -0800114 "//aos/input:action_joystick_input",
Sabina Davis91b23602019-01-21 00:06:01 -0800115 "//aos/input:drivetrain_input",
116 "//aos/input:joystick_input",
Sabina Davis91b23602019-01-21 00:06:01 -0800117 "//aos/logging",
118 "//aos/network:team_number",
119 "//aos/stl_mutex",
120 "//aos/time",
121 "//aos/util:log_interval",
122 "//aos/vision/events:udp",
123 "//frc971/autonomous:auto_queue",
124 "//frc971/autonomous:base_autonomous_actor",
125 "//frc971/control_loops/drivetrain:drivetrain_queue",
126 "//y2019/control_loops/drivetrain:drivetrain_base",
127 "//y2019/control_loops/superstructure:superstructure_queue",
128 ],
129)
Sabina Davisabeae332019-02-01 21:12:57 -0800130
Michael Schuhab42b0a2019-01-07 16:33:43 -0800131py_library(
132 name = "python_init",
133 srcs = ["__init__.py"],
134 visibility = ["//visibility:public"],
Sabina Davisabeae332019-02-01 21:12:57 -0800135)