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