blob: aaab30ba6aeb47fb13fe227e3682c301b318cd05 [file] [log] [blame]
Austin Schuh4f857292018-02-15 23:42:04 -08001load('//aos/downloader:downloader.bzl', 'aos_downloader')
Comran Morshed9a9948c2016-01-16 15:58:04 +00002
3cc_library(
4 name = 'constants',
5 visibility = ['//visibility:public'],
6 srcs = [
7 'constants.cc',
8 ],
9 hdrs = [
10 'constants.h',
11 ],
12 deps = [
13 '//aos/common/logging',
Sabina Davis2ed5ea22017-09-26 22:27:42 -070014 '//aos:once',
Comran Morshed9a9948c2016-01-16 15:58:04 +000015 '//aos/common/network:team_number',
16 '//aos/common:mutex',
17 '//frc971/control_loops:state_feedback_loop',
Comran Morshed9a9948c2016-01-16 15:58:04 +000018 '//frc971:shifter_hall_effect',
Austin Schuh2fc10fa2016-02-08 00:44:34 -080019 '//frc971:constants',
Comran Morshed6c6a0a92016-01-17 12:45:16 +000020 '//y2016/control_loops/drivetrain:polydrivetrain_plants',
Comran Morshed9a9948c2016-01-16 15:58:04 +000021 ],
22)
23
24cc_binary(
25 name = 'joystick_reader',
26 srcs = [
27 'joystick_reader.cc',
28 ],
29 deps = [
30 ':constants',
Austin Schuh45d07f62016-03-13 15:33:31 -070031 '//aos/common/actions:action_lib',
32 '//aos/common/logging',
33 '//aos/common/util:log_interval',
34 '//aos/common:time',
Comran Morshed9a9948c2016-01-16 15:58:04 +000035 '//aos/input:joystick_input',
36 '//aos/linux_code:init',
Austin Schuh45d07f62016-03-13 15:33:31 -070037 '//frc971/autonomous:auto_queue',
Comran Morshed9a9948c2016-01-16 15:58:04 +000038 '//frc971/control_loops/drivetrain:drivetrain_queue',
39 '//frc971/queues:gyro',
Comran Morshede68e3732016-03-12 14:12:11 +000040 '//y2016/actors:autonomous_action_lib',
Diana Vandenberg9cc9ab62016-04-20 21:27:47 -070041 '//y2016/actors:superstructure_action_lib',
Austin Schuh18799112016-03-16 22:09:54 -070042 '//y2016/actors:vision_align_action_lib',
Comran Morshed200dd4b2016-02-16 17:54:58 +000043 '//y2016/control_loops/shooter:shooter_queue',
Austin Schuh45d07f62016-03-13 15:33:31 -070044 '//y2016/control_loops/superstructure:superstructure_lib',
Comran Morshed200dd4b2016-02-16 17:54:58 +000045 '//y2016/control_loops/superstructure:superstructure_queue',
Comran Morshedaa0573c2016-03-05 19:05:54 +000046 '//y2016/queues:ball_detector',
Comran Morshed9a9948c2016-01-16 15:58:04 +000047 ],
48)
49
50aos_downloader(
51 name = 'download',
52 start_srcs = [
Comran Morshed9a9948c2016-01-16 15:58:04 +000053 ':joystick_reader',
Brian Silverman06016bc2017-02-11 16:34:34 -080054 ':wpilib_interface',
Comran Morshed9a9948c2016-01-16 15:58:04 +000055 '//aos:prime_start_binaries',
Comran Morshed6c6a0a92016-01-17 12:45:16 +000056 '//y2016/control_loops/drivetrain:drivetrain',
Austin Schuh9f77fd22016-02-21 02:53:58 -080057 '//y2016/control_loops/superstructure:superstructure',
58 '//y2016/control_loops/shooter:shooter',
Comran Morsheddaf69232016-04-20 22:25:37 -070059 '//y2016/dashboard:dashboard',
Comran Morshede68e3732016-03-12 14:12:11 +000060 '//y2016/actors:autonomous_action',
Diana Vandenberg9cc9ab62016-04-20 21:27:47 -070061 '//y2016/actors:superstructure_action',
Austin Schuh18799112016-03-16 22:09:54 -070062 '//y2016/actors:vision_align_action',
Austin Schuh18799112016-03-16 22:09:54 -070063 '//y2016/vision:target_receiver',
Comran Morshed9a9948c2016-01-16 15:58:04 +000064 ],
65 srcs = [
66 '//aos:prime_binaries',
67 ],
Comran Morshed38967332016-04-23 19:26:48 -070068 dirs = [
69 '//y2016/dashboard:www_files',
70 ],
Austin Schuh9d92e6b2017-10-17 01:19:38 -070071 restricted_to = ['//tools:roborio'],
Comran Morshed9a9948c2016-01-16 15:58:04 +000072)
Austin Schuhc80dd152016-02-29 01:47:44 -080073
74aos_downloader(
75 name = 'download_stripped',
76 start_srcs = [
77 ':joystick_reader.stripped',
Brian Silverman06016bc2017-02-11 16:34:34 -080078 ':wpilib_interface.stripped',
Austin Schuhc80dd152016-02-29 01:47:44 -080079 '//aos:prime_start_binaries_stripped',
80 '//y2016/control_loops/drivetrain:drivetrain.stripped',
81 '//y2016/control_loops/superstructure:superstructure.stripped',
82 '//y2016/control_loops/shooter:shooter.stripped',
Comran Morsheddaf69232016-04-20 22:25:37 -070083 '//y2016/dashboard:dashboard.stripped',
Comran Morshede68e3732016-03-12 14:12:11 +000084 '//y2016/actors:autonomous_action.stripped',
Diana Vandenberg9cc9ab62016-04-20 21:27:47 -070085 '//y2016/actors:superstructure_action.stripped',
Austin Schuh18799112016-03-16 22:09:54 -070086 '//y2016/actors:vision_align_action.stripped',
Austin Schuh18799112016-03-16 22:09:54 -070087 '//y2016/vision:target_receiver.stripped',
Austin Schuhc80dd152016-02-29 01:47:44 -080088 ],
89 srcs = [
90 '//aos:prime_binaries_stripped',
91 ],
Comran Morshed38967332016-04-23 19:26:48 -070092 dirs = [
93 '//y2016/dashboard:www_files',
94 ],
Austin Schuh9d92e6b2017-10-17 01:19:38 -070095 restricted_to = ['//tools:roborio'],
Austin Schuhc80dd152016-02-29 01:47:44 -080096)
Brian Silverman06016bc2017-02-11 16:34:34 -080097
98cc_binary(
99 name = 'wpilib_interface',
100 srcs = [
101 'wpilib_interface.cc',
102 ],
103 deps = [
104 ':constants',
105 '//aos/common:stl_mutex',
106 '//aos/common/logging',
107 '//aos/common:math',
108 '//aos/common/controls:control_loop',
109 '//aos/common/util:log_interval',
110 '//aos/common:time',
111 '//aos/common/logging:queue_logging',
112 '//aos/common/messages:robot_state',
113 '//aos/common/util:phased_loop',
114 '//aos/common/util:wrapping_counter',
115 '//aos/linux_code:init',
116 '//third_party:wpilib',
Philipp Schrader4bd29b12017-02-22 04:42:27 +0000117 '//frc971/autonomous:auto_queue',
Brian Silverman06016bc2017-02-11 16:34:34 -0800118 '//frc971/control_loops/drivetrain:drivetrain_queue',
119 '//frc971/control_loops:queues',
120 '//frc971/wpilib:joystick_sender',
121 '//frc971/wpilib:loop_output_handler',
122 '//frc971/wpilib:buffered_pcm',
123 '//frc971/wpilib:gyro_sender',
124 '//frc971/wpilib:dma_edge_counting',
125 '//frc971/wpilib:interrupt_edge_counting',
126 '//frc971/wpilib:wpilib_robot_base',
127 '//frc971/wpilib:encoder_and_potentiometer',
128 '//frc971/wpilib:logging_queue',
129 '//frc971/wpilib:wpilib_interface',
130 '//frc971/wpilib:pdp_fetcher',
131 '//frc971/wpilib:ADIS16448',
132 '//frc971/wpilib:dma',
133 '//y2016/control_loops/drivetrain:polydrivetrain_plants',
134 '//y2016/control_loops/shooter:shooter_queue',
135 '//y2016/control_loops/superstructure:superstructure_queue',
136 '//y2016/queues:ball_detector',
Brian Silverman06016bc2017-02-11 16:34:34 -0800137 ],
Austin Schuh9d92e6b2017-10-17 01:19:38 -0700138 restricted_to = ['//tools:roborio'],
Brian Silverman06016bc2017-02-11 16:34:34 -0800139)