Adam Snaider | 13d48d9 | 2023-08-03 12:20:15 -0700 | [diff] [blame] | 1 | load("@rules_cc//cc:defs.bzl", "cc_proto_library") |
| 2 | load("@rules_proto//proto:defs.bzl", "proto_library") |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 3 | load("//aos:config.bzl", "aos_config") |
| 4 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
| 5 | load("//frc971:downloader.bzl", "robot_downloader") |
Neil Balch | acfca5b | 2018-01-28 14:04:08 -0800 | [diff] [blame] | 6 | |
Lee Mracek | 6821fe0 | 2018-11-01 17:27:30 -0400 | [diff] [blame] | 7 | robot_downloader( |
| 8 | start_binaries = [ |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 9 | ":joystick_reader", |
| 10 | ":wpilib_interface", |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 11 | "//y2018/vision:vision_status", |
Austin Schuh | a3c148e | 2018-03-09 21:04:05 -0800 | [diff] [blame] | 12 | "//y2018/actors:autonomous_action", |
Lee Mracek | 6821fe0 | 2018-11-01 17:27:30 -0400 | [diff] [blame] | 13 | "//y2018/control_loops/drivetrain:drivetrain", |
Austin Schuh | a3c148e | 2018-03-09 21:04:05 -0800 | [diff] [blame] | 14 | "//y2018/control_loops/superstructure:superstructure", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 15 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 16 | target_compatible_with = ["@platforms//os:linux"], |
Neil Balch | acfca5b | 2018-01-28 14:04:08 -0800 | [diff] [blame] | 17 | ) |
| 18 | |
Neil Balch | acfca5b | 2018-01-28 14:04:08 -0800 | [diff] [blame] | 19 | cc_binary( |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 20 | name = "joystick_reader", |
| 21 | srcs = [ |
| 22 | "joystick_reader.cc", |
| 23 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 24 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 25 | deps = [ |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 26 | ":vision_proto", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 27 | "//aos:init", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 28 | "//aos/actions:action_lib", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 29 | "//aos/logging", |
| 30 | "//aos/network:team_number", |
| 31 | "//aos/stl_mutex", |
| 32 | "//aos/time", |
| 33 | "//aos/util:log_interval", |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 34 | "//aos/vision/events:udp", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 35 | "//frc971/autonomous:auto_fbs", |
Austin Schuh | a3c148e | 2018-03-09 21:04:05 -0800 | [diff] [blame] | 36 | "//frc971/autonomous:base_autonomous_actor", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 37 | "//frc971/input:action_joystick_input", |
| 38 | "//frc971/input:drivetrain_input", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 39 | "//y2018/control_loops/drivetrain:drivetrain_base", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 40 | "//y2018/control_loops/superstructure:superstructure_goal_fbs", |
| 41 | "//y2018/control_loops/superstructure:superstructure_position_fbs", |
| 42 | "//y2018/control_loops/superstructure:superstructure_status_fbs", |
Austin Schuh | ab15c4d | 2018-03-09 21:21:03 -0800 | [diff] [blame] | 43 | "//y2018/control_loops/superstructure/arm:generated_graph", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 44 | ], |
| 45 | ) |
| 46 | |
| 47 | cc_library( |
| 48 | name = "constants", |
| 49 | srcs = [ |
| 50 | "constants.cc", |
| 51 | ], |
| 52 | hdrs = [ |
| 53 | "constants.h", |
| 54 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 55 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 56 | visibility = ["//visibility:public"], |
| 57 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 58 | "//aos/network:team_number", |
Brian Silverman | 1463c09 | 2020-10-30 17:28:24 -0700 | [diff] [blame] | 59 | "//aos/stl_mutex", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 60 | "//frc971:constants", |
Maxwell Henderson | 8f0e07f | 2023-02-08 21:10:58 -0800 | [diff] [blame] | 61 | "//frc971/control_loops/double_jointed_arm:dynamics", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 62 | "//frc971/shooter_interpolation:interpolation", |
| 63 | "//y2018/control_loops/drivetrain:polydrivetrain_plants", |
Maxwell Henderson | 8f0e07f | 2023-02-08 21:10:58 -0800 | [diff] [blame] | 64 | "//y2018/control_loops/superstructure/arm:arm_constants", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 65 | "//y2018/control_loops/superstructure/intake:intake_plants", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 66 | "@com_google_absl//absl/log", |
| 67 | "@com_google_absl//absl/log:check", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 68 | ], |
| 69 | ) |
| 70 | |
| 71 | cc_binary( |
| 72 | name = "wpilib_interface", |
| 73 | srcs = [ |
| 74 | "wpilib_interface.cc", |
| 75 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 76 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 77 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 78 | ":status_light_fbs", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 79 | "//aos:init", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 80 | "//aos:math", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 81 | "//aos/logging", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 82 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 83 | "//aos/util:log_interval", |
| 84 | "//aos/util:phased_loop", |
| 85 | "//aos/util:wrapping_counter", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 86 | "//frc971/autonomous:auto_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 87 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 88 | "//frc971/control_loops:control_loops_fbs", |
| 89 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
| 90 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 91 | "//frc971/input:robot_state_fbs", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 92 | "//frc971/wpilib:ADIS16448", |
| 93 | "//frc971/wpilib:buffered_pcm", |
| 94 | "//frc971/wpilib:dma", |
| 95 | "//frc971/wpilib:dma_edge_counting", |
Sabina Davis | caa2a6b | 2019-02-03 01:15:37 -0800 | [diff] [blame] | 96 | "//frc971/wpilib:drivetrain_writer", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 97 | "//frc971/wpilib:encoder_and_potentiometer", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 98 | "//frc971/wpilib:joystick_sender", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 99 | "//frc971/wpilib:logging_fbs", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 100 | "//frc971/wpilib:loop_output_handler", |
| 101 | "//frc971/wpilib:pdp_fetcher", |
Austin Schuh | 6abf5b7 | 2019-02-02 20:20:54 -0800 | [diff] [blame] | 102 | "//frc971/wpilib:sensor_reader", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 103 | "//frc971/wpilib:wpilib_robot_base", |
Austin Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 104 | "//third_party:phoenix", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 105 | "//third_party:wpilib", |
| 106 | "//y2018:constants", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 107 | "//y2018/control_loops/superstructure:superstructure_output_fbs", |
| 108 | "//y2018/control_loops/superstructure:superstructure_position_fbs", |
| 109 | "//y2018/vision:vision_fbs", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 110 | ], |
Neil Balch | acfca5b | 2018-01-28 14:04:08 -0800 | [diff] [blame] | 111 | ) |
Brian Silverman | 37281fc | 2018-03-11 18:42:17 -0700 | [diff] [blame] | 112 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 113 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 114 | name = "status_light_fbs", |
Brian Silverman | 37281fc | 2018-03-11 18:42:17 -0700 | [diff] [blame] | 115 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 116 | "status_light.fbs", |
| 117 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 118 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 119 | visibility = ["//visibility:public"], |
| 120 | ) |
| 121 | |
| 122 | aos_config( |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 123 | name = "aos_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 124 | src = "y2018.json", |
| 125 | flatbuffers = [ |
| 126 | ":status_light_fbs", |
| 127 | "//y2018/control_loops/superstructure:superstructure_goal_fbs", |
| 128 | "//y2018/control_loops/superstructure:superstructure_output_fbs", |
| 129 | "//y2018/control_loops/superstructure:superstructure_position_fbs", |
| 130 | "//y2018/control_loops/superstructure:superstructure_status_fbs", |
| 131 | "//y2018/vision:vision_fbs", |
Brian Silverman | 37281fc | 2018-03-11 18:42:17 -0700 | [diff] [blame] | 132 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 133 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 134 | visibility = ["//visibility:public"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 135 | deps = [ |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 136 | "//frc971/control_loops/drivetrain:aos_config", |
| 137 | "//frc971/input:aos_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 138 | ], |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 139 | ) |
| 140 | |
Adam Snaider | 13d48d9 | 2023-08-03 12:20:15 -0700 | [diff] [blame] | 141 | proto_library( |
| 142 | name = "vision_proto_proto", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 143 | srcs = ["vision.proto"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 144 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 145 | visibility = ["//visibility:public"], |
Brian Silverman | 37281fc | 2018-03-11 18:42:17 -0700 | [diff] [blame] | 146 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 147 | |
Adam Snaider | 13d48d9 | 2023-08-03 12:20:15 -0700 | [diff] [blame] | 148 | cc_proto_library( |
| 149 | name = "vision_proto", |
| 150 | target_compatible_with = ["@platforms//os:linux"], |
| 151 | visibility = ["//visibility:public"], |
| 152 | deps = ["vision_proto_proto"], |
| 153 | ) |
| 154 | |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 155 | py_library( |
| 156 | name = "python_init", |
| 157 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 158 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 159 | visibility = ["//visibility:public"], |
| 160 | ) |