blob: 5a00bfec0216fecd5d3994742e33ad0b5732f2c5 [file] [log] [blame]
James Kuszmaul97f750d2019-01-20 20:08:03 -08001package(default_visibility = ["//visibility:public"])
Diana Vandenberg69899ed2017-01-28 16:57:54 -08002
James Kuszmaul97f750d2019-01-20 20:08:03 -08003load("//aos/build:queues.bzl", "queue_library")
Diana Vandenberg69899ed2017-01-28 16:57:54 -08004
5queue_library(
James Kuszmaul97f750d2019-01-20 20:08:03 -08006 name = "superstructure_queue",
7 srcs = [
8 "superstructure.q",
9 ],
10 deps = [
11 "//aos/controls:control_loop_queues",
12 "//frc971/control_loops:profiled_subsystem_queue",
13 "//frc971/control_loops:queues",
14 ],
Diana Vandenberg69899ed2017-01-28 16:57:54 -080015)
Austin Schuh87c10632017-02-05 19:02:17 -080016
17cc_library(
James Kuszmaul97f750d2019-01-20 20:08:03 -080018 name = "superstructure_lib",
19 srcs = [
20 "superstructure.cc",
21 ],
22 hdrs = [
23 "superstructure.h",
24 ],
25 deps = [
26 ":superstructure_queue",
27 ":vision_distance_average",
28 "//aos/controls:control_loop",
Austin Schuhb6c5c852019-05-19 20:13:31 -070029 "//aos/events:event-loop",
James Kuszmaul97f750d2019-01-20 20:08:03 -080030 "//y2017:constants",
31 "//y2017/control_loops/superstructure/column",
32 "//y2017/control_loops/superstructure/hood",
33 "//y2017/control_loops/superstructure/intake",
34 "//y2017/control_loops/superstructure/shooter",
35 ],
Austin Schuh87c10632017-02-05 19:02:17 -080036)
Adam Snaidercfe13062017-02-05 18:23:09 -080037
38cc_test(
James Kuszmaul97f750d2019-01-20 20:08:03 -080039 name = "superstructure_lib_test",
40 srcs = [
41 "superstructure_lib_test.cc",
42 ],
43 deps = [
44 ":superstructure_lib",
45 ":superstructure_queue",
46 "//aos:math",
47 "//aos:queues",
48 "//aos/controls:control_loop_test",
49 "//aos/testing:googletest",
50 "//aos/time",
51 "//frc971/control_loops:position_sensor_sim",
52 "//frc971/control_loops:team_number_test_environment",
53 "//y2017/control_loops/superstructure/column:column_plants",
54 "//y2017/control_loops/superstructure/hood:hood_plants",
55 "//y2017/control_loops/superstructure/intake:intake_plants",
56 "//y2017/control_loops/superstructure/shooter:shooter_plants",
57 ],
Adam Snaidercfe13062017-02-05 18:23:09 -080058)
Austin Schuh7b9a3ba2017-02-19 23:11:45 -080059
60cc_binary(
James Kuszmaul97f750d2019-01-20 20:08:03 -080061 name = "superstructure",
62 srcs = [
63 "superstructure_main.cc",
64 ],
65 deps = [
66 ":superstructure_lib",
67 ":superstructure_queue",
68 "//aos:init",
Austin Schuh55a13dc2019-01-27 22:39:03 -080069 "//aos/events:shm-event-loop",
James Kuszmaul97f750d2019-01-20 20:08:03 -080070 ],
Austin Schuh7b9a3ba2017-02-19 23:11:45 -080071)
Parker Schuhfea48582017-03-11 20:15:32 -080072
73cc_library(
James Kuszmaul97f750d2019-01-20 20:08:03 -080074 name = "vision_time_adjuster",
75 srcs = [
76 "vision_time_adjuster.cc",
77 ],
78 hdrs = [
79 "vision_time_adjuster.h",
80 ],
81 deps = [
82 ":superstructure_queue",
83 "//aos/containers:ring_buffer",
84 "//frc971/control_loops/drivetrain:drivetrain_queue",
85 "//y2017/control_loops/drivetrain:polydrivetrain_plants",
86 "//y2017/vision:vision_queue",
87 ],
Parker Schuhfea48582017-03-11 20:15:32 -080088)
89
90cc_test(
James Kuszmaul97f750d2019-01-20 20:08:03 -080091 name = "vision_time_adjuster_test",
92 srcs = [
93 "vision_time_adjuster_test.cc",
94 ],
95 deps = [
96 ":vision_time_adjuster",
Austin Schuhb6c5c852019-05-19 20:13:31 -070097 "//aos/events:simulated_event_loop",
James Kuszmaul97f750d2019-01-20 20:08:03 -080098 "//aos/testing:googletest",
Austin Schuhb6c5c852019-05-19 20:13:31 -070099 "//aos/testing:test_logging",
James Kuszmaul97f750d2019-01-20 20:08:03 -0800100 "//aos/time",
101 ],
Parker Schuhfea48582017-03-11 20:15:32 -0800102)
Parker Schuh208a58d2017-04-12 20:51:38 -0700103
104cc_library(
James Kuszmaul97f750d2019-01-20 20:08:03 -0800105 name = "vision_distance_average",
106 hdrs = [
107 "vision_distance_average.h",
108 ],
109 deps = [
110 "//aos/containers:ring_buffer",
111 "//aos/time",
112 "//y2017/vision:vision_queue",
113 ],
Parker Schuh208a58d2017-04-12 20:51:38 -0700114)
115
116cc_test(
James Kuszmaul97f750d2019-01-20 20:08:03 -0800117 name = "vision_distance_average_test",
118 srcs = [
119 "vision_distance_average_test.cc",
120 ],
121 deps = [
122 ":vision_distance_average",
123 "//aos/testing:googletest",
124 "//aos/time",
125 ],
Parker Schuh208a58d2017-04-12 20:51:38 -0700126)