blob: 8c22d28a46f043b7c264dfe3a16778cab3633636 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001load("//aos:config.bzl", "aos_config")
Austin Schuh8f99c822024-05-05 22:43:40 -07002load("//frc971:downloader.bzl", "robot_downloader")
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 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080012 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -070013 visibility = ["//visibility:public"],
14 deps = [
John Park33858a32018-09-28 23:05:48 -070015 "//aos/network:team_number",
Brian Silverman1463c092020-10-30 17:28:24 -070016 "//aos/stl_mutex",
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",
Austin Schuh99f7c6a2024-06-25 22:07:44 -070021 "@com_google_absl//absl/log",
22 "@com_google_absl//absl/log:check",
Brian Silverman6470f442018-08-05 12:08:16 -070023 ],
Brian Silverman8c374e02015-09-06 23:02:21 -040024)
25
26cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070027 name = "joystick_reader",
28 srcs = [
29 "joystick_reader.cc",
30 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080031 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -070032 deps = [
33 ":constants",
John Park398c74a2018-10-20 21:17:39 -070034 "//aos:init",
Brian Silvermanf819b442019-01-20 16:51:04 -080035 "//aos/actions:action_lib",
Brian Silvermanf819b442019-01-20 16:51:04 -080036 "//aos/logging",
37 "//aos/time",
38 "//aos/util:log_interval",
Alex Perrycb7da4b2019-08-28 19:35:56 -070039 "//frc971/autonomous:auto_fbs",
40 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
Austin Schuh0a3c9d42021-07-15 22:36:24 -070041 "//frc971/input:action_joystick_input",
Tyler Chatow24b5db12020-01-06 21:16:56 -080042 "//frc971/queues:gyro_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -070043 "//y2014/actors:shoot_action_lib",
Alex Perrycb7da4b2019-08-28 19:35:56 -070044 "//y2014/control_loops/claw:claw_goal_fbs",
45 "//y2014/control_loops/claw:claw_status_fbs",
Austin Schuhbfb04122019-05-22 21:16:51 -070046 "//y2014/control_loops/drivetrain:drivetrain_base",
Alex Perrycb7da4b2019-08-28 19:35:56 -070047 "//y2014/control_loops/shooter:shooter_goal_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -070048 ],
Brian Silverman8c374e02015-09-06 23:02:21 -040049)
Austin Schuhb4e31952015-11-26 17:24:30 -080050
Lee Mracek6821fe02018-11-01 17:27:30 -040051robot_downloader(
52 start_binaries = [
Brian Silverman6470f442018-08-05 12:08:16 -070053 ":hot_goal_reader",
54 ":joystick_reader",
55 ":wpilib_interface",
56 "//y2014/control_loops/drivetrain:drivetrain",
57 "//y2014/control_loops/claw:claw",
58 "//y2014/control_loops/shooter:shooter",
Brian Silverman6470f442018-08-05 12:08:16 -070059 "//y2014/actors:binaries",
Brian Silverman6470f442018-08-05 12:08:16 -070060 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080061 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhb4e31952015-11-26 17:24:30 -080062)
63
64cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070065 name = "hot_goal_reader",
66 srcs = [
67 "hot_goal_reader.cc",
68 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080069 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -070070 deps = [
Brian Silvermanf819b442019-01-20 16:51:04 -080071 "//aos:init",
Alex Perrycb7da4b2019-08-28 19:35:56 -070072 "//aos/events:shm_event_loop",
John Park33858a32018-09-28 23:05:48 -070073 "//aos/logging",
Brian Silvermanf819b442019-01-20 16:51:04 -080074 "//aos/time",
Alex Perrycb7da4b2019-08-28 19:35:56 -070075 "//y2014/queues:hot_goal_fbs",
76 ],
77)
78
79aos_config(
Austin Schuhc5fa6d92022-02-25 14:36:28 -080080 name = "aos_config",
Alex Perrycb7da4b2019-08-28 19:35:56 -070081 src = "y2014.json",
82 flatbuffers = [
83 "//y2014/control_loops/shooter:shooter_goal_fbs",
84 "//y2014/control_loops/shooter:shooter_output_fbs",
85 "//y2014/control_loops/shooter:shooter_position_fbs",
86 "//y2014/control_loops/shooter:shooter_status_fbs",
87 "//y2014/control_loops/claw:claw_goal_fbs",
88 "//y2014/control_loops/claw:claw_output_fbs",
89 "//y2014/control_loops/claw:claw_position_fbs",
90 "//y2014/control_loops/claw:claw_status_fbs",
91 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080092 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -070093 visibility = ["//visibility:public"],
94 deps = [
Austin Schuhc5fa6d92022-02-25 14:36:28 -080095 "//frc971/control_loops/drivetrain:aos_config",
96 "//frc971/input:aos_config",
Brian Silverman6470f442018-08-05 12:08:16 -070097 ],
Austin Schuhb4e31952015-11-26 17:24:30 -080098)
Brian Silverman06016bc2017-02-11 16:34:34 -080099
100cc_binary(
Brian Silverman6470f442018-08-05 12:08:16 -0700101 name = "wpilib_interface",
102 srcs = [
103 "wpilib_interface.cc",
104 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800105 target_compatible_with = ["//tools/platforms/hardware:roborio"],
Brian Silverman6470f442018-08-05 12:08:16 -0700106 deps = [
107 ":constants",
Brian Silvermanf819b442019-01-20 16:51:04 -0800108 "//aos:init",
John Park33858a32018-09-28 23:05:48 -0700109 "//aos/logging",
Brian Silvermanf819b442019-01-20 16:51:04 -0800110 "//aos/stl_mutex",
111 "//aos/time",
John Park33858a32018-09-28 23:05:48 -0700112 "//aos/util:log_interval",
113 "//aos/util:phased_loop",
114 "//aos/util:wrapping_counter",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700115 "//frc971/control_loops:control_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700116 "//frc971/control_loops:control_loops_fbs",
117 "//frc971/control_loops/drivetrain:drivetrain_output_fbs",
118 "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700119 "//frc971/input:robot_state_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700120 "//frc971/wpilib:buffered_pcm",
121 "//frc971/wpilib:dma",
122 "//frc971/wpilib:dma_edge_counting",
Sabina Davis05f580f2019-02-03 01:17:35 -0800123 "//frc971/wpilib:drivetrain_writer",
Brian Silverman6470f442018-08-05 12:08:16 -0700124 "//frc971/wpilib:encoder_and_potentiometer",
125 "//frc971/wpilib:gyro_sender",
126 "//frc971/wpilib:interrupt_edge_counting",
127 "//frc971/wpilib:joystick_sender",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700128 "//frc971/wpilib:logging_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700129 "//frc971/wpilib:loop_output_handler",
130 "//frc971/wpilib:pdp_fetcher",
Austin Schuh2c2cc2e2019-02-02 20:19:45 -0800131 "//frc971/wpilib:sensor_reader",
Brian Silverman6470f442018-08-05 12:08:16 -0700132 "//frc971/wpilib:wpilib_interface",
133 "//frc971/wpilib:wpilib_robot_base",
134 "//third_party:wpilib",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700135 "//y2014/control_loops/claw:claw_output_fbs",
136 "//y2014/control_loops/claw:claw_position_fbs",
137 "//y2014/control_loops/shooter:shooter_output_fbs",
138 "//y2014/control_loops/shooter:shooter_position_fbs",
139 "//y2014/queues:auto_mode_fbs",
Brian Silverman6470f442018-08-05 12:08:16 -0700140 ],
141)
142
143py_library(
144 name = "python_init",
145 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800146 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700147 visibility = ["//visibility:public"],
Brian Silverman06016bc2017-02-11 16:34:34 -0800148)