Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 1 | load("//aos:config.bzl", "aos_config") |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 2 | load("//frc971:downloader.bzl", "robot_downloader") |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 3 | |
| 4 | robot_downloader( |
| 5 | binaries = [ |
| 6 | "//aos/network:web_proxy_main", |
| 7 | "//aos/events/logging:log_cat", |
| 8 | ], |
| 9 | data = [ |
| 10 | ":aos_config", |
Maxwell Henderson | fcc0d12 | 2023-08-05 17:03:34 -0700 | [diff] [blame] | 11 | "@ctre_phoenix6_api_cpp_athena//:shared_libraries", |
| 12 | "@ctre_phoenix6_tools_athena//:shared_libraries", |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 13 | ], |
| 14 | dirs = [ |
| 15 | "//y2022_bot3/actors:splines", |
| 16 | ], |
| 17 | start_binaries = [ |
| 18 | "//aos/events/logging:logger_main", |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 19 | ":joystick_reader", |
| 20 | ":wpilib_interface", |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 21 | "//y2022_bot3/control_loops/drivetrain:drivetrain", |
| 22 | "//y2022_bot3/control_loops/drivetrain:trajectory_generator", |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 23 | ], |
| 24 | target_compatible_with = ["@platforms//os:linux"], |
| 25 | ) |
| 26 | |
| 27 | robot_downloader( |
| 28 | name = "pi_download", |
| 29 | binaries = [ |
| 30 | "//aos/events/logging:log_cat", |
| 31 | ], |
| 32 | data = [ |
| 33 | ":aos_config", |
| 34 | ], |
| 35 | start_binaries = [ |
| 36 | "//aos/events/logging:logger_main", |
| 37 | "//aos/network:message_bridge_client", |
| 38 | "//aos/network:message_bridge_server", |
| 39 | "//aos/network:web_proxy_main", |
| 40 | ], |
| 41 | target_compatible_with = ["//tools/platforms/hardware:raspberry_pi"], |
| 42 | target_type = "pi", |
| 43 | ) |
| 44 | |
| 45 | aos_config( |
| 46 | name = "aos_config", |
| 47 | src = "y2022_bot3.json", |
| 48 | flatbuffers = [ |
| 49 | "//aos/network:message_bridge_client_fbs", |
| 50 | "//aos/network:message_bridge_server_fbs", |
| 51 | "//aos/network:timestamp_fbs", |
| 52 | "//frc971/input:robot_state_fbs", |
| 53 | ], |
| 54 | target_compatible_with = ["@platforms//os:linux"], |
| 55 | visibility = ["//visibility:public"], |
| 56 | deps = [ |
| 57 | ":config_imu", |
| 58 | ":config_roborio", |
| 59 | ], |
| 60 | ) |
| 61 | |
| 62 | aos_config( |
| 63 | name = "config_imu", |
| 64 | src = "y2022_bot3_imu.json", |
| 65 | flatbuffers = [ |
| 66 | "//aos/network:message_bridge_client_fbs", |
| 67 | "//aos/network:message_bridge_server_fbs", |
| 68 | "//aos/network:timestamp_fbs", |
| 69 | "//aos/network:remote_message_fbs", |
| 70 | ], |
| 71 | target_compatible_with = ["@platforms//os:linux"], |
| 72 | visibility = ["//visibility:public"], |
| 73 | deps = [ |
| 74 | "//aos/events:aos_config", |
| 75 | "//frc971/control_loops/drivetrain:aos_config", |
| 76 | ], |
| 77 | ) |
| 78 | |
| 79 | aos_config( |
| 80 | name = "config_roborio", |
| 81 | src = "y2022_bot3_roborio.json", |
| 82 | flatbuffers = [ |
| 83 | "//aos/network:remote_message_fbs", |
| 84 | "//aos/network:message_bridge_client_fbs", |
| 85 | "//aos/network:message_bridge_server_fbs", |
| 86 | "//aos/network:timestamp_fbs", |
| 87 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
| 88 | "//y2022_bot3/control_loops/superstructure:superstructure_goal_fbs", |
| 89 | "//y2022_bot3/control_loops/superstructure:superstructure_output_fbs", |
| 90 | "//y2022_bot3/control_loops/superstructure:superstructure_position_fbs", |
| 91 | "//y2022_bot3/control_loops/superstructure:superstructure_status_fbs", |
| 92 | ], |
| 93 | target_compatible_with = ["@platforms//os:linux"], |
| 94 | deps = [ |
| 95 | "//aos/events:aos_config", |
| 96 | "//frc971/autonomous:aos_config", |
| 97 | "//frc971/control_loops/drivetrain:aos_config", |
| 98 | "//frc971/input:aos_config", |
| 99 | "//frc971/wpilib:aos_config", |
| 100 | ], |
| 101 | ) |
| 102 | |
| 103 | cc_library( |
| 104 | name = "constants", |
| 105 | srcs = [ |
| 106 | "constants.cc", |
| 107 | ], |
| 108 | hdrs = [ |
| 109 | "constants.h", |
| 110 | ], |
| 111 | visibility = ["//visibility:public"], |
| 112 | deps = [ |
| 113 | "//aos/mutex", |
| 114 | "//aos/network:team_number", |
| 115 | "//frc971:constants", |
| 116 | "//frc971/control_loops:pose", |
| 117 | "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem", |
| 118 | "//frc971/shooter_interpolation:interpolation", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 119 | "//frc971/zeroing:pot_and_absolute_encoder", |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 120 | "//y2022_bot3/control_loops/drivetrain:polydrivetrain_plants", |
Thiago Monteiro | a47ae66 | 2022-08-27 16:05:54 -0700 | [diff] [blame] | 121 | "//y2022_bot3/control_loops/superstructure/climber:climber_plants", |
| 122 | "//y2022_bot3/control_loops/superstructure/intake:intake_plants", |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 123 | "@com_google_absl//absl/base", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 124 | "@com_google_absl//absl/log", |
| 125 | "@com_google_absl//absl/log:check", |
Henry Speiser | 354d278 | 2022-07-22 13:56:48 -0700 | [diff] [blame] | 126 | ], |
| 127 | ) |
| 128 | |
| 129 | cc_binary( |
| 130 | name = "wpilib_interface", |
| 131 | srcs = [ |
| 132 | "wpilib_interface.cc", |
| 133 | ], |
| 134 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
| 135 | deps = [ |
| 136 | ":constants", |
| 137 | "//aos:init", |
| 138 | "//aos:math", |
| 139 | "//aos/events:shm_event_loop", |
| 140 | "//aos/logging", |
| 141 | "//aos/stl_mutex", |
| 142 | "//aos/time", |
| 143 | "//aos/util:log_interval", |
| 144 | "//aos/util:phased_loop", |
| 145 | "//aos/util:wrapping_counter", |
| 146 | "//frc971/autonomous:auto_mode_fbs", |
| 147 | "//frc971/control_loops:control_loop", |
| 148 | "//frc971/control_loops:control_loops_fbs", |
| 149 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
| 150 | "//frc971/input:robot_state_fbs", |
| 151 | "//frc971/queues:gyro_fbs", |
| 152 | "//frc971/wpilib:ADIS16448", |
| 153 | "//frc971/wpilib:buffered_pcm", |
| 154 | "//frc971/wpilib:drivetrain_writer", |
| 155 | "//frc971/wpilib:encoder_and_potentiometer", |
| 156 | "//frc971/wpilib:interrupt_edge_counting", |
| 157 | "//frc971/wpilib:joystick_sender", |
| 158 | "//frc971/wpilib:logging_fbs", |
| 159 | "//frc971/wpilib:loop_output_handler", |
| 160 | "//frc971/wpilib:pdp_fetcher", |
| 161 | "//frc971/wpilib:sensor_reader", |
| 162 | "//frc971/wpilib:wpilib_interface", |
| 163 | "//frc971/wpilib:wpilib_robot_base", |
| 164 | "//third_party:phoenix", |
| 165 | "//third_party:wpilib", |
| 166 | "//y2022_bot3/control_loops/superstructure:superstructure_output_fbs", |
| 167 | "//y2022_bot3/control_loops/superstructure:superstructure_position_fbs", |
| 168 | ], |
| 169 | ) |
| 170 | |
| 171 | cc_binary( |
| 172 | name = "joystick_reader", |
| 173 | srcs = [ |
| 174 | ":joystick_reader.cc", |
| 175 | ], |
| 176 | deps = [ |
| 177 | ":constants", |
| 178 | "//aos:init", |
| 179 | "//aos/actions:action_lib", |
| 180 | "//aos/logging", |
| 181 | "//frc971/autonomous:auto_fbs", |
| 182 | "//frc971/autonomous:base_autonomous_actor", |
| 183 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 184 | "//frc971/input:action_joystick_input", |
| 185 | "//frc971/input:drivetrain_input", |
| 186 | "//frc971/input:joystick_input", |
| 187 | "//y2022_bot3/control_loops/drivetrain:drivetrain_base", |
| 188 | "//y2022_bot3/control_loops/superstructure:superstructure_goal_fbs", |
| 189 | "//y2022_bot3/control_loops/superstructure:superstructure_status_fbs", |
| 190 | ], |
| 191 | ) |
| 192 | |
| 193 | py_library( |
| 194 | name = "python_init", |
| 195 | srcs = ["__init__.py"], |
| 196 | target_compatible_with = ["@platforms//os:linux"], |
| 197 | visibility = ["//visibility:public"], |
| 198 | ) |
| 199 | |
| 200 | sh_binary( |
| 201 | name = "log_web_proxy", |
| 202 | srcs = ["log_web_proxy.sh"], |
| 203 | data = [ |
| 204 | ":aos_config", |
| 205 | "//aos/network:log_web_proxy_main", |
| 206 | ], |
| 207 | target_compatible_with = ["@platforms//os:linux"], |
| 208 | ) |