Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 1 | load("//frc971:downloader.bzl", "robot_downloader") |
| 2 | load("//aos:config.bzl", "aos_config") |
| 3 | load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") |
| 4 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
| 5 | |
| 6 | robot_downloader( |
| 7 | data = [ |
| 8 | ":config.json", |
| 9 | ], |
| 10 | start_binaries = [ |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame^] | 11 | "//aos/events/logging:logger_main", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 12 | ":joystick_reader", |
| 13 | ":wpilib_interface", |
Austin Schuh | 6aa77be | 2020-02-22 21:06:40 -0800 | [diff] [blame] | 14 | "//aos/network:message_bridge_client", |
| 15 | "//aos/network:message_bridge_server", |
| 16 | "//y2020/actors:binaries", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 17 | "//y2020/control_loops/drivetrain:drivetrain", |
| 18 | "//y2020/control_loops/superstructure:superstructure", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 19 | ], |
| 20 | ) |
| 21 | |
James Kuszmaul | 2d8fa2a | 2020-03-01 13:51:50 -0800 | [diff] [blame^] | 22 | robot_downloader( |
| 23 | name = "pi_download", |
| 24 | data = [ |
| 25 | ":config.json", |
| 26 | "//y2020/www:files", |
| 27 | "//y2020/www:flatbuffers", |
| 28 | "//y2020/www:main_bundle", |
| 29 | ], |
| 30 | dirs = [ |
| 31 | "//y2020/www:www_files", |
| 32 | ], |
| 33 | restricted_to = ["//tools:armhf-debian"], |
| 34 | start_binaries = [ |
| 35 | "//aos/network:message_bridge_client", |
| 36 | "//aos/network:message_bridge_server", |
| 37 | "//y2020/vision:camera_reader", |
| 38 | "//aos/network:web_proxy_main", |
| 39 | ], |
| 40 | target_type = "pi", |
| 41 | ) |
| 42 | |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 43 | cc_library( |
| 44 | name = "constants", |
| 45 | srcs = [ |
| 46 | "constants.cc", |
| 47 | ], |
| 48 | hdrs = [ |
| 49 | "constants.h", |
| 50 | ], |
| 51 | visibility = ["//visibility:public"], |
| 52 | deps = [ |
| 53 | "//aos/logging", |
| 54 | "//aos/mutex", |
| 55 | "//aos/network:team_number", |
| 56 | "//frc971:constants", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 57 | "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem", |
| 58 | "//y2020/control_loops/drivetrain:polydrivetrain_plants", |
Austin Schuh | 9dcd520 | 2020-02-20 20:06:04 -0800 | [diff] [blame] | 59 | "//y2020/control_loops/superstructure/accelerator:accelerator_plants", |
| 60 | "//y2020/control_loops/superstructure/control_panel:control_panel_plants", |
| 61 | "//y2020/control_loops/superstructure/finisher:finisher_plants", |
Sabina Davis | a587fbd | 2020-01-31 22:11:15 -0800 | [diff] [blame] | 62 | "//y2020/control_loops/superstructure/hood:hood_plants", |
Sabina Davis | e8d3899 | 2020-02-02 15:00:31 -0800 | [diff] [blame] | 63 | "//y2020/control_loops/superstructure/intake:intake_plants", |
Kai Tinkess | 10943cf | 2020-02-01 15:49:57 -0800 | [diff] [blame] | 64 | "//y2020/control_loops/superstructure/turret:turret_plants", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 65 | "@com_google_absl//absl/base", |
| 66 | ], |
| 67 | ) |
| 68 | |
| 69 | cc_binary( |
| 70 | name = "wpilib_interface", |
| 71 | srcs = [ |
| 72 | "wpilib_interface.cc", |
| 73 | ], |
| 74 | restricted_to = ["//tools:roborio"], |
| 75 | deps = [ |
| 76 | ":constants", |
| 77 | "//aos:init", |
| 78 | "//aos:make_unique", |
| 79 | "//aos:math", |
| 80 | "//aos/controls:control_loop", |
| 81 | "//aos/events:shm_event_loop", |
| 82 | "//aos/logging", |
| 83 | "//aos/robot_state:robot_state_fbs", |
| 84 | "//aos/stl_mutex", |
| 85 | "//aos/time", |
| 86 | "//aos/util:log_interval", |
| 87 | "//aos/util:phased_loop", |
| 88 | "//aos/util:wrapping_counter", |
| 89 | "//frc971/autonomous:auto_mode_fbs", |
| 90 | "//frc971/control_loops:control_loops_fbs", |
| 91 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
James Kuszmaul | a244a91 | 2020-01-18 13:50:50 -0800 | [diff] [blame] | 92 | "//frc971/wpilib:ADIS16470", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 93 | "//frc971/wpilib:buffered_pcm", |
| 94 | "//frc971/wpilib:drivetrain_writer", |
| 95 | "//frc971/wpilib:encoder_and_potentiometer", |
| 96 | "//frc971/wpilib:interrupt_edge_counting", |
| 97 | "//frc971/wpilib:joystick_sender", |
| 98 | "//frc971/wpilib:logging_fbs", |
| 99 | "//frc971/wpilib:loop_output_handler", |
| 100 | "//frc971/wpilib:pdp_fetcher", |
| 101 | "//frc971/wpilib:sensor_reader", |
| 102 | "//frc971/wpilib:wpilib_interface", |
| 103 | "//frc971/wpilib:wpilib_robot_base", |
Alex Perry | c4691f5 | 2020-02-17 19:20:01 -0800 | [diff] [blame] | 104 | "//third_party:phoenix", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 105 | "//third_party:wpilib", |
| 106 | "//y2020/control_loops/superstructure:superstructure_output_fbs", |
| 107 | "//y2020/control_loops/superstructure:superstructure_position_fbs", |
| 108 | ], |
| 109 | ) |
| 110 | |
| 111 | cc_binary( |
| 112 | name = "joystick_reader", |
| 113 | srcs = [ |
| 114 | ":joystick_reader.cc", |
| 115 | ], |
| 116 | deps = [ |
| 117 | "//aos:init", |
| 118 | "//aos/actions:action_lib", |
| 119 | "//aos/input:action_joystick_input", |
| 120 | "//aos/input:drivetrain_input", |
| 121 | "//aos/input:joystick_input", |
| 122 | "//aos/logging", |
| 123 | "//frc971/autonomous:auto_fbs", |
| 124 | "//frc971/autonomous:base_autonomous_actor", |
| 125 | "//frc971/control_loops:profiled_subsystem_fbs", |
Sabina Davis | a8fed3d | 2020-02-22 21:44:57 -0800 | [diff] [blame] | 126 | "//y2020:constants", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 127 | "//y2020/control_loops/drivetrain:drivetrain_base", |
| 128 | "//y2020/control_loops/superstructure:superstructure_goal_fbs", |
| 129 | "//y2020/control_loops/superstructure:superstructure_status_fbs", |
| 130 | ], |
| 131 | ) |
| 132 | |
| 133 | aos_config( |
| 134 | name = "config", |
| 135 | src = "y2020.json", |
| 136 | flatbuffers = [ |
Austin Schuh | 6aa77be | 2020-02-22 21:06:40 -0800 | [diff] [blame] | 137 | "//aos/network:message_bridge_client_fbs", |
| 138 | "//aos/network:message_bridge_server_fbs", |
| 139 | "//aos/network:timestamp_fbs", |
| 140 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 141 | "//y2020/control_loops/superstructure:superstructure_goal_fbs", |
| 142 | "//y2020/control_loops/superstructure:superstructure_output_fbs", |
| 143 | "//y2020/control_loops/superstructure:superstructure_position_fbs", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 144 | "//y2020/control_loops/superstructure:superstructure_status_fbs", |
Brian Silverman | 967e5df | 2020-02-09 16:43:34 -0800 | [diff] [blame] | 145 | "//y2020/vision/sift:sift_fbs", |
Brian Silverman | 62956e7 | 2020-02-26 21:04:05 -0800 | [diff] [blame] | 146 | "//y2020/vision/sift:sift_training_fbs", |
Austin Schuh | 6aa77be | 2020-02-22 21:06:40 -0800 | [diff] [blame] | 147 | "//y2020/vision:vision_fbs", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 148 | ], |
| 149 | visibility = ["//visibility:public"], |
| 150 | deps = [ |
| 151 | "//aos/robot_state:config", |
| 152 | "//frc971/autonomous:config", |
| 153 | "//frc971/control_loops/drivetrain:config", |
| 154 | "//frc971/wpilib:config", |
| 155 | ], |
| 156 | ) |
| 157 | |
| 158 | py_library( |
| 159 | name = "python_init", |
| 160 | srcs = ["__init__.py"], |
| 161 | visibility = ["//visibility:public"], |
| 162 | ) |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 163 | |
| 164 | sh_binary( |
| 165 | name = "web_proxy", |
| 166 | srcs = ["web_proxy.sh"], |
| 167 | data = [ |
| 168 | ":config.json", |
| 169 | "//aos/network:web_proxy_main", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 170 | "//y2020/www:files", |
| 171 | "//y2020/www:flatbuffers", |
Kai Tinkess | 10943cf | 2020-02-01 15:49:57 -0800 | [diff] [blame] | 172 | "//y2020/www:main_bundle", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 173 | ], |
| 174 | ) |