blob: 404683b0bae80b50b534c4bdb9009f691ce20cea [file] [log] [blame]
Brian Silvermanf819b442019-01-20 16:51:04 -08001load("//frc971:downloader.bzl", "robot_downloader")
Austin Schuh7b9a3ba2017-02-19 23:11:45 -08002
Tyler Chatow6107aba2017-01-22 01:39:40 +00003cc_library(
Brian Silverman6470f442018-08-05 12:08:16 -07004 name = "constants",
5 srcs = [
6 "constants.cc",
7 ],
8 hdrs = [
9 "constants.h",
10 ],
11 visibility = ["//visibility:public"],
12 deps = [
13 "//aos:once",
John Park33858a32018-09-28 23:05:48 -070014 "//aos/logging",
Brian Silvermanf819b442019-01-20 16:51:04 -080015 "//aos/mutex",
John Parkbb458cd2019-11-03 19:18:43 -080016 "@com_google_absl//absl/base",
John Park33858a32018-09-28 23:05:48 -070017 "//aos/network:team_number",
Brian Silverman6470f442018-08-05 12:08:16 -070018 "//frc971:constants",
19 "//frc971/shooter_interpolation:interpolation",
20 "//y2017/control_loops/drivetrain:polydrivetrain_plants",
21 "//y2017/control_loops/superstructure/column:column_plants",
22 "//y2017/control_loops/superstructure/hood:hood_plants",
23 "//y2017/control_loops/superstructure/intake:intake_plants",
24 "//y2017/control_loops/superstructure/shooter:shooter_plants",
25 ],
Tyler Chatow6107aba2017-01-22 01:39:40 +000026)
Brian Silverman06016bc2017-02-11 16:34:34 -080027
28cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070029 name = "joystick_reader",
30 srcs = [
31 "joystick_reader.cc",
32 ],
33 deps = [
34 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -080035 "//aos:init",
John Park33858a32018-09-28 23:05:48 -070036 "//aos/actions:action_lib",
Austin Schuha250b2d2019-05-27 16:14:02 -070037 "//aos/input:action_joystick_input",
Brian Silverman6470f442018-08-05 12:08:16 -070038 "//aos/input:drivetrain_input",
Brian Silvermanf819b442019-01-20 16:51:04 -080039 "//aos/logging",
40 "//aos/time",
41 "//aos/util:log_interval",
Brian Silverman6470f442018-08-05 12:08:16 -070042 "//frc971/autonomous:auto_queue",
43 "//frc971/control_loops/drivetrain:drivetrain_queue",
44 "//y2017/actors:autonomous_action_lib",
45 "//y2017/control_loops/drivetrain:drivetrain_base",
46 "//y2017/control_loops/superstructure:superstructure_queue",
47 ],
Campbell Crowley71b5f132017-02-18 13:16:08 -080048)
49
50cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070051 name = "wpilib_interface",
52 srcs = [
53 "wpilib_interface.cc",
54 ],
55 restricted_to = ["//tools:roborio"],
56 deps = [
57 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -080058 "//aos:init",
59 "//aos:make_unique",
John Park33858a32018-09-28 23:05:48 -070060 "//aos:math",
John Park33858a32018-09-28 23:05:48 -070061 "//aos/controls:control_loop",
62 "//aos/logging",
63 "//aos/logging:queue_logging",
Brian Silvermanf819b442019-01-20 16:51:04 -080064 "//aos/robot_state",
65 "//aos/stl_mutex",
66 "//aos/time",
John Park33858a32018-09-28 23:05:48 -070067 "//aos/util:log_interval",
68 "//aos/util:phased_loop",
69 "//aos/util:wrapping_counter",
Brian Silverman6470f442018-08-05 12:08:16 -070070 "//frc971/autonomous:auto_queue",
71 "//frc971/control_loops:queues",
72 "//frc971/control_loops/drivetrain:drivetrain_queue",
73 "//frc971/wpilib:ADIS16448",
74 "//frc971/wpilib:buffered_pcm",
75 "//frc971/wpilib:dma",
76 "//frc971/wpilib:dma_edge_counting",
Sabina Davis7af11ad2019-02-03 01:16:45 -080077 "//frc971/wpilib:drivetrain_writer",
Brian Silverman6470f442018-08-05 12:08:16 -070078 "//frc971/wpilib:encoder_and_potentiometer",
79 "//frc971/wpilib:interrupt_edge_counting",
80 "//frc971/wpilib:joystick_sender",
81 "//frc971/wpilib:logging_queue",
82 "//frc971/wpilib:loop_output_handler",
83 "//frc971/wpilib:pdp_fetcher",
Austin Schuhbf29b6f2019-02-02 21:45:27 -080084 "//frc971/wpilib:sensor_reader",
Brian Silverman6470f442018-08-05 12:08:16 -070085 "//frc971/wpilib:wpilib_robot_base",
86 "//third_party:wpilib",
87 "//y2017/control_loops/superstructure:superstructure_queue",
88 ],
Brian Silverman06016bc2017-02-11 16:34:34 -080089)
Austin Schuh7b9a3ba2017-02-19 23:11:45 -080090
Lee Mracek6821fe02018-11-01 17:27:30 -040091robot_downloader(
Brian Silvermanf819b442019-01-20 16:51:04 -080092 start_binaries = [
93 ":joystick_reader",
94 ":wpilib_interface",
95 "//y2017/control_loops/drivetrain:drivetrain",
96 "//y2017/control_loops/superstructure:superstructure",
97 "//y2017/actors:autonomous_action",
98 ],
Brian Silverman6470f442018-08-05 12:08:16 -070099)
100
101py_library(
102 name = "python_init",
103 srcs = ["__init__.py"],
104 visibility = ["//visibility:public"],
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800105)