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