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