Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
Neil Balch | d5206fe | 2018-01-24 20:25:12 -0800 | [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") |
Neil Balch | d5206fe | 2018-01-24 20:25:12 -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", |
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", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [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: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 | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 82 | data = ["//y2018: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", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 92 | "//aos/controls:control_loop_test", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 93 | "//aos/testing:googletest", |
Austin Schuh | e40ea51 | 2019-02-09 21:54:25 -0800 | [diff] [blame] | 94 | "//aos/time", |
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", |
| 97 | "//y2018/control_loops/superstructure/intake:intake_plants", |
| 98 | ], |
| 99 | ) |
| 100 | |
| 101 | cc_binary( |
| 102 | name = "superstructure", |
| 103 | srcs = [ |
| 104 | "superstructure_main.cc", |
| 105 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 106 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 107 | deps = [ |
| 108 | ":superstructure_lib", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 109 | "//aos:init", |
Sabina Davis | 8d20ca8 | 2018-02-19 13:17:45 -0800 | [diff] [blame] | 110 | ], |
| 111 | ) |
Neil Balch | 6040a35 | 2018-03-04 16:02:56 -0800 | [diff] [blame] | 112 | |
| 113 | cc_library( |
| 114 | name = "debouncer", |
Neil Balch | 6040a35 | 2018-03-04 16:02:56 -0800 | [diff] [blame] | 115 | srcs = [ |
| 116 | "debouncer.cc", |
| 117 | ], |
Austin Schuh | e40ea51 | 2019-02-09 21:54:25 -0800 | [diff] [blame] | 118 | hdrs = [ |
| 119 | "debouncer.h", |
| 120 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 121 | target_compatible_with = ["@platforms//os:linux"], |
Neil Balch | 6040a35 | 2018-03-04 16:02:56 -0800 | [diff] [blame] | 122 | ) |
| 123 | |
| 124 | cc_test( |
| 125 | name = "debouncer_test", |
| 126 | srcs = [ |
| 127 | "debouncer_test.cc", |
| 128 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame^] | 129 | target_compatible_with = ["@platforms//os:linux"], |
Neil Balch | 6040a35 | 2018-03-04 16:02:56 -0800 | [diff] [blame] | 130 | deps = [ |
| 131 | ":debouncer", |
| 132 | "//aos/testing:googletest", |
| 133 | ], |
| 134 | ) |