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