James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame^] | 1 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 2 | load("//tools/build_rules:js.bzl", "ts_project") |
Austin Schuh | a1d006e | 2022-09-14 21:50:42 -0700 | [diff] [blame] | 3 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 4 | |
Philipp Schrader | cc016b3 | 2021-12-30 08:59:58 -0800 | [diff] [blame] | 5 | package(default_visibility = ["//visibility:public"]) |
| 6 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame^] | 7 | static_flatbuffer( |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 8 | name = "superstructure_goal_fbs", |
| 9 | srcs = [ |
| 10 | "superstructure_goal.fbs", |
| 11 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 12 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame^] | 13 | deps = [ |
| 14 | "//frc971/control_loops:control_loops_fbs", |
| 15 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 16 | ], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 17 | ) |
| 18 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame^] | 19 | static_flatbuffer( |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 20 | name = "superstructure_output_fbs", |
| 21 | srcs = [ |
| 22 | "superstructure_output.fbs", |
| 23 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 24 | target_compatible_with = ["@platforms//os:linux"], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 25 | ) |
| 26 | |
James Kuszmaul | 5e6aa25 | 2021-08-28 22:19:29 -0700 | [diff] [blame] | 27 | flatbuffer_ts_library( |
| 28 | name = "superstructure_status_ts_fbs", |
| 29 | srcs = [ |
| 30 | "superstructure_status.fbs", |
| 31 | ], |
James Kuszmaul | 5e6aa25 | 2021-08-28 22:19:29 -0700 | [diff] [blame] | 32 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 33 | deps = [ |
| 34 | "//frc971/control_loops:control_loops_ts_fbs", |
| 35 | "//frc971/control_loops:profiled_subsystem_ts_fbs", |
Maxwell Henderson | 3424299 | 2024-01-07 12:39:11 -0800 | [diff] [blame] | 36 | "//frc971/control_loops/flywheel:flywheel_controller_status_ts_fbs", |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 37 | ], |
James Kuszmaul | 5e6aa25 | 2021-08-28 22:19:29 -0700 | [diff] [blame] | 38 | ) |
| 39 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame^] | 40 | static_flatbuffer( |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 41 | name = "superstructure_status_fbs", |
| 42 | srcs = [ |
| 43 | "superstructure_status.fbs", |
| 44 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 45 | target_compatible_with = ["@platforms//os:linux"], |
Maxwell Henderson | 3424299 | 2024-01-07 12:39:11 -0800 | [diff] [blame] | 46 | deps = [ |
| 47 | "//frc971/control_loops:control_loops_fbs", |
| 48 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 49 | "//frc971/control_loops/flywheel:flywheel_controller_status_fbs", |
| 50 | ], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 51 | ) |
| 52 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame^] | 53 | static_flatbuffer( |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 54 | name = "superstructure_position_fbs", |
| 55 | srcs = [ |
| 56 | "superstructure_position.fbs", |
| 57 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 58 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame^] | 59 | deps = [ |
| 60 | "//frc971/control_loops:control_loops_fbs", |
| 61 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 62 | ], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 63 | ) |
| 64 | |
| 65 | cc_library( |
| 66 | name = "superstructure_lib", |
| 67 | srcs = [ |
| 68 | "superstructure.cc", |
| 69 | ], |
| 70 | hdrs = [ |
| 71 | "superstructure.h", |
| 72 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 73 | target_compatible_with = ["@platforms//os:linux"], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 74 | deps = [ |
| 75 | ":superstructure_goal_fbs", |
| 76 | ":superstructure_output_fbs", |
| 77 | ":superstructure_position_fbs", |
| 78 | ":superstructure_status_fbs", |
milind-u | 0beb7dc | 2021-10-16 19:31:33 -0700 | [diff] [blame] | 79 | "//aos/containers:sized_array", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 80 | "//aos/events:event_loop", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 81 | "//frc971/control_loops:control_loop", |
James Kuszmaul | b1b2d8e | 2020-02-21 21:11:46 -0800 | [diff] [blame] | 82 | "//frc971/control_loops:control_loops_fbs", |
| 83 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 84 | "//frc971/zeroing:absolute_and_absolute_encoder", |
| 85 | "//frc971/zeroing:absolute_encoder", |
| 86 | "//frc971/zeroing:pot_and_absolute_encoder", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 87 | "//y2020:constants", |
Philipp Schrader | 37fdbb6 | 2021-12-18 00:30:37 -0800 | [diff] [blame] | 88 | "//y2020/control_loops/superstructure/hood:hood_encoder_zeroing_estimator", |
Sabina Davis | 0f31d3f | 2020-02-20 20:41:00 -0800 | [diff] [blame] | 89 | "//y2020/control_loops/superstructure/shooter", |
James Kuszmaul | b1b2d8e | 2020-02-21 21:11:46 -0800 | [diff] [blame] | 90 | "//y2020/control_loops/superstructure/turret:aiming", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 91 | ], |
| 92 | ) |
| 93 | |
| 94 | cc_binary( |
| 95 | name = "superstructure", |
| 96 | srcs = [ |
| 97 | "superstructure_main.cc", |
| 98 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 99 | target_compatible_with = ["@platforms//os:linux"], |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 100 | deps = [ |
| 101 | ":superstructure_lib", |
| 102 | "//aos:init", |
| 103 | "//aos/events:shm_event_loop", |
| 104 | ], |
| 105 | ) |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 106 | |
| 107 | cc_test( |
| 108 | name = "superstructure_lib_test", |
| 109 | srcs = [ |
| 110 | "superstructure_lib_test.cc", |
| 111 | ], |
| 112 | data = [ |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 113 | "//y2020:aos_config", |
milind-u | 7baf734 | 2021-08-25 18:31:26 -0700 | [diff] [blame] | 114 | "@superstructure_replay", |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 115 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 116 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 117 | deps = [ |
| 118 | ":superstructure_goal_fbs", |
| 119 | ":superstructure_lib", |
| 120 | ":superstructure_output_fbs", |
| 121 | ":superstructure_position_fbs", |
| 122 | ":superstructure_status_fbs", |
| 123 | "//aos:math", |
milind-u | 7baf734 | 2021-08-25 18:31:26 -0700 | [diff] [blame] | 124 | "//aos/events/logging:log_reader", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 125 | "//aos/events/logging:log_writer", |
milind-u | 7baf734 | 2021-08-25 18:31:26 -0700 | [diff] [blame] | 126 | "//aos/network:team_number", |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 127 | "//aos/testing:googletest", |
| 128 | "//aos/time", |
| 129 | "//frc971/control_loops:capped_test_plant", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 130 | "//frc971/control_loops:control_loop_test", |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 131 | "//frc971/control_loops:position_sensor_sim", |
| 132 | "//frc971/control_loops:team_number_test_environment", |
| 133 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
Maxwell Henderson | 3424299 | 2024-01-07 12:39:11 -0800 | [diff] [blame] | 134 | "//frc971/control_loops/flywheel:flywheel_test_plant", |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 135 | "//y2020/control_loops/superstructure/hood:hood_plants", |
Sabina Davis | 0f2d38c | 2020-02-08 17:01:21 -0800 | [diff] [blame] | 136 | "//y2020/control_loops/superstructure/intake:intake_plants", |
Sabina Davis | 0f31d3f | 2020-02-20 20:41:00 -0800 | [diff] [blame] | 137 | "//y2020/control_loops/superstructure/shooter:shooter_plants", |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 138 | ], |
| 139 | ) |
John Park | 0a245a0 | 2020-02-02 14:10:15 -0800 | [diff] [blame] | 140 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 141 | ts_project( |
James Kuszmaul | 7810140 | 2021-09-11 12:42:21 -0700 | [diff] [blame] | 142 | name = "turret_plotter", |
| 143 | srcs = ["turret_plotter.ts"], |
| 144 | target_compatible_with = ["@platforms//os:linux"], |
| 145 | deps = [ |
James Kuszmaul | da52ce6 | 2021-09-25 21:51:42 -0700 | [diff] [blame] | 146 | "//aos:configuration_ts_fbs", |
James Kuszmaul | 7810140 | 2021-09-11 12:42:21 -0700 | [diff] [blame] | 147 | "//aos/network/www:aos_plotter", |
| 148 | "//aos/network/www:colors", |
James Kuszmaul | da52ce6 | 2021-09-25 21:51:42 -0700 | [diff] [blame] | 149 | "//aos/network/www:plotter", |
James Kuszmaul | 7810140 | 2021-09-11 12:42:21 -0700 | [diff] [blame] | 150 | "//aos/network/www:proxy", |
James Kuszmaul | da52ce6 | 2021-09-25 21:51:42 -0700 | [diff] [blame] | 151 | "//aos/network/www:reflection_ts", |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 152 | "@com_github_google_flatbuffers//reflection:reflection_ts_fbs", |
James Kuszmaul | da52ce6 | 2021-09-25 21:51:42 -0700 | [diff] [blame] | 153 | "@com_github_google_flatbuffers//ts:flatbuffers_ts", |
James Kuszmaul | 7810140 | 2021-09-11 12:42:21 -0700 | [diff] [blame] | 154 | ], |
| 155 | ) |
| 156 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 157 | ts_project( |
Austin Schuh | 7d63eab | 2021-03-06 20:15:02 -0800 | [diff] [blame] | 158 | name = "finisher_plotter", |
| 159 | srcs = ["finisher_plotter.ts"], |
| 160 | target_compatible_with = ["@platforms//os:linux"], |
| 161 | deps = [ |
| 162 | "//aos/network/www:aos_plotter", |
Ravago Jones | 819ba1f | 2021-03-10 10:48:10 -0800 | [diff] [blame] | 163 | "//aos/network/www:colors", |
Austin Schuh | 7d63eab | 2021-03-06 20:15:02 -0800 | [diff] [blame] | 164 | "//aos/network/www:proxy", |
| 165 | ], |
| 166 | ) |
| 167 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 168 | ts_project( |
Austin Schuh | 7d63eab | 2021-03-06 20:15:02 -0800 | [diff] [blame] | 169 | name = "accelerator_plotter", |
| 170 | srcs = ["accelerator_plotter.ts"], |
| 171 | target_compatible_with = ["@platforms//os:linux"], |
| 172 | deps = [ |
| 173 | "//aos/network/www:aos_plotter", |
Ravago Jones | 819ba1f | 2021-03-10 10:48:10 -0800 | [diff] [blame] | 174 | "//aos/network/www:colors", |
Austin Schuh | 7d63eab | 2021-03-06 20:15:02 -0800 | [diff] [blame] | 175 | "//aos/network/www:proxy", |
| 176 | ], |
| 177 | ) |
Austin Schuh | 2efe168 | 2021-03-06 22:47:15 -0800 | [diff] [blame] | 178 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 179 | ts_project( |
Austin Schuh | 2efe168 | 2021-03-06 22:47:15 -0800 | [diff] [blame] | 180 | name = "hood_plotter", |
| 181 | srcs = ["hood_plotter.ts"], |
| 182 | target_compatible_with = ["@platforms//os:linux"], |
| 183 | deps = [ |
| 184 | "//aos/network/www:aos_plotter", |
Ravago Jones | 819ba1f | 2021-03-10 10:48:10 -0800 | [diff] [blame] | 185 | "//aos/network/www:colors", |
Austin Schuh | 2efe168 | 2021-03-06 22:47:15 -0800 | [diff] [blame] | 186 | "//aos/network/www:proxy", |
| 187 | ], |
| 188 | ) |
Austin Schuh | f213a07 | 2021-10-17 23:42:50 -0700 | [diff] [blame] | 189 | |
| 190 | cc_binary( |
| 191 | name = "superstructure_replay", |
| 192 | srcs = ["superstructure_replay.cc"], |
| 193 | deps = [ |
| 194 | ":superstructure_lib", |
| 195 | "//aos:configuration", |
| 196 | "//aos:init", |
| 197 | "//aos/events:simulated_event_loop", |
| 198 | "//aos/events/logging:log_reader", |
| 199 | "//aos/network:team_number", |
| 200 | ], |
| 201 | ) |