blob: 6ff529a502d579f58024199ee192874876948b28 [file] [log] [blame]
Lee Mracek6821fe02018-11-01 17:27:30 -04001load("//frc971:downloader.bzl", "robot_downloader")
Alex Perrycb7da4b2019-08-28 19:35:56 -07002load("//aos:config.bzl", "aos_config")
Austin Schuhb4e31952015-11-26 17:24:30 -08003
Brian Silverman8c374e02015-09-06 23:02:21 -04004cc_library(
Brian Silverman6470f442018-08-05 12:08:16 -07005 name = "constants",
6 srcs = [
7 "constants.cc",
8 ],
9 hdrs = [
10 "constants.h",
11 ],
12 visibility = ["//visibility:public"],
13 deps = [
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:shifter_hall_effect",
18 "//frc971/control_loops:state_feedback_loop",
19 "//y2014/control_loops/drivetrain:polydrivetrain_plants",
Austin Schuhdde64052019-12-11 20:28:00 -080020 "@com_google_absl//absl/base",
Brian Silverman6470f442018-08-05 12:08:16 -070021 ],
Brian Silverman8c374e02015-09-06 23:02:21 -040022)
23
24cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070025 name = "joystick_reader",
26 srcs = [
27 "joystick_reader.cc",
28 ],
29 deps = [
30 ":constants",
John Park398c74a2018-10-20 21:17:39 -070031 "//aos:init",
Brian Silvermanf819b442019-01-20 16:51:04 -080032 "//aos/actions:action_lib",
Austin Schuhbfb04122019-05-22 21:16:51 -070033 "//aos/input:action_joystick_input",
Brian Silvermanf819b442019-01-20 16:51:04 -080034 "//aos/logging",
35 "//aos/time",
36 "//aos/util:log_interval",
Alex Perrycb7da4b2019-08-28 19:35:56 -070037 "//frc971/autonomous:auto_fbs",
38 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
Tyler Chatow24b5db12020-01-06 21:16:56 -080039 "//frc971/queues:gyro_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -070040 "//y2014/actors:shoot_action_lib",
Alex Perrycb7da4b2019-08-28 19:35:56 -070041 "//y2014/control_loops/claw:claw_goal_fbs",
42 "//y2014/control_loops/claw:claw_status_fbs",
Austin Schuhbfb04122019-05-22 21:16:51 -070043 "//y2014/control_loops/drivetrain:drivetrain_base",
Alex Perrycb7da4b2019-08-28 19:35:56 -070044 "//y2014/control_loops/shooter:shooter_goal_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -070045 ],
Brian Silverman8c374e02015-09-06 23:02:21 -040046)
Austin Schuhb4e31952015-11-26 17:24:30 -080047
Lee Mracek6821fe02018-11-01 17:27:30 -040048robot_downloader(
49 start_binaries = [
Brian Silverman6470f442018-08-05 12:08:16 -070050 ":hot_goal_reader",
51 ":joystick_reader",
52 ":wpilib_interface",
53 "//y2014/control_loops/drivetrain:drivetrain",
54 "//y2014/control_loops/claw:claw",
55 "//y2014/control_loops/shooter:shooter",
Brian Silverman6470f442018-08-05 12:08:16 -070056 "//y2014/actors:binaries",
Brian Silverman6470f442018-08-05 12:08:16 -070057 ],
Austin Schuhb4e31952015-11-26 17:24:30 -080058)
59
60cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070061 name = "hot_goal_reader",
62 srcs = [
63 "hot_goal_reader.cc",
64 ],
65 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070066 "//aos:byteorder",
Brian Silvermanf819b442019-01-20 16:51:04 -080067 "//aos:init",
Alex Perrycb7da4b2019-08-28 19:35:56 -070068 "//aos/events:shm_event_loop",
John Park33858a32018-09-28 23:05:48 -070069 "//aos/logging",
Brian Silvermanf819b442019-01-20 16:51:04 -080070 "//aos/time",
Alex Perrycb7da4b2019-08-28 19:35:56 -070071 "//y2014/queues:hot_goal_fbs",
72 ],
73)
74
75aos_config(
76 name = "config",
77 src = "y2014.json",
78 flatbuffers = [
79 "//y2014/control_loops/shooter:shooter_goal_fbs",
80 "//y2014/control_loops/shooter:shooter_output_fbs",
81 "//y2014/control_loops/shooter:shooter_position_fbs",
82 "//y2014/control_loops/shooter:shooter_status_fbs",
83 "//y2014/control_loops/claw:claw_goal_fbs",
84 "//y2014/control_loops/claw:claw_output_fbs",
85 "//y2014/control_loops/claw:claw_position_fbs",
86 "//y2014/control_loops/claw:claw_status_fbs",
87 ],
88 visibility = ["//visibility:public"],
89 deps = [
90 "//aos/robot_state:config",
91 "//frc971/control_loops/drivetrain:config",
Brian Silverman6470f442018-08-05 12:08:16 -070092 ],
Austin Schuhb4e31952015-11-26 17:24:30 -080093)
Brian Silverman06016bc2017-02-11 16:34:34 -080094
95cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070096 name = "wpilib_interface",
97 srcs = [
98 "wpilib_interface.cc",
99 ],
100 restricted_to = ["//tools:roborio"],
101 deps = [
102 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -0800103 "//aos:init",
104 "//aos:make_unique",
John Park33858a32018-09-28 23:05:48 -0700105 "//aos/controls:control_loop",
106 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700107 "//aos/robot_state:robot_state_fbs",
Brian Silvermanf819b442019-01-20 16:51:04 -0800108 "//aos/stl_mutex",
109 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700110 "//aos/util:log_interval",
111 "//aos/util:phased_loop",
112 "//aos/util:wrapping_counter",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700113 "//frc971/control_loops:control_loops_fbs",
114 "//frc971/control_loops/drivetrain:drivetrain_output_fbs",
115 "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700116 "//frc971/wpilib:buffered_pcm",
117 "//frc971/wpilib:dma",
118 "//frc971/wpilib:dma_edge_counting",
Sabina Davis05f580f2019-02-03 01:17:35 -0800119 "//frc971/wpilib:drivetrain_writer",
Brian Silverman6470f442018-08-05 12:08:16 -0700120 "//frc971/wpilib:encoder_and_potentiometer",
121 "//frc971/wpilib:gyro_sender",
122 "//frc971/wpilib:interrupt_edge_counting",
123 "//frc971/wpilib:joystick_sender",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700124 "//frc971/wpilib:logging_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700125 "//frc971/wpilib:loop_output_handler",
126 "//frc971/wpilib:pdp_fetcher",
Austin Schuh2c2cc2e2019-02-02 20:19:45 -0800127 "//frc971/wpilib:sensor_reader",
Brian Silverman6470f442018-08-05 12:08:16 -0700128 "//frc971/wpilib:wpilib_interface",
129 "//frc971/wpilib:wpilib_robot_base",
130 "//third_party:wpilib",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700131 "//y2014/control_loops/claw:claw_output_fbs",
132 "//y2014/control_loops/claw:claw_position_fbs",
133 "//y2014/control_loops/shooter:shooter_output_fbs",
134 "//y2014/control_loops/shooter:shooter_position_fbs",
135 "//y2014/queues:auto_mode_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700136 ],
137)
138
139py_library(
140 name = "python_init",
141 srcs = ["__init__.py"],
142 visibility = ["//visibility:public"],
Brian Silverman06016bc2017-02-11 16:34:34 -0800143)