Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
Neil Balch | d5206fe | 2018-01-24 20:25:12 -0800 | [diff] [blame] | 2 | |
Philipp Schrader | cc016b3 | 2021-12-30 08:59:58 -0800 | [diff] [blame] | 3 | package(default_visibility = ["//visibility:public"]) |
| 4 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 5 | flatbuffer_cc_library( |
| 6 | name = "superstructure_goal_fbs", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 7 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 8 | "superstructure_goal.fbs", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -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", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 13 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 14 | target_compatible_with = ["@platforms//os:linux"], |
Neil Balch | d5206fe | 2018-01-24 20:25:12 -0800 | [diff] [blame] | 15 | ) |
| 16 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 17 | flatbuffer_cc_library( |
| 18 | name = "superstructure_position_fbs", |
| 19 | srcs = [ |
| 20 | "superstructure_position.fbs", |
| 21 | ], |
| 22 | gen_reflections = 1, |
| 23 | includes = [ |
| 24 | "//frc971/control_loops:control_loops_fbs_includes", |
| 25 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 26 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 27 | ) |
| 28 | |
| 29 | flatbuffer_cc_library( |
| 30 | name = "superstructure_status_fbs", |
| 31 | srcs = [ |
| 32 | "superstructure_status.fbs", |
| 33 | ], |
| 34 | gen_reflections = 1, |
| 35 | includes = [ |
| 36 | "//frc971/control_loops:control_loops_fbs_includes", |
| 37 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 38 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 39 | ) |
| 40 | |
| 41 | flatbuffer_cc_library( |
| 42 | name = "superstructure_output_fbs", |
| 43 | srcs = [ |
| 44 | "superstructure_output.fbs", |
| 45 | ], |
| 46 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 47 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 48 | ) |
| 49 | |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 50 | cc_library( |
| 51 | name = "superstructure_lib", |
| 52 | srcs = [ |
| 53 | "superstructure.cc", |
| 54 | ], |
| 55 | hdrs = [ |
| 56 | "superstructure.h", |
| 57 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 58 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 59 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 60 | ":superstructure_goal_fbs", |
| 61 | ":superstructure_output_fbs", |
| 62 | ":superstructure_position_fbs", |
| 63 | ":superstructure_status_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 64 | "//aos/events:event_loop", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 65 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 66 | "//frc971/control_loops:control_loops_fbs", |
| 67 | "//frc971/control_loops/drivetrain:drivetrain_output_fbs", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 68 | "//y2018:constants", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 69 | "//y2018:status_light_fbs", |
Austin Schuh | cb09171 | 2018-02-21 20:01:55 -0800 | [diff] [blame] | 70 | "//y2018/control_loops/superstructure/arm", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 71 | "//y2018/control_loops/superstructure/intake", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 72 | "//y2018/vision:vision_fbs", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 73 | ], |
| 74 | ) |
| 75 | |
| 76 | cc_test( |
| 77 | name = "superstructure_lib_test", |
Austin Schuh | e40ea51 | 2019-02-09 21:54:25 -0800 | [diff] [blame] | 78 | timeout = "long", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 79 | srcs = [ |
| 80 | "superstructure_lib_test.cc", |
| 81 | ], |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 82 | data = ["//y2018:aos_config"], |
Austin Schuh | 9fe68f7 | 2019-08-10 19:32:03 -0700 | [diff] [blame] | 83 | shard_count = 5, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 84 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 85 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 86 | ":superstructure_goal_fbs", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 87 | ":superstructure_lib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 88 | ":superstructure_output_fbs", |
| 89 | ":superstructure_position_fbs", |
| 90 | ":superstructure_status_fbs", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 91 | "//aos:math", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 92 | "//aos/testing:googletest", |
Austin Schuh | e40ea51 | 2019-02-09 21:54:25 -0800 | [diff] [blame] | 93 | "//aos/time", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 94 | "//frc971/control_loops:control_loop_test", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 95 | "//frc971/control_loops:position_sensor_sim", |
| 96 | "//frc971/control_loops:team_number_test_environment", |
Maxwell Henderson | 8f0e07f | 2023-02-08 21:10:58 -0800 | [diff] [blame^] | 97 | "//y2018/control_loops/superstructure/arm:arm_constants", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 98 | "//y2018/control_loops/superstructure/intake:intake_plants", |
| 99 | ], |
| 100 | ) |
| 101 | |
| 102 | cc_binary( |
| 103 | name = "superstructure", |
| 104 | srcs = [ |
| 105 | "superstructure_main.cc", |
| 106 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 107 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 108 | deps = [ |
| 109 | ":superstructure_lib", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 110 | "//aos:init", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 111 | ], |
| 112 | ) |
Neil Balch | 6040a35 | 2018-03-04 16:02:56 -0800 | [diff] [blame] | 113 | |
| 114 | cc_library( |
| 115 | name = "debouncer", |
Neil Balch | 6040a35 | 2018-03-04 16:02:56 -0800 | [diff] [blame] | 116 | srcs = [ |
| 117 | "debouncer.cc", |
| 118 | ], |
Austin Schuh | e40ea51 | 2019-02-09 21:54:25 -0800 | [diff] [blame] | 119 | hdrs = [ |
| 120 | "debouncer.h", |
| 121 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 122 | target_compatible_with = ["@platforms//os:linux"], |
Neil Balch | 6040a35 | 2018-03-04 16:02:56 -0800 | [diff] [blame] | 123 | ) |
| 124 | |
| 125 | cc_test( |
| 126 | name = "debouncer_test", |
| 127 | srcs = [ |
| 128 | "debouncer_test.cc", |
| 129 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 130 | target_compatible_with = ["@platforms//os:linux"], |
Neil Balch | 6040a35 | 2018-03-04 16:02:56 -0800 | [diff] [blame] | 131 | deps = [ |
| 132 | ":debouncer", |
| 133 | "//aos/testing:googletest", |
| 134 | ], |
| 135 | ) |