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