blob: 30da3b9143074ef987a2aca1086adb9cefe73c14 [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 Park33858a32018-09-28 23:05:48 -070016 "//aos/network:team_number",
Brian Silverman6470f442018-08-05 12:08:16 -070017 "//frc971:constants",
18 "//frc971/shooter_interpolation:interpolation",
19 "//y2017/control_loops/drivetrain:polydrivetrain_plants",
20 "//y2017/control_loops/superstructure/column:column_plants",
21 "//y2017/control_loops/superstructure/hood:hood_plants",
22 "//y2017/control_loops/superstructure/intake:intake_plants",
23 "//y2017/control_loops/superstructure/shooter:shooter_plants",
24 ],
Tyler Chatow6107aba2017-01-22 01:39:40 +000025)
Brian Silverman06016bc2017-02-11 16:34:34 -080026
27cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070028 name = "joystick_reader",
29 srcs = [
30 "joystick_reader.cc",
31 ],
32 deps = [
33 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -080034 "//aos:init",
John Park33858a32018-09-28 23:05:48 -070035 "//aos/actions:action_lib",
Austin Schuha250b2d2019-05-27 16:14:02 -070036 "//aos/input:action_joystick_input",
Brian Silverman6470f442018-08-05 12:08:16 -070037 "//aos/input:drivetrain_input",
Brian Silvermanf819b442019-01-20 16:51:04 -080038 "//aos/logging",
39 "//aos/time",
40 "//aos/util:log_interval",
Brian Silverman6470f442018-08-05 12:08:16 -070041 "//frc971/autonomous:auto_queue",
42 "//frc971/control_loops/drivetrain:drivetrain_queue",
43 "//y2017/actors:autonomous_action_lib",
44 "//y2017/control_loops/drivetrain:drivetrain_base",
45 "//y2017/control_loops/superstructure:superstructure_queue",
46 ],
Campbell Crowley71b5f132017-02-18 13:16:08 -080047)
48
49cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070050 name = "wpilib_interface",
51 srcs = [
52 "wpilib_interface.cc",
53 ],
54 restricted_to = ["//tools:roborio"],
55 deps = [
56 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -080057 "//aos:init",
58 "//aos:make_unique",
John Park33858a32018-09-28 23:05:48 -070059 "//aos:math",
John Park33858a32018-09-28 23:05:48 -070060 "//aos/controls:control_loop",
61 "//aos/logging",
62 "//aos/logging:queue_logging",
Brian Silvermanf819b442019-01-20 16:51:04 -080063 "//aos/robot_state",
64 "//aos/stl_mutex",
65 "//aos/time",
John Park33858a32018-09-28 23:05:48 -070066 "//aos/util:log_interval",
67 "//aos/util:phased_loop",
68 "//aos/util:wrapping_counter",
Brian Silverman6470f442018-08-05 12:08:16 -070069 "//frc971/autonomous:auto_queue",
70 "//frc971/control_loops:queues",
71 "//frc971/control_loops/drivetrain:drivetrain_queue",
72 "//frc971/wpilib:ADIS16448",
73 "//frc971/wpilib:buffered_pcm",
74 "//frc971/wpilib:dma",
75 "//frc971/wpilib:dma_edge_counting",
Sabina Davis7af11ad2019-02-03 01:16:45 -080076 "//frc971/wpilib:drivetrain_writer",
Brian Silverman6470f442018-08-05 12:08:16 -070077 "//frc971/wpilib:encoder_and_potentiometer",
78 "//frc971/wpilib:interrupt_edge_counting",
79 "//frc971/wpilib:joystick_sender",
80 "//frc971/wpilib:logging_queue",
81 "//frc971/wpilib:loop_output_handler",
82 "//frc971/wpilib:pdp_fetcher",
Austin Schuhbf29b6f2019-02-02 21:45:27 -080083 "//frc971/wpilib:sensor_reader",
Brian Silverman6470f442018-08-05 12:08:16 -070084 "//frc971/wpilib:wpilib_robot_base",
85 "//third_party:wpilib",
86 "//y2017/control_loops/superstructure:superstructure_queue",
87 ],
Brian Silverman06016bc2017-02-11 16:34:34 -080088)
Austin Schuh7b9a3ba2017-02-19 23:11:45 -080089
Lee Mracek6821fe02018-11-01 17:27:30 -040090robot_downloader(
Brian Silvermanf819b442019-01-20 16:51:04 -080091 start_binaries = [
92 ":joystick_reader",
93 ":wpilib_interface",
94 "//y2017/control_loops/drivetrain:drivetrain",
95 "//y2017/control_loops/superstructure:superstructure",
96 "//y2017/actors:autonomous_action",
97 ],
Brian Silverman6470f442018-08-05 12:08:16 -070098)
99
100py_library(
101 name = "python_init",
102 srcs = ["__init__.py"],
103 visibility = ["//visibility:public"],
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800104)