Lee Mracek | 6821fe0 | 2018-11-01 17:27:30 -0400 | [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") |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [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") |
Neil Balch | acfca5b | 2018-01-28 14:04:08 -0800 | [diff] [blame] | 5 | |
Lee Mracek | 6821fe0 | 2018-11-01 17:27:30 -0400 | [diff] [blame] | 6 | robot_downloader( |
| 7 | start_binaries = [ |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 8 | ":joystick_reader", |
| 9 | ":wpilib_interface", |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 10 | "//y2018/vision:vision_status", |
Austin Schuh | a3c148e | 2018-03-09 21:04:05 -0800 | [diff] [blame] | 11 | "//y2018/actors:autonomous_action", |
Lee Mracek | 6821fe0 | 2018-11-01 17:27:30 -0400 | [diff] [blame] | 12 | "//y2018/control_loops/drivetrain:drivetrain", |
Austin Schuh | a3c148e | 2018-03-09 21:04:05 -0800 | [diff] [blame] | 13 | "//y2018/control_loops/superstructure:superstructure", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 14 | ], |
Neil Balch | acfca5b | 2018-01-28 14:04:08 -0800 | [diff] [blame] | 15 | ) |
| 16 | |
Neil Balch | acfca5b | 2018-01-28 14:04:08 -0800 | [diff] [blame] | 17 | cc_binary( |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 18 | name = "joystick_reader", |
| 19 | srcs = [ |
| 20 | "joystick_reader.cc", |
| 21 | ], |
| 22 | deps = [ |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 23 | ":vision_proto", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 24 | "//aos:init", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 25 | "//aos/actions:action_lib", |
Austin Schuh | a250b2d | 2019-05-27 16:14:02 -0700 | [diff] [blame] | 26 | "//aos/input:action_joystick_input", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 27 | "//aos/input:drivetrain_input", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 28 | "//aos/logging", |
| 29 | "//aos/network:team_number", |
| 30 | "//aos/stl_mutex", |
| 31 | "//aos/time", |
| 32 | "//aos/util:log_interval", |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 33 | "//aos/vision/events:udp", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 34 | "//frc971/autonomous:auto_fbs", |
Austin Schuh | a3c148e | 2018-03-09 21:04:05 -0800 | [diff] [blame] | 35 | "//frc971/autonomous:base_autonomous_actor", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 36 | "//y2018/control_loops/drivetrain:drivetrain_base", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 37 | "//y2018/control_loops/superstructure:superstructure_goal_fbs", |
| 38 | "//y2018/control_loops/superstructure:superstructure_position_fbs", |
| 39 | "//y2018/control_loops/superstructure:superstructure_status_fbs", |
Austin Schuh | ab15c4d | 2018-03-09 21:21:03 -0800 | [diff] [blame] | 40 | "//y2018/control_loops/superstructure/arm:generated_graph", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 41 | ], |
| 42 | ) |
| 43 | |
| 44 | cc_library( |
| 45 | name = "constants", |
| 46 | srcs = [ |
| 47 | "constants.cc", |
| 48 | ], |
| 49 | hdrs = [ |
| 50 | "constants.h", |
| 51 | ], |
| 52 | visibility = ["//visibility:public"], |
| 53 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 54 | "//aos/logging", |
| 55 | "//aos/network:team_number", |
Brian Silverman | 1463c09 | 2020-10-30 17:28:24 -0700 | [diff] [blame^] | 56 | "//aos/stl_mutex", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 57 | "//frc971:constants", |
| 58 | "//frc971/shooter_interpolation:interpolation", |
| 59 | "//y2018/control_loops/drivetrain:polydrivetrain_plants", |
| 60 | "//y2018/control_loops/superstructure/arm:dynamics", |
| 61 | "//y2018/control_loops/superstructure/intake:intake_plants", |
| 62 | ], |
| 63 | ) |
| 64 | |
| 65 | cc_binary( |
| 66 | name = "wpilib_interface", |
| 67 | srcs = [ |
| 68 | "wpilib_interface.cc", |
| 69 | ], |
| 70 | restricted_to = ["//tools:roborio"], |
| 71 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 72 | ":status_light_fbs", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 73 | "//aos:init", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 74 | "//aos:make_unique", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 75 | "//aos:math", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 76 | "//aos/controls:control_loop", |
| 77 | "//aos/logging", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 78 | "//aos/robot_state:robot_state_fbs", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 79 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 80 | "//aos/util:log_interval", |
| 81 | "//aos/util:phased_loop", |
| 82 | "//aos/util:wrapping_counter", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 83 | "//frc971/autonomous:auto_fbs", |
| 84 | "//frc971/control_loops:control_loops_fbs", |
| 85 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
| 86 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 87 | "//frc971/wpilib:ADIS16448", |
| 88 | "//frc971/wpilib:buffered_pcm", |
| 89 | "//frc971/wpilib:dma", |
| 90 | "//frc971/wpilib:dma_edge_counting", |
Sabina Davis | caa2a6b | 2019-02-03 01:15:37 -0800 | [diff] [blame] | 91 | "//frc971/wpilib:drivetrain_writer", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 92 | "//frc971/wpilib:encoder_and_potentiometer", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 93 | "//frc971/wpilib:joystick_sender", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 94 | "//frc971/wpilib:logging_fbs", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 95 | "//frc971/wpilib:loop_output_handler", |
| 96 | "//frc971/wpilib:pdp_fetcher", |
Austin Schuh | 6abf5b7 | 2019-02-02 20:20:54 -0800 | [diff] [blame] | 97 | "//frc971/wpilib:sensor_reader", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 98 | "//frc971/wpilib:wpilib_robot_base", |
Austin Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 99 | "//third_party:phoenix", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 100 | "//third_party:wpilib", |
| 101 | "//y2018:constants", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 102 | "//y2018/control_loops/superstructure:superstructure_output_fbs", |
| 103 | "//y2018/control_loops/superstructure:superstructure_position_fbs", |
| 104 | "//y2018/vision:vision_fbs", |
Austin Schuh | 2a3e063 | 2018-02-19 16:24:49 -0800 | [diff] [blame] | 105 | ], |
Neil Balch | acfca5b | 2018-01-28 14:04:08 -0800 | [diff] [blame] | 106 | ) |
Brian Silverman | 37281fc | 2018-03-11 18:42:17 -0700 | [diff] [blame] | 107 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 108 | flatbuffer_cc_library( |
| 109 | name = "status_light_fbs", |
Brian Silverman | 37281fc | 2018-03-11 18:42:17 -0700 | [diff] [blame] | 110 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 111 | "status_light.fbs", |
| 112 | ], |
| 113 | gen_reflections = 1, |
| 114 | visibility = ["//visibility:public"], |
| 115 | ) |
| 116 | |
| 117 | aos_config( |
| 118 | name = "config", |
| 119 | src = "y2018.json", |
| 120 | flatbuffers = [ |
| 121 | ":status_light_fbs", |
| 122 | "//y2018/control_loops/superstructure:superstructure_goal_fbs", |
| 123 | "//y2018/control_loops/superstructure:superstructure_output_fbs", |
| 124 | "//y2018/control_loops/superstructure:superstructure_position_fbs", |
| 125 | "//y2018/control_loops/superstructure:superstructure_status_fbs", |
| 126 | "//y2018/vision:vision_fbs", |
Brian Silverman | 37281fc | 2018-03-11 18:42:17 -0700 | [diff] [blame] | 127 | ], |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 128 | visibility = ["//visibility:public"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 129 | deps = [ |
| 130 | "//aos/robot_state:config", |
| 131 | "//frc971/control_loops/drivetrain:config", |
| 132 | ], |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 133 | ) |
| 134 | |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 135 | cc_proto_library( |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 136 | name = "vision_proto", |
Austin Schuh | f972444 | 2018-10-28 20:30:21 -0700 | [diff] [blame] | 137 | srcs = ["vision.proto"], |
Austin Schuh | 8d5fff4 | 2018-05-30 20:44:12 -0700 | [diff] [blame] | 138 | visibility = ["//visibility:public"], |
Brian Silverman | 37281fc | 2018-03-11 18:42:17 -0700 | [diff] [blame] | 139 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 140 | |
| 141 | py_library( |
| 142 | name = "python_init", |
| 143 | srcs = ["__init__.py"], |
| 144 | visibility = ["//visibility:public"], |
| 145 | ) |