Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 1 | load("//frc971:downloader.bzl", "robot_downloader") |
| 2 | load("//aos:config.bzl", "aos_config") |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 3 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 4 | load("//tools/build_rules:template.bzl", "jinja2_template") |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 5 | |
| 6 | robot_downloader( |
Austin Schuh | d58b290 | 2020-03-01 19:28:04 -0800 | [diff] [blame] | 7 | binaries = [ |
| 8 | ":setpoint_setter", |
James Kuszmaul | 39a47bb | 2021-08-18 20:03:09 -0700 | [diff] [blame] | 9 | "//aos/network:web_proxy_main", |
Austin Schuh | d58b290 | 2020-03-01 19:28:04 -0800 | [diff] [blame] | 10 | ], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 11 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 12 | ":config", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 13 | ], |
Ravago Jones | c2a0802 | 2021-02-06 17:40:54 -0800 | [diff] [blame] | 14 | dirs = [ |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 15 | "//y2020/actors:splines", |
James Kuszmaul | 39a47bb | 2021-08-18 20:03:09 -0700 | [diff] [blame] | 16 | "//y2020/www:www_files", |
Ravago Jones | c2a0802 | 2021-02-06 17:40:54 -0800 | [diff] [blame] | 17 | ], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 18 | start_binaries = [ |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 19 | "//aos/events/logging:logger_main", |
James Kuszmaul | 5e6aa25 | 2021-08-28 22:19:29 -0700 | [diff] [blame] | 20 | "//aos/network:web_proxy_main", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 21 | ":joystick_reader", |
| 22 | ":wpilib_interface", |
Austin Schuh | 6aa77be | 2020-02-22 21:06:40 -0800 | [diff] [blame] | 23 | "//aos/network:message_bridge_client", |
| 24 | "//aos/network:message_bridge_server", |
| 25 | "//y2020/actors:binaries", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 26 | "//y2020/control_loops/drivetrain:drivetrain", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 27 | "//y2020/control_loops/drivetrain:trajectory_generator", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 28 | "//y2020/control_loops/superstructure:superstructure", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 29 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 30 | target_compatible_with = ["@platforms//os:linux"], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 31 | ) |
| 32 | |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 33 | robot_downloader( |
| 34 | name = "pi_download", |
Jim Ostrowski | baa4369 | 2020-03-08 16:25:10 -0700 | [diff] [blame] | 35 | binaries = [ |
| 36 | "//y2020/vision:viewer", |
| 37 | ], |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 38 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 39 | ":config", |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 40 | ], |
| 41 | dirs = [ |
| 42 | "//y2020/www:www_files", |
| 43 | ], |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 44 | start_binaries = [ |
Austin Schuh | 867bd92 | 2021-11-07 16:59:52 -0800 | [diff] [blame] | 45 | "//aos/events/logging:logger_main", |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 46 | "//aos/network:message_bridge_client", |
| 47 | "//aos/network:message_bridge_server", |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 48 | "//aos/network:web_proxy_main", |
Austin Schuh | 393015b | 2020-04-20 17:24:39 -0700 | [diff] [blame] | 49 | "//y2020/vision:camera_reader", |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 50 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 51 | target_compatible_with = ["//tools/platforms/hardware:raspberry_pi"], |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame] | 52 | target_type = "pi", |
| 53 | ) |
| 54 | |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 55 | cc_library( |
| 56 | name = "constants", |
| 57 | srcs = [ |
| 58 | "constants.cc", |
| 59 | ], |
| 60 | hdrs = [ |
| 61 | "constants.h", |
| 62 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 63 | target_compatible_with = ["@platforms//os:linux"], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 64 | visibility = ["//visibility:public"], |
| 65 | deps = [ |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 66 | "//aos/network:team_number", |
Brian Silverman | 1463c09 | 2020-10-30 17:28:24 -0700 | [diff] [blame] | 67 | "//aos/stl_mutex", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 68 | "//frc971:constants", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 69 | "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem", |
James Kuszmaul | 98154a2 | 2021-04-03 16:09:29 -0700 | [diff] [blame] | 70 | "//frc971/shooter_interpolation:interpolation", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 71 | "//y2020/control_loops/drivetrain:polydrivetrain_plants", |
Austin Schuh | 9dcd520 | 2020-02-20 20:06:04 -0800 | [diff] [blame] | 72 | "//y2020/control_loops/superstructure/accelerator:accelerator_plants", |
| 73 | "//y2020/control_loops/superstructure/control_panel:control_panel_plants", |
| 74 | "//y2020/control_loops/superstructure/finisher:finisher_plants", |
Sabina Davis | a587fbd | 2020-01-31 22:11:15 -0800 | [diff] [blame] | 75 | "//y2020/control_loops/superstructure/hood:hood_plants", |
Sabina Davis | e8d3899 | 2020-02-02 15:00:31 -0800 | [diff] [blame] | 76 | "//y2020/control_loops/superstructure/intake:intake_plants", |
Kai Tinkess | 10943cf | 2020-02-01 15:49:57 -0800 | [diff] [blame] | 77 | "//y2020/control_loops/superstructure/turret:turret_plants", |
Brian Silverman | f4d329c | 2021-11-04 19:32:10 -0700 | [diff] [blame] | 78 | "@com_github_google_glog//:glog", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 79 | "@com_google_absl//absl/base", |
| 80 | ], |
| 81 | ) |
| 82 | |
| 83 | cc_binary( |
| 84 | name = "wpilib_interface", |
| 85 | srcs = [ |
| 86 | "wpilib_interface.cc", |
| 87 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 88 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 89 | deps = [ |
| 90 | ":constants", |
| 91 | "//aos:init", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 92 | "//aos:math", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 93 | "//aos/events:shm_event_loop", |
| 94 | "//aos/logging", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 95 | "//aos/stl_mutex", |
| 96 | "//aos/time", |
| 97 | "//aos/util:log_interval", |
| 98 | "//aos/util:phased_loop", |
| 99 | "//aos/util:wrapping_counter", |
| 100 | "//frc971/autonomous:auto_mode_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 101 | "//frc971/control_loops:control_loop", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 102 | "//frc971/control_loops:control_loops_fbs", |
| 103 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 104 | "//frc971/input:robot_state_fbs", |
James Kuszmaul | 0a98140 | 2021-10-09 21:00:34 -0700 | [diff] [blame] | 105 | "//frc971/wpilib:ADIS16448", |
James Kuszmaul | a244a91 | 2020-01-18 13:50:50 -0800 | [diff] [blame] | 106 | "//frc971/wpilib:ADIS16470", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 107 | "//frc971/wpilib:buffered_pcm", |
| 108 | "//frc971/wpilib:drivetrain_writer", |
| 109 | "//frc971/wpilib:encoder_and_potentiometer", |
| 110 | "//frc971/wpilib:interrupt_edge_counting", |
| 111 | "//frc971/wpilib:joystick_sender", |
| 112 | "//frc971/wpilib:logging_fbs", |
| 113 | "//frc971/wpilib:loop_output_handler", |
| 114 | "//frc971/wpilib:pdp_fetcher", |
| 115 | "//frc971/wpilib:sensor_reader", |
| 116 | "//frc971/wpilib:wpilib_interface", |
| 117 | "//frc971/wpilib:wpilib_robot_base", |
Alex Perry | c4691f5 | 2020-02-17 19:20:01 -0800 | [diff] [blame] | 118 | "//third_party:phoenix", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 119 | "//third_party:wpilib", |
| 120 | "//y2020/control_loops/superstructure:superstructure_output_fbs", |
| 121 | "//y2020/control_loops/superstructure:superstructure_position_fbs", |
James Kuszmaul | 0a98140 | 2021-10-09 21:00:34 -0700 | [diff] [blame] | 122 | "//y2020/control_loops/superstructure/shooter:shooter_tuning_readings_fbs", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 123 | ], |
| 124 | ) |
| 125 | |
| 126 | cc_binary( |
| 127 | name = "joystick_reader", |
| 128 | srcs = [ |
| 129 | ":joystick_reader.cc", |
| 130 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 131 | target_compatible_with = ["@platforms//os:linux"], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 132 | deps = [ |
Austin Schuh | d58b290 | 2020-03-01 19:28:04 -0800 | [diff] [blame] | 133 | ":setpoint_fbs", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 134 | "//aos:init", |
| 135 | "//aos/actions:action_lib", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 136 | "//aos/logging", |
| 137 | "//frc971/autonomous:auto_fbs", |
| 138 | "//frc971/autonomous:base_autonomous_actor", |
| 139 | "//frc971/control_loops:profiled_subsystem_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 140 | "//frc971/input:action_joystick_input", |
| 141 | "//frc971/input:drivetrain_input", |
| 142 | "//frc971/input:joystick_input", |
Austin Schuh | 0b00c86 | 2021-10-17 17:39:10 -0700 | [diff] [blame] | 143 | "//frc971/zeroing:wrap", |
Sabina Davis | a8fed3d | 2020-02-22 21:44:57 -0800 | [diff] [blame] | 144 | "//y2020:constants", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 145 | "//y2020/control_loops/drivetrain:drivetrain_base", |
| 146 | "//y2020/control_loops/superstructure:superstructure_goal_fbs", |
| 147 | "//y2020/control_loops/superstructure:superstructure_status_fbs", |
| 148 | ], |
| 149 | ) |
| 150 | |
| 151 | aos_config( |
| 152 | name = "config", |
| 153 | src = "y2020.json", |
Austin Schuh | c61e9c0 | 2021-04-26 12:10:40 -0700 | [diff] [blame] | 154 | flatbuffers = [ |
| 155 | "//aos/network:message_bridge_client_fbs", |
| 156 | "//aos/network:message_bridge_server_fbs", |
| 157 | "//aos/network:timestamp_fbs", |
Jim Ostrowski | 977850f | 2022-01-22 21:04:22 -0800 | [diff] [blame^] | 158 | "//frc971/vision:vision_fbs", |
Austin Schuh | c61e9c0 | 2021-04-26 12:10:40 -0700 | [diff] [blame] | 159 | "//y2020/vision/sift:sift_fbs", |
| 160 | "//y2020/vision/sift:sift_training_fbs", |
Austin Schuh | c61e9c0 | 2021-04-26 12:10:40 -0700 | [diff] [blame] | 161 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 162 | target_compatible_with = ["@platforms//os:linux"], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 163 | visibility = ["//visibility:public"], |
| 164 | deps = [ |
Austin Schuh | 41fad8c | 2021-10-23 21:25:12 -0700 | [diff] [blame] | 165 | ":config_logger", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 166 | ":config_pi1", |
| 167 | ":config_pi2", |
| 168 | ":config_pi3", |
Austin Schuh | 196a445 | 2020-03-15 23:12:03 -0700 | [diff] [blame] | 169 | ":config_pi4", |
James Kuszmaul | 9c12812 | 2021-03-22 22:24:36 -0700 | [diff] [blame] | 170 | ":config_pi5", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 171 | ":config_roborio", |
| 172 | ], |
| 173 | ) |
| 174 | |
| 175 | [ |
| 176 | aos_config( |
| 177 | name = "config_" + pi, |
| 178 | src = "y2020_" + pi + ".json", |
| 179 | flatbuffers = [ |
| 180 | "//aos/network:message_bridge_client_fbs", |
| 181 | "//aos/network:message_bridge_server_fbs", |
Jim Ostrowski | 977850f | 2022-01-22 21:04:22 -0800 | [diff] [blame^] | 182 | "//aos/network:remote_message_fbs", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 183 | "//aos/network:timestamp_fbs", |
Jim Ostrowski | 977850f | 2022-01-22 21:04:22 -0800 | [diff] [blame^] | 184 | "//frc971/vision:vision_fbs", |
| 185 | "//y2020/vision:galactic_search_path_fbs", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 186 | "//y2020/vision/sift:sift_fbs", |
| 187 | "//y2020/vision/sift:sift_training_fbs", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 188 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 189 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 190 | visibility = ["//visibility:public"], |
| 191 | deps = [ |
| 192 | "//aos/events:config", |
Austin Schuh | ac17fba | 2020-03-28 15:55:33 -0700 | [diff] [blame] | 193 | "//frc971/control_loops/drivetrain:config", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 194 | "//frc971/input:config", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 195 | ], |
| 196 | ) |
| 197 | for pi in [ |
| 198 | "pi1", |
| 199 | "pi2", |
| 200 | "pi3", |
Austin Schuh | 196a445 | 2020-03-15 23:12:03 -0700 | [diff] [blame] | 201 | "pi4", |
James Kuszmaul | 9c12812 | 2021-03-22 22:24:36 -0700 | [diff] [blame] | 202 | "pi5", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 203 | ] |
| 204 | ] |
| 205 | |
| 206 | aos_config( |
Austin Schuh | 41fad8c | 2021-10-23 21:25:12 -0700 | [diff] [blame] | 207 | name = "config_logger", |
| 208 | src = "y2020_logger.json", |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 209 | flatbuffers = [ |
| 210 | "//aos/network:message_bridge_client_fbs", |
| 211 | "//aos/network:message_bridge_server_fbs", |
Jim Ostrowski | 977850f | 2022-01-22 21:04:22 -0800 | [diff] [blame^] | 212 | "//aos/network:remote_message_fbs", |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 213 | "//aos/network:timestamp_fbs", |
Jim Ostrowski | 977850f | 2022-01-22 21:04:22 -0800 | [diff] [blame^] | 214 | "//frc971/vision:vision_fbs", |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 215 | "//y2020/vision/sift:sift_fbs", |
| 216 | "//y2020/vision/sift:sift_training_fbs", |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 217 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 218 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 219 | visibility = ["//visibility:public"], |
| 220 | deps = [ |
| 221 | "//aos/events:config", |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 222 | "//frc971/control_loops/drivetrain:config", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 223 | "//frc971/input:config", |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 224 | ], |
| 225 | ) |
| 226 | |
| 227 | aos_config( |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 228 | name = "config_roborio", |
| 229 | src = "y2020_roborio.json", |
| 230 | flatbuffers = [ |
| 231 | ":setpoint_fbs", |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 232 | "//aos/network:remote_message_fbs", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 233 | "//aos/network:message_bridge_client_fbs", |
| 234 | "//aos/network:message_bridge_server_fbs", |
| 235 | "//aos/network:timestamp_fbs", |
milind-u | 661a118 | 2021-09-21 20:30:43 -0700 | [diff] [blame] | 236 | "//y2020/control_loops/superstructure/shooter:shooter_tuning_params_fbs", |
milind-u | 4b31c4d | 2021-09-18 16:08:23 -0700 | [diff] [blame] | 237 | "//y2020/control_loops/superstructure/shooter:shooter_tuning_readings_fbs", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 238 | "//y2020/control_loops/superstructure:superstructure_goal_fbs", |
| 239 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
James Kuszmaul | 5ff8a86 | 2021-09-25 17:29:43 -0700 | [diff] [blame] | 240 | "//y2020/control_loops/drivetrain:localizer_debug_fbs", |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 241 | "//y2020/control_loops/superstructure:superstructure_output_fbs", |
| 242 | "//y2020/control_loops/superstructure:superstructure_position_fbs", |
| 243 | "//y2020/control_loops/superstructure:superstructure_status_fbs", |
| 244 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 245 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ce3a191 | 2020-03-15 15:14:19 -0700 | [diff] [blame] | 246 | deps = [ |
| 247 | "//aos/events:config", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 248 | "//frc971/autonomous:config", |
| 249 | "//frc971/control_loops/drivetrain:config", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 250 | "//frc971/input:config", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 251 | "//frc971/wpilib:config", |
| 252 | ], |
| 253 | ) |
| 254 | |
| 255 | py_library( |
| 256 | name = "python_init", |
| 257 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 258 | target_compatible_with = ["@platforms//os:linux"], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 259 | visibility = ["//visibility:public"], |
| 260 | ) |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 261 | |
| 262 | sh_binary( |
James Kuszmaul | 5e6aa25 | 2021-08-28 22:19:29 -0700 | [diff] [blame] | 263 | name = "log_web_proxy", |
| 264 | srcs = ["log_web_proxy.sh"], |
| 265 | data = [ |
| 266 | ":config", |
| 267 | "//aos/network:log_web_proxy_main", |
| 268 | "//y2020/www:camera_main_bundle.min.js", |
| 269 | "//y2020/www:field_main_bundle.min.js", |
| 270 | "//y2020/www:files", |
| 271 | ], |
| 272 | target_compatible_with = ["@platforms//os:linux"], |
| 273 | ) |
| 274 | |
| 275 | sh_binary( |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 276 | name = "web_proxy", |
| 277 | srcs = ["web_proxy.sh"], |
| 278 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 279 | ":config", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 280 | "//aos/network:web_proxy_main", |
Austin Schuh | da9d060 | 2019-09-15 17:29:38 -0700 | [diff] [blame] | 281 | "//y2020/www:camera_main_bundle.min.js", |
| 282 | "//y2020/www:field_main_bundle.min.js", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 283 | "//y2020/www:files", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 284 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 285 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 286 | ) |
Austin Schuh | d58b290 | 2020-03-01 19:28:04 -0800 | [diff] [blame] | 287 | |
Austin Schuh | d58b290 | 2020-03-01 19:28:04 -0800 | [diff] [blame] | 288 | flatbuffer_cc_library( |
| 289 | name = "setpoint_fbs", |
| 290 | srcs = [ |
| 291 | "setpoint.fbs", |
| 292 | ], |
| 293 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 294 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | d58b290 | 2020-03-01 19:28:04 -0800 | [diff] [blame] | 295 | ) |
| 296 | |
| 297 | cc_binary( |
| 298 | name = "setpoint_setter", |
| 299 | srcs = ["setpoint_setter.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 300 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | d58b290 | 2020-03-01 19:28:04 -0800 | [diff] [blame] | 301 | deps = [ |
| 302 | ":setpoint_fbs", |
| 303 | "//aos:init", |
| 304 | "//aos/events:shm_event_loop", |
| 305 | ], |
| 306 | ) |
James Kuszmaul | 55d9fc7 | 2020-05-10 18:58:08 -0700 | [diff] [blame] | 307 | |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 308 | [ |
| 309 | jinja2_template( |
| 310 | name = "y2020_pi" + str(num) + ".json", |
| 311 | src = "y2020_pi_template.json", |
| 312 | parameters = {"NUM": str(num)}, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 313 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 314 | ) |
James Kuszmaul | 9c12812 | 2021-03-22 22:24:36 -0700 | [diff] [blame] | 315 | for num in range(1, 6) |
Austin Schuh | 3a2f4a4 | 2020-09-16 14:10:39 -0700 | [diff] [blame] | 316 | ] |