blob: b9628f6cb8fe6559b3a78a78662d9e9279db04ee [file] [log] [blame]
Comran Morshed25f81a02016-01-23 13:40:10 +00001package(default_visibility = ['//visibility:public'])
2
3load('/aos/build/queues', 'queue_library')
4
5queue_library(
6 name = 'superstructure_queue',
7 srcs = [
8 'superstructure.q',
9 ],
10 deps = [
11 '//aos/common/controls:control_loop_queues',
12 '//frc971/control_loops:queues',
13 ],
14)
15
Comran Morshed2ae094e2016-01-23 20:43:20 +000016genrule(
17 name = 'genrule_intake',
18 visibility = ['//visibility:private'],
19 cmd = '$(location //y2016/control_loops/python:intake) $(OUTS)',
20 tools = [
21 '//y2016/control_loops/python:intake',
22 ],
23 outs = [
24 'intake_plant.h',
25 'intake_plant.cc',
26 'integral_intake_plant.h',
27 'integral_intake_plant.cc',
28 ],
29)
30
31genrule(
Austin Schuh2fc10fa2016-02-08 00:44:34 -080032 name = 'genrule_arm',
Comran Morshed2ae094e2016-01-23 20:43:20 +000033 visibility = ['//visibility:private'],
Austin Schuh2fc10fa2016-02-08 00:44:34 -080034 cmd = '$(location //y2016/control_loops/python:arm) $(OUTS)',
Comran Morshed2ae094e2016-01-23 20:43:20 +000035 tools = [
Austin Schuh2fc10fa2016-02-08 00:44:34 -080036 '//y2016/control_loops/python:arm',
Comran Morshed2ae094e2016-01-23 20:43:20 +000037 ],
38 outs = [
Austin Schuh2fc10fa2016-02-08 00:44:34 -080039 'arm_plant.h',
40 'arm_plant.cc',
41 'integral_arm_plant.h',
42 'integral_arm_plant.cc',
Comran Morshed2ae094e2016-01-23 20:43:20 +000043 ],
44)
45
46cc_library(
47 name = 'superstructure_plants',
48 srcs = [
49 'intake_plant.cc',
Austin Schuh2fc10fa2016-02-08 00:44:34 -080050 'arm_plant.cc',
Comran Morshed2ae094e2016-01-23 20:43:20 +000051 'integral_intake_plant.cc',
Austin Schuh2fc10fa2016-02-08 00:44:34 -080052 'integral_arm_plant.cc',
Comran Morshed2ae094e2016-01-23 20:43:20 +000053 ],
54 hdrs = [
55 'intake_plant.h',
Austin Schuh2fc10fa2016-02-08 00:44:34 -080056 'arm_plant.h',
Comran Morshed2ae094e2016-01-23 20:43:20 +000057 'integral_intake_plant.h',
Austin Schuh2fc10fa2016-02-08 00:44:34 -080058 'integral_arm_plant.h',
Comran Morshed2ae094e2016-01-23 20:43:20 +000059 ],
60 deps = [
61 '//frc971/control_loops:state_feedback_loop',
62 ],
63)
64
Comran Morshed25f81a02016-01-23 13:40:10 +000065cc_library(
66 name = 'superstructure_lib',
67 srcs = [
68 'superstructure.cc',
69 ],
70 hdrs = [
71 'superstructure.h',
72 ],
73 deps = [
74 ':superstructure_queue',
Austin Schuh2fc10fa2016-02-08 00:44:34 -080075 ':superstructure_plants',
Comran Morshed25f81a02016-01-23 13:40:10 +000076 '//aos/common/controls:control_loop',
Austin Schuh2fc10fa2016-02-08 00:44:34 -080077 '//aos/common/util:trapezoid_profile',
Comran Morshed25f81a02016-01-23 13:40:10 +000078 '//frc971/control_loops:state_feedback_loop',
Austin Schuh2fc10fa2016-02-08 00:44:34 -080079 '//frc971/zeroing',
80 '//y2016:constants',
Comran Morshed25f81a02016-01-23 13:40:10 +000081 ],
82)
83
84cc_test(
85 name = 'superstructure_lib_test',
86 srcs = [
87 'superstructure_lib_test.cc',
88 ],
89 deps = [
90 ':superstructure_queue',
91 ':superstructure_lib',
92 '//aos/testing:googletest',
93 '//aos/common:queues',
94 '//aos/common/controls:control_loop_test',
Austin Schuh2fc10fa2016-02-08 00:44:34 -080095 '//aos/common:math',
96 '//aos/common:time',
97 '//frc971/control_loops:position_sensor_sim',
98 '//frc971/control_loops:team_number_test_environment',
Comran Morshed25f81a02016-01-23 13:40:10 +000099 ],
100)
101
102cc_binary(
103 name = 'superstructure',
104 srcs = [
105 'superstructure_main.cc',
106 ],
107 deps = [
108 '//aos/linux_code:init',
109 ':superstructure_lib',
110 ':superstructure_queue',
111 ],
112)