blob: d2020646aafc242a546acf8ceea85b3cc8a655aa [file] [log] [blame]
Austin Schuh9d92e6b2017-10-17 01:19:38 -07001load('//aos/downloader:downloader.bzl', 'aos_downloader')
Austin Schuh7b9a3ba2017-02-19 23:11:45 -08002
Tyler Chatow6107aba2017-01-22 01:39:40 +00003cc_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',
Tyler Chatow6107aba2017-01-22 01:39:40 +000014 '//aos/common/network:team_number',
15 '//aos/common:mutex',
Sabina Davis2ed5ea22017-09-26 22:27:42 -070016 '//aos:once',
Tyler Chatow6107aba2017-01-22 01:39:40 +000017 '//frc971:constants',
Philipp Schrader9a833362017-04-09 22:56:16 +000018 '//frc971/shooter_interpolation:interpolation',
Ed Jordan8683f432017-02-12 00:13:26 +000019 '//y2017/control_loops/drivetrain:polydrivetrain_plants',
Austin Schuhd5ccb862017-03-11 22:06:36 -080020 '//y2017/control_loops/superstructure/column:column_plants',
Brian Silverman052e69d2017-02-12 16:19:55 -080021 '//y2017/control_loops/superstructure/hood:hood_plants',
Austin Schuhd5ccb862017-03-11 22:06:36 -080022 '//y2017/control_loops/superstructure/intake:intake_plants',
23 '//y2017/control_loops/superstructure/shooter:shooter_plants',
Tyler Chatow6107aba2017-01-22 01:39:40 +000024 ],
25)
Brian Silverman06016bc2017-02-11 16:34:34 -080026
27cc_binary(
Campbell Crowley71b5f132017-02-18 13:16:08 -080028 name = 'joystick_reader',
29 srcs = [
30 'joystick_reader.cc',
31 ],
32 deps = [
33 ':constants',
34 '//aos/common/actions:action_lib',
35 '//aos/common/logging',
36 '//aos/common/util:log_interval',
37 '//aos/common:time',
38 '//aos/input:joystick_input',
Sabina Davis92d2efa2017-11-04 22:35:25 -070039 '//aos/input:drivetrain_input',
Campbell Crowley71b5f132017-02-18 13:16:08 -080040 '//aos/linux_code:init',
41 '//frc971/autonomous:auto_queue',
42 '//frc971/control_loops/drivetrain:drivetrain_queue',
Austin Schuhd5ccb862017-03-11 22:06:36 -080043 '//y2017/actors:autonomous_action_lib',
Campbell Crowley71b5f132017-02-18 13:16:08 -080044 '//y2017/control_loops/superstructure:superstructure_queue',
Sabina Davis82b19182017-11-10 09:30:25 -080045 '//y2017/control_loops/drivetrain:drivetrain_base',
Campbell Crowley71b5f132017-02-18 13:16:08 -080046 ],
47)
48
49cc_binary(
Brian Silverman06016bc2017-02-11 16:34:34 -080050 name = 'wpilib_interface',
51 srcs = [
52 'wpilib_interface.cc',
53 ],
54 deps = [
55 ':constants',
56 '//aos/common:stl_mutex',
57 '//aos/common/logging',
58 '//aos/common:math',
59 '//aos/common/controls:control_loop',
60 '//aos/common/util:log_interval',
61 '//aos/common:time',
62 '//aos/common/logging:queue_logging',
63 '//aos/common/messages:robot_state',
64 '//aos/common/util:phased_loop',
65 '//aos/common/util:wrapping_counter',
66 '//aos/linux_code:init',
67 '//third_party:wpilib',
Philipp Schrader996a2a22017-02-22 05:02:48 +000068 '//frc971/autonomous:auto_queue',
Brian Silverman06016bc2017-02-11 16:34:34 -080069 '//frc971/control_loops/drivetrain:drivetrain_queue',
70 '//frc971/control_loops:queues',
71 '//frc971/wpilib:joystick_sender',
72 '//frc971/wpilib:loop_output_handler',
73 '//frc971/wpilib:buffered_pcm',
Brian Silverman06016bc2017-02-11 16:34:34 -080074 '//frc971/wpilib:dma_edge_counting',
75 '//frc971/wpilib:interrupt_edge_counting',
76 '//frc971/wpilib:wpilib_robot_base',
77 '//frc971/wpilib:encoder_and_potentiometer',
78 '//frc971/wpilib:logging_queue',
79 '//frc971/wpilib:wpilib_interface',
80 '//frc971/wpilib:pdp_fetcher',
81 '//frc971/wpilib:ADIS16448',
82 '//frc971/wpilib:dma',
Brian Silverman06016bc2017-02-11 16:34:34 -080083 '//y2017/control_loops/superstructure:superstructure_queue',
Brian Silverman06016bc2017-02-11 16:34:34 -080084 ],
Austin Schuh9d92e6b2017-10-17 01:19:38 -070085 restricted_to = ['//tools:roborio'],
Brian Silverman06016bc2017-02-11 16:34:34 -080086)
Austin Schuh7b9a3ba2017-02-19 23:11:45 -080087
88aos_downloader(
Austin Schuh23cc9ed2017-02-24 19:14:06 -080089 name = 'download',
90 start_srcs = [
91 ':joystick_reader',
92 ':wpilib_interface',
93 '//aos:prime_start_binaries',
Austin Schuh69f8a4f2017-03-15 20:19:23 -070094 '//y2017/actors:autonomous_action',
Austin Schuh23cc9ed2017-02-24 19:14:06 -080095 '//y2017/control_loops/drivetrain:drivetrain',
96 '//y2017/control_loops/superstructure:superstructure',
Austin Schuh69f8a4f2017-03-15 20:19:23 -070097 '//y2017/vision:target_receiver',
Austin Schuh23cc9ed2017-02-24 19:14:06 -080098 ],
99 srcs = [
100 '//aos:prime_binaries',
101 ],
Austin Schuh9d92e6b2017-10-17 01:19:38 -0700102 restricted_to = ['//tools:roborio'],
Austin Schuh23cc9ed2017-02-24 19:14:06 -0800103)
104
105aos_downloader(
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800106 name = 'download_stripped',
107 start_srcs = [
Austin Schuh23cc9ed2017-02-24 19:14:06 -0800108 ':joystick_reader.stripped',
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800109 ':wpilib_interface.stripped',
110 '//aos:prime_start_binaries_stripped',
Austin Schuh69f8a4f2017-03-15 20:19:23 -0700111 '//y2017/actors:autonomous_action.stripped',
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800112 '//y2017/control_loops/drivetrain:drivetrain.stripped',
113 '//y2017/control_loops/superstructure:superstructure.stripped',
Austin Schuh69f8a4f2017-03-15 20:19:23 -0700114 '//y2017/vision:target_receiver.stripped',
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800115 ],
116 srcs = [
117 '//aos:prime_binaries_stripped',
118 ],
Austin Schuh9d92e6b2017-10-17 01:19:38 -0700119 restricted_to = ['//tools:roborio'],
Austin Schuh7b9a3ba2017-02-19 23:11:45 -0800120)