blob: 5dabd1b1d522778a4a88282c16d3f428023becf3 [file] [log] [blame]
Sabina Davis8d20ca82018-02-19 13:17:45 -08001package(default_visibility = ["//visibility:public"])
Neil Balchd5206fe2018-01-24 20:25:12 -08002
Sabina Davis8d20ca82018-02-19 13:17:45 -08003load("//aos/build:queues.bzl", "queue_library")
Neil Balchd5206fe2018-01-24 20:25:12 -08004
5queue_library(
Sabina Davis8d20ca82018-02-19 13:17:45 -08006 name = "superstructure_queue",
7 srcs = [
8 "superstructure.q",
9 ],
10 deps = [
John Park33858a32018-09-28 23:05:48 -070011 "//aos/controls:control_loop_queues",
Sabina Davis8d20ca82018-02-19 13:17:45 -080012 "//frc971/control_loops:queues",
13 ],
Neil Balchd5206fe2018-01-24 20:25:12 -080014)
15
Sabina Davis8d20ca82018-02-19 13:17:45 -080016cc_library(
17 name = "superstructure_lib",
18 srcs = [
19 "superstructure.cc",
20 ],
21 hdrs = [
22 "superstructure.h",
23 ],
24 deps = [
25 ":superstructure_queue",
John Park33858a32018-09-28 23:05:48 -070026 "//aos/controls:control_loop",
Austin Schuh01a9f2a2019-05-27 13:36:30 -070027 "//aos/events:event-loop",
Sabina Davis8d20ca82018-02-19 13:17:45 -080028 "//frc971/control_loops:queues",
Austin Schuh8d5fff42018-05-30 20:44:12 -070029 "//frc971/control_loops/drivetrain:drivetrain_queue",
Sabina Davis8d20ca82018-02-19 13:17:45 -080030 "//y2018:constants",
Austin Schuh8d5fff42018-05-30 20:44:12 -070031 "//y2018:status_light",
Austin Schuhcb091712018-02-21 20:01:55 -080032 "//y2018/control_loops/superstructure/arm",
Sabina Davis8d20ca82018-02-19 13:17:45 -080033 "//y2018/control_loops/superstructure/intake",
Austin Schuh8d5fff42018-05-30 20:44:12 -070034 "//y2018/vision:vision_queue",
Sabina Davis8d20ca82018-02-19 13:17:45 -080035 ],
36)
37
38cc_test(
39 name = "superstructure_lib_test",
Austin Schuhe40ea512019-02-09 21:54:25 -080040 timeout = "long",
Sabina Davis8d20ca82018-02-19 13:17:45 -080041 srcs = [
42 "superstructure_lib_test.cc",
43 ],
Austin Schuh9fe68f72019-08-10 19:32:03 -070044 shard_count = 5,
Sabina Davis8d20ca82018-02-19 13:17:45 -080045 deps = [
46 ":superstructure_lib",
47 ":superstructure_queue",
John Park33858a32018-09-28 23:05:48 -070048 "//aos:math",
49 "//aos:queues",
John Park33858a32018-09-28 23:05:48 -070050 "//aos/controls:control_loop_test",
Sabina Davis8d20ca82018-02-19 13:17:45 -080051 "//aos/testing:googletest",
Austin Schuhe40ea512019-02-09 21:54:25 -080052 "//aos/time",
Sabina Davis8d20ca82018-02-19 13:17:45 -080053 "//frc971/control_loops:position_sensor_sim",
54 "//frc971/control_loops:team_number_test_environment",
55 "//y2018/control_loops/superstructure/intake:intake_plants",
56 ],
57)
58
59cc_binary(
60 name = "superstructure",
61 srcs = [
62 "superstructure_main.cc",
63 ],
64 deps = [
65 ":superstructure_lib",
66 ":superstructure_queue",
John Park398c74a2018-10-20 21:17:39 -070067 "//aos:init",
Sabina Davis8d20ca82018-02-19 13:17:45 -080068 ],
69)
Neil Balch6040a352018-03-04 16:02:56 -080070
71cc_library(
72 name = "debouncer",
Neil Balch6040a352018-03-04 16:02:56 -080073 srcs = [
74 "debouncer.cc",
75 ],
Austin Schuhe40ea512019-02-09 21:54:25 -080076 hdrs = [
77 "debouncer.h",
78 ],
Neil Balch6040a352018-03-04 16:02:56 -080079)
80
81cc_test(
82 name = "debouncer_test",
83 srcs = [
84 "debouncer_test.cc",
85 ],
86 deps = [
87 ":debouncer",
88 "//aos/testing:googletest",
89 ],
90)