Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 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") |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 4 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 5 | flatbuffer_cc_library( |
| 6 | name = "superstructure_goal_fbs", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 7 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 8 | "superstructure_goal.fbs", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 9 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 10 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 11 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 12 | ) |
| 13 | |
| 14 | flatbuffer_cc_library( |
| 15 | name = "superstructure_position_fbs", |
| 16 | srcs = [ |
| 17 | "superstructure_position.fbs", |
| 18 | ], |
| 19 | gen_reflections = 1, |
| 20 | includes = [ |
| 21 | "//frc971/control_loops:control_loops_fbs_includes", |
| 22 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 23 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 24 | ) |
| 25 | |
| 26 | flatbuffer_cc_library( |
| 27 | name = "superstructure_output_fbs", |
| 28 | srcs = [ |
| 29 | "superstructure_output.fbs", |
| 30 | ], |
| 31 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 32 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 33 | ) |
| 34 | |
| 35 | flatbuffer_cc_library( |
| 36 | name = "superstructure_status_fbs", |
| 37 | srcs = [ |
| 38 | "superstructure_status.fbs", |
| 39 | ], |
| 40 | gen_reflections = 1, |
| 41 | includes = [ |
| 42 | "//frc971/control_loops:control_loops_fbs_includes", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 43 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 44 | target_compatible_with = ["@platforms//os:linux"], |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 45 | ) |
| 46 | |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 47 | genrule( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 48 | name = "genrule_intake", |
| 49 | outs = [ |
| 50 | "intake_plant.h", |
| 51 | "intake_plant.cc", |
| 52 | "integral_intake_plant.h", |
| 53 | "integral_intake_plant.cc", |
| 54 | ], |
| 55 | cmd = "$(location //y2016/control_loops/python:intake) $(OUTS)", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 56 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 57 | tools = [ |
| 58 | "//y2016/control_loops/python:intake", |
| 59 | ], |
| 60 | visibility = ["//visibility:private"], |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 61 | ) |
| 62 | |
| 63 | genrule( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 64 | name = "genrule_arm", |
| 65 | outs = [ |
| 66 | "arm_plant.h", |
| 67 | "arm_plant.cc", |
| 68 | "integral_arm_plant.h", |
| 69 | "integral_arm_plant.cc", |
| 70 | ], |
| 71 | cmd = "$(location //y2016/control_loops/python:arm) $(OUTS)", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 72 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 73 | tools = [ |
| 74 | "//y2016/control_loops/python:arm", |
| 75 | ], |
| 76 | visibility = ["//visibility:private"], |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 77 | ) |
| 78 | |
| 79 | cc_library( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 80 | name = "superstructure_plants", |
| 81 | srcs = [ |
| 82 | "arm_plant.cc", |
| 83 | "intake_plant.cc", |
| 84 | "integral_arm_plant.cc", |
| 85 | "integral_intake_plant.cc", |
| 86 | ], |
| 87 | hdrs = [ |
| 88 | "arm_plant.h", |
| 89 | "intake_plant.h", |
| 90 | "integral_arm_plant.h", |
| 91 | "integral_intake_plant.h", |
| 92 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 93 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 94 | deps = [ |
| 95 | "//frc971/control_loops:state_feedback_loop", |
| 96 | ], |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 97 | ) |
| 98 | |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 99 | cc_library( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 100 | name = "superstructure_lib", |
| 101 | srcs = [ |
| 102 | "superstructure.cc", |
| 103 | "superstructure_controls.cc", |
| 104 | ], |
| 105 | hdrs = [ |
| 106 | "superstructure.h", |
| 107 | "superstructure_controls.h", |
| 108 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 109 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 110 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 111 | ":superstructure_goal_fbs", |
| 112 | ":superstructure_output_fbs", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 113 | ":superstructure_plants", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 114 | ":superstructure_position_fbs", |
| 115 | ":superstructure_status_fbs", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 116 | "//aos:math", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 117 | "//aos/util:trapezoid_profile", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame^] | 118 | "//frc971/control_loops:control_loop", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 119 | "//frc971/control_loops:profiled_subsystem", |
| 120 | "//frc971/control_loops:simple_capped_state_feedback_loop", |
| 121 | "//frc971/control_loops:state_feedback_loop", |
| 122 | "//frc971/zeroing", |
| 123 | "//y2016:constants", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 124 | "//y2016/queues:ball_detector_fbs", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 125 | ], |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 126 | ) |
| 127 | |
| 128 | cc_test( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 129 | name = "superstructure_lib_test", |
| 130 | srcs = [ |
| 131 | "superstructure_lib_test.cc", |
| 132 | ], |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 133 | data = ["//y2016:config"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 134 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 135 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 136 | ":superstructure_goal_fbs", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 137 | ":superstructure_lib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 138 | ":superstructure_output_fbs", |
| 139 | ":superstructure_position_fbs", |
| 140 | ":superstructure_status_fbs", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 141 | "//aos:math", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 142 | "//aos/testing:googletest", |
| 143 | "//aos/time", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame^] | 144 | "//frc971/control_loops:control_loop_test", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 145 | "//frc971/control_loops:position_sensor_sim", |
| 146 | "//frc971/control_loops:team_number_test_environment", |
| 147 | ], |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 148 | ) |
| 149 | |
| 150 | cc_binary( |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 151 | name = "superstructure", |
| 152 | srcs = [ |
| 153 | "superstructure_main.cc", |
| 154 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 155 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 156 | deps = [ |
| 157 | ":superstructure_lib", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 158 | "//aos:init", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 159 | "//aos/events:shm_event_loop", |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 160 | ], |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 161 | ) |