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