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