Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
| 2 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 3 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 4 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 5 | flatbuffer_cc_library( |
| 6 | name = "superstructure_goal_fbs", |
Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 7 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 8 | "superstructure_goal.fbs", |
Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 9 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 10 | gen_reflections = 1, |
| 11 | includes = [ |
| 12 | "//frc971/control_loops:control_loops_fbs_includes", |
| 13 | "//frc971/control_loops:profiled_subsystem_fbs_includes", |
| 14 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 15 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 16 | ) |
| 17 | |
| 18 | flatbuffer_cc_library( |
| 19 | name = "superstructure_output_fbs", |
| 20 | srcs = [ |
| 21 | "superstructure_output.fbs", |
| 22 | ], |
| 23 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 24 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 25 | ) |
| 26 | |
| 27 | flatbuffer_cc_library( |
| 28 | name = "superstructure_status_fbs", |
| 29 | srcs = [ |
| 30 | "superstructure_status.fbs", |
| 31 | ], |
| 32 | gen_reflections = 1, |
| 33 | includes = [ |
| 34 | "//frc971/control_loops:control_loops_fbs_includes", |
| 35 | "//frc971/control_loops:profiled_subsystem_fbs_includes", |
| 36 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 37 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 38 | ) |
| 39 | |
| 40 | flatbuffer_cc_library( |
| 41 | name = "superstructure_position_fbs", |
| 42 | srcs = [ |
| 43 | "superstructure_position.fbs", |
| 44 | ], |
| 45 | gen_reflections = 1, |
| 46 | includes = [ |
| 47 | "//frc971/control_loops:control_loops_fbs_includes", |
| 48 | "//frc971/control_loops:profiled_subsystem_fbs_includes", |
Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 49 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 50 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 51 | ) |
| 52 | |
| 53 | cc_library( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 54 | name = "superstructure_lib", |
Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 55 | srcs = [ |
| 56 | "superstructure.cc", |
| 57 | ], |
| 58 | hdrs = [ |
| 59 | "superstructure.h", |
| 60 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 61 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 62 | deps = [ |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 63 | ":collision_avoidance", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 64 | ":superstructure_goal_fbs", |
| 65 | ":superstructure_output_fbs", |
| 66 | ":superstructure_position_fbs", |
| 67 | ":superstructure_status_fbs", |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 68 | ":vacuum", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 69 | "//aos/events:event_loop", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame^] | 70 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 71 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 72 | "//y2019:constants", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 73 | "//y2019:status_light_fbs", |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 74 | ], |
| 75 | ) |
| 76 | |
| 77 | cc_test( |
| 78 | name = "superstructure_lib_test", |
| 79 | srcs = [ |
| 80 | "superstructure_lib_test.cc", |
| 81 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 82 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 83 | "//y2019:config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 84 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 85 | target_compatible_with = ["@platforms//os:linux"], |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 86 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 87 | ":superstructure_goal_fbs", |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 88 | ":superstructure_lib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 89 | ":superstructure_output_fbs", |
| 90 | ":superstructure_position_fbs", |
| 91 | ":superstructure_status_fbs", |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 92 | "//aos:math", |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 93 | "//aos/testing:googletest", |
| 94 | "//aos/time", |
| 95 | "//frc971/control_loops:capped_test_plant", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame^] | 96 | "//frc971/control_loops:control_loop_test", |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 97 | "//frc971/control_loops:position_sensor_sim", |
| 98 | "//frc971/control_loops:team_number_test_environment", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 99 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 100 | "//y2019:status_light_fbs", |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 101 | "//y2019/control_loops/superstructure/intake:intake_plants", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 102 | ], |
Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 103 | ) |
| 104 | |
| 105 | cc_binary( |
| 106 | name = "superstructure", |
| 107 | srcs = [ |
| 108 | "superstructure_main.cc", |
| 109 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 110 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | e51334a | 2019-01-20 16:58:16 -0800 | [diff] [blame] | 111 | deps = [ |
| 112 | ":superstructure_lib", |
| 113 | "//aos:init", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 114 | "//aos/events:shm_event_loop", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 115 | ], |
| 116 | ) |
Sabina Davis | 4b63ae5 | 2019-01-27 16:15:25 -0800 | [diff] [blame] | 117 | |
| 118 | cc_library( |
| 119 | name = "collision_avoidance", |
| 120 | srcs = [ |
| 121 | "collision_avoidance.cc", |
| 122 | ], |
| 123 | hdrs = [ |
| 124 | "collision_avoidance.h", |
| 125 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 126 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | 4b63ae5 | 2019-01-27 16:15:25 -0800 | [diff] [blame] | 127 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 128 | ":superstructure_goal_fbs", |
| 129 | ":superstructure_status_fbs", |
Sabina Davis | 4b63ae5 | 2019-01-27 16:15:25 -0800 | [diff] [blame] | 130 | "//frc971:constants", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame^] | 131 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 132 | "//frc971/control_loops:control_loops_fbs", |
| 133 | "//frc971/control_loops:profiled_subsystem_fbs", |
Sabina Davis | 4b63ae5 | 2019-01-27 16:15:25 -0800 | [diff] [blame] | 134 | ], |
| 135 | ) |
| 136 | |
Theo Bafrali | 3274a18 | 2019-02-17 20:01:38 -0800 | [diff] [blame] | 137 | cc_library( |
| 138 | name = "vacuum", |
| 139 | srcs = [ |
| 140 | "vacuum.cc", |
| 141 | ], |
| 142 | hdrs = [ |
| 143 | "vacuum.h", |
| 144 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 145 | target_compatible_with = ["@platforms//os:linux"], |
Theo Bafrali | 3274a18 | 2019-02-17 20:01:38 -0800 | [diff] [blame] | 146 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 147 | ":superstructure_goal_fbs", |
| 148 | ":superstructure_output_fbs", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 149 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 150 | "//frc971/control_loops:control_loops_fbs", |
| 151 | "//frc971/control_loops:profiled_subsystem_fbs", |
Theo Bafrali | 3274a18 | 2019-02-17 20:01:38 -0800 | [diff] [blame] | 152 | ], |
| 153 | ) |
| 154 | |
Sabina Davis | 4b63ae5 | 2019-01-27 16:15:25 -0800 | [diff] [blame] | 155 | cc_test( |
| 156 | name = "collision_avoidance_tests", |
| 157 | srcs = [ |
| 158 | "collision_avoidance_tests.cc", |
| 159 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 160 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | 4b63ae5 | 2019-01-27 16:15:25 -0800 | [diff] [blame] | 161 | deps = [ |
| 162 | ":collision_avoidance", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 163 | ":superstructure_goal_fbs", |
| 164 | ":superstructure_status_fbs", |
Sabina Davis | 4b63ae5 | 2019-01-27 16:15:25 -0800 | [diff] [blame] | 165 | "//aos:math", |
| 166 | "//aos/testing:googletest", |
| 167 | ], |
| 168 | ) |