Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 1 | load("//frc971:downloader.bzl", "robot_downloader") |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 2 | load("//aos:config.bzl", "aos_config") |
Michael Schuh | 5a1a758 | 2019-03-01 13:03:47 -0800 | [diff] [blame] | 3 | load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 4 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 5 | |
| 6 | robot_downloader( |
Austin Schuh | 635e8bf | 2019-03-23 18:53:15 -0700 | [diff] [blame] | 7 | dirs = [ |
| 8 | "//y2019/vision/server:www_files", |
| 9 | ], |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 10 | start_binaries = [ |
| 11 | ":joystick_reader", |
| 12 | ":wpilib_interface", |
| 13 | "//y2019/control_loops/drivetrain:drivetrain", |
Austin Schuh | 355f327 | 2019-02-15 23:09:29 -0800 | [diff] [blame] | 14 | "//y2019/control_loops/superstructure:superstructure", |
Austin Schuh | 986091a | 2019-03-22 20:35:12 -0700 | [diff] [blame] | 15 | "//y2019/actors:binaries", |
Austin Schuh | 635e8bf | 2019-03-23 18:53:15 -0700 | [diff] [blame] | 16 | "//y2019/vision/server", |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 17 | ], |
| 18 | ) |
| 19 | |
Tyler Chatow | 37ecdcd | 2019-01-26 20:18:42 -0800 | [diff] [blame] | 20 | cc_library( |
| 21 | name = "constants", |
| 22 | srcs = [ |
| 23 | "constants.cc", |
| 24 | ], |
| 25 | hdrs = [ |
| 26 | "constants.h", |
| 27 | ], |
| 28 | visibility = ["//visibility:public"], |
| 29 | deps = [ |
John Park | b859cf0 | 2019-11-20 19:52:05 -0800 | [diff] [blame] | 30 | "@com_google_absl//absl/base", |
Tyler Chatow | 37ecdcd | 2019-01-26 20:18:42 -0800 | [diff] [blame] | 31 | "//aos/logging", |
| 32 | "//aos/mutex", |
| 33 | "//aos/network:team_number", |
| 34 | "//frc971:constants", |
James Kuszmaul | 22c5ab3 | 2019-02-09 14:45:58 -0800 | [diff] [blame] | 35 | "//frc971/control_loops:pose", |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 36 | "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem", |
James Kuszmaul | 22c5ab3 | 2019-02-09 14:45:58 -0800 | [diff] [blame] | 37 | "//y2019/control_loops/drivetrain:camera", |
Sabina Davis | 7be49f3 | 2019-02-02 00:30:19 -0800 | [diff] [blame] | 38 | "//y2019/control_loops/drivetrain:polydrivetrain_plants", |
Alex Perry | 5fb5ff2 | 2019-02-09 21:53:17 -0800 | [diff] [blame] | 39 | "//y2019/control_loops/superstructure/elevator:elevator_plants", |
| 40 | "//y2019/control_loops/superstructure/intake:intake_plants", |
| 41 | "//y2019/control_loops/superstructure/stilts:stilts_plants", |
Austin Schuh | c1d6f83 | 2019-02-15 23:22:17 -0800 | [diff] [blame] | 42 | "//y2019/control_loops/superstructure/wrist:wrist_plants", |
James Kuszmaul | e2c71ea | 2019-03-04 08:14:21 -0800 | [diff] [blame] | 43 | "//y2019/vision:constants", |
Tyler Chatow | 37ecdcd | 2019-01-26 20:18:42 -0800 | [diff] [blame] | 44 | ], |
| 45 | ) |
| 46 | |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 47 | cc_binary( |
| 48 | name = "wpilib_interface", |
| 49 | srcs = [ |
| 50 | "wpilib_interface.cc", |
| 51 | ], |
| 52 | restricted_to = ["//tools:roborio"], |
| 53 | deps = [ |
Sabina Davis | 7be49f3 | 2019-02-02 00:30:19 -0800 | [diff] [blame] | 54 | ":constants", |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 55 | ":status_light", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 56 | "//aos:init", |
| 57 | "//aos:make_unique", |
| 58 | "//aos:math", |
| 59 | "//aos/controls:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 60 | "//aos/events:shm_event_loop", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 61 | "//aos/logging", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 62 | "//aos/robot_state:robot_state_fbs", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 63 | "//aos/stl_mutex", |
| 64 | "//aos/time", |
| 65 | "//aos/util:log_interval", |
| 66 | "//aos/util:phased_loop", |
| 67 | "//aos/util:wrapping_counter", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 68 | "//frc971/autonomous:auto_fbs", |
| 69 | "//frc971/control_loops:control_loops_fbs", |
| 70 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 71 | "//frc971/wpilib:ADIS16448", |
Austin Schuh | c1d6f83 | 2019-02-15 23:22:17 -0800 | [diff] [blame] | 72 | "//frc971/wpilib:buffered_pcm", |
Sabina Davis | d004fd6 | 2019-02-02 23:51:46 -0800 | [diff] [blame] | 73 | "//frc971/wpilib:drivetrain_writer", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 74 | "//frc971/wpilib:encoder_and_potentiometer", |
| 75 | "//frc971/wpilib:interrupt_edge_counting", |
| 76 | "//frc971/wpilib:joystick_sender", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 77 | "//frc971/wpilib:logging_fbs", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 78 | "//frc971/wpilib:loop_output_handler", |
| 79 | "//frc971/wpilib:pdp_fetcher", |
Sabina Davis | adc5854 | 2019-02-01 22:23:00 -0800 | [diff] [blame] | 80 | "//frc971/wpilib:sensor_reader", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 81 | "//frc971/wpilib:wpilib_interface", |
| 82 | "//frc971/wpilib:wpilib_robot_base", |
Austin Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 83 | "//third_party:phoenix", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 84 | "//third_party:wpilib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 85 | "//y2019/control_loops/drivetrain:camera_fbs", |
| 86 | "//y2019/control_loops/superstructure:superstructure_output_fbs", |
| 87 | "//y2019/control_loops/superstructure:superstructure_position_fbs", |
Brian Silverman | f8b7525 | 2019-02-24 16:13:58 -0800 | [diff] [blame] | 88 | "//y2019/jevois:spi", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 89 | ], |
| 90 | ) |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 91 | |
Tyler Chatow | d28951f | 2019-02-16 20:12:28 -0800 | [diff] [blame] | 92 | cc_library( |
| 93 | name = "joystick_angle", |
| 94 | srcs = [ |
| 95 | "joystick_angle.cc", |
| 96 | ], |
| 97 | hdrs = [ |
| 98 | "joystick_angle.h", |
| 99 | ], |
| 100 | deps = [ |
| 101 | "//aos/input:drivetrain_input", |
Tyler Chatow | c8012ca | 2019-02-18 22:33:01 -0800 | [diff] [blame] | 102 | "//frc971/zeroing:wrap", |
Tyler Chatow | d28951f | 2019-02-16 20:12:28 -0800 | [diff] [blame] | 103 | ], |
| 104 | ) |
| 105 | |
| 106 | cc_test( |
| 107 | name = "joystick_angle_test", |
| 108 | srcs = [ |
| 109 | "joystick_angle_test.cc", |
| 110 | ], |
| 111 | deps = [ |
| 112 | ":joystick_angle", |
| 113 | "//aos/testing:googletest", |
| 114 | ], |
| 115 | ) |
| 116 | |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 117 | cc_binary( |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 118 | name = "joystick_reader", |
| 119 | srcs = [ |
| 120 | ":joystick_reader.cc", |
| 121 | ], |
| 122 | deps = [ |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 123 | ":status_light", |
Tyler Chatow | e024145 | 2019-03-08 21:07:50 -0800 | [diff] [blame] | 124 | ":vision_proto", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 125 | "//aos:init", |
| 126 | "//aos/actions:action_lib", |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 127 | "//aos/input:action_joystick_input", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 128 | "//aos/input:drivetrain_input", |
| 129 | "//aos/input:joystick_input", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 130 | "//aos/logging", |
| 131 | "//aos/network:team_number", |
| 132 | "//aos/stl_mutex", |
| 133 | "//aos/time", |
| 134 | "//aos/util:log_interval", |
| 135 | "//aos/vision/events:udp", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 136 | "//frc971/autonomous:auto_fbs", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 137 | "//frc971/autonomous:base_autonomous_actor", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 138 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 139 | "//frc971/control_loops/drivetrain:localizer_fbs", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 140 | "//y2019/control_loops/drivetrain:drivetrain_base", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 141 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
| 142 | "//y2019/control_loops/superstructure:superstructure_goal_fbs", |
| 143 | "//y2019/control_loops/superstructure:superstructure_position_fbs", |
| 144 | "//y2019/control_loops/superstructure:superstructure_status_fbs", |
Tyler Chatow | e024145 | 2019-03-08 21:07:50 -0800 | [diff] [blame] | 145 | "@com_google_protobuf//:protobuf", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 146 | ], |
| 147 | ) |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 148 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 149 | flatbuffer_cc_library( |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 150 | name = "status_light", |
| 151 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 152 | "status_light.fbs", |
| 153 | ], |
| 154 | gen_reflections = 1, |
| 155 | visibility = ["//visibility:public"], |
| 156 | ) |
| 157 | |
| 158 | aos_config( |
| 159 | name = "config", |
| 160 | src = "y2019.json", |
| 161 | flatbuffers = [ |
| 162 | ":status_light", |
| 163 | "//y2019/control_loops/drivetrain:camera_fbs", |
| 164 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
| 165 | "//y2019/control_loops/superstructure:superstructure_goal_fbs", |
| 166 | "//y2019/control_loops/superstructure:superstructure_output_fbs", |
| 167 | "//y2019/control_loops/superstructure:superstructure_position_fbs", |
| 168 | "//y2019/control_loops/superstructure:superstructure_status_fbs", |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 169 | ], |
| 170 | visibility = ["//visibility:public"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 171 | deps = [ |
| 172 | "//aos/robot_state:config", |
| 173 | "//frc971/control_loops/drivetrain:config", |
| 174 | ], |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 175 | ) |
| 176 | |
Michael Schuh | 5a1a758 | 2019-03-01 13:03:47 -0800 | [diff] [blame] | 177 | cc_proto_library( |
| 178 | name = "vision_proto", |
| 179 | srcs = ["vision.proto"], |
| 180 | visibility = ["//visibility:public"], |
| 181 | ) |
| 182 | |
Michael Schuh | ab42b0a | 2019-01-07 16:33:43 -0800 | [diff] [blame] | 183 | py_library( |
| 184 | name = "python_init", |
| 185 | srcs = ["__init__.py"], |
| 186 | visibility = ["//visibility:public"], |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 187 | ) |