blob: 4e8660355cb982138aa6da21eb485a0cd31c54f9 [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",
Brian Silverman6470f442018-08-05 12:08:16 -070036 "//aos/input:drivetrain_input",
37 "//aos/input:joystick_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",
76 "//frc971/wpilib:encoder_and_potentiometer",
77 "//frc971/wpilib:interrupt_edge_counting",
78 "//frc971/wpilib:joystick_sender",
79 "//frc971/wpilib:logging_queue",
80 "//frc971/wpilib:loop_output_handler",
81 "//frc971/wpilib:pdp_fetcher",
82 "//frc971/wpilib:wpilib_interface",
83 "//frc971/wpilib:wpilib_robot_base",
84 "//third_party:wpilib",
85 "//y2017/control_loops/superstructure:superstructure_queue",
86 ],
Brian Silverman06016bc2017-02-11 16:34:34 -080087)
Austin Schuh7b9a3ba2017-02-19 23:11:45 -080088
Lee Mracek6821fe02018-11-01 17:27:30 -040089robot_downloader(
Brian Silvermanf819b442019-01-20 16:51:04 -080090 start_binaries = [
91 ":joystick_reader",
92 ":wpilib_interface",
93 "//y2017/control_loops/drivetrain:drivetrain",
94 "//y2017/control_loops/superstructure:superstructure",
95 "//y2017/actors:autonomous_action",
96 ],
Brian Silverman6470f442018-08-05 12:08:16 -070097)
98
99py_library(
100 name = "python_init",
101 srcs = ["__init__.py"],
102 visibility = ["//visibility:public"],
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800103)