Brian Silverman | f819b44 | 2019-01-20 16:51:04 -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") |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 3 | |
| 4 | cc_library( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 5 | name = "constants", |
| 6 | srcs = [ |
| 7 | "constants.cc", |
| 8 | ], |
| 9 | hdrs = [ |
| 10 | "constants.h", |
| 11 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 12 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 13 | visibility = ["//visibility:public"], |
| 14 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 15 | "//aos/logging", |
| 16 | "//aos/network:team_number", |
Brian Silverman | 1463c09 | 2020-10-30 17:28:24 -0700 | [diff] [blame] | 17 | "//aos/stl_mutex", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 18 | "//frc971:constants", |
| 19 | "//frc971:shifter_hall_effect", |
| 20 | "//frc971/control_loops:state_feedback_loop", |
| 21 | "//y2016/control_loops/drivetrain:polydrivetrain_plants", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 22 | "@com_google_absl//absl/base", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 23 | ], |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 24 | ) |
| 25 | |
| 26 | cc_binary( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 27 | name = "joystick_reader", |
| 28 | srcs = [ |
| 29 | "joystick_reader.cc", |
| 30 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 31 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 32 | deps = [ |
| 33 | ":constants", |
John Park | 398c74a | 2018-10-20 21:17:39 -0700 | [diff] [blame] | 34 | "//aos:init", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 35 | "//aos/actions:action_lib", |
Austin Schuh | a250b2d | 2019-05-27 16:14:02 -0700 | [diff] [blame] | 36 | "//aos/input:action_joystick_input", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 37 | "//aos/logging", |
| 38 | "//aos/time", |
| 39 | "//aos/util:log_interval", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 40 | "//frc971/autonomous:auto_fbs", |
| 41 | "//frc971/control_loops/drivetrain:drivetrain_goal_fbs", |
| 42 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame^] | 43 | "//frc971/control_loops/drivetrain:spline_goal_fbs", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 44 | "//frc971/queues:gyro_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 45 | "//y2016/actors:autonomous_action_lib", |
| 46 | "//y2016/actors:superstructure_action_lib", |
| 47 | "//y2016/actors:vision_align_action_lib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 48 | "//y2016/control_loops/shooter:shooter_goal_fbs", |
| 49 | "//y2016/control_loops/superstructure:superstructure_goal_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 50 | "//y2016/control_loops/superstructure:superstructure_lib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 51 | "//y2016/control_loops/superstructure:superstructure_status_fbs", |
| 52 | "//y2016/queues:ball_detector_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 53 | ], |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 54 | ) |
| 55 | |
Lee Mracek | 6821fe0 | 2018-11-01 17:27:30 -0400 | [diff] [blame] | 56 | robot_downloader( |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 57 | data = [ |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 58 | ":config", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 59 | ], |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 60 | dirs = [ |
| 61 | "//y2016/dashboard:www_files", |
| 62 | ], |
| 63 | start_binaries = [ |
| 64 | ":joystick_reader", |
| 65 | ":wpilib_interface", |
| 66 | "//y2016/control_loops/drivetrain:drivetrain", |
| 67 | "//y2016/control_loops/superstructure:superstructure", |
| 68 | "//y2016/control_loops/shooter:shooter", |
| 69 | "//y2016/dashboard:dashboard", |
| 70 | "//y2016/actors:autonomous_action", |
| 71 | "//y2016/actors:superstructure_action", |
| 72 | "//y2016/actors:vision_align_action", |
| 73 | "//y2016/vision:target_receiver", |
| 74 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 75 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | c80dd15 | 2016-02-29 01:47:44 -0800 | [diff] [blame] | 76 | ) |
Brian Silverman | 06016bc | 2017-02-11 16:34:34 -0800 | [diff] [blame] | 77 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 78 | aos_config( |
| 79 | name = "config", |
| 80 | src = "y2016.json", |
| 81 | flatbuffers = [ |
| 82 | "//y2016/control_loops/shooter:shooter_goal_fbs", |
| 83 | "//y2016/control_loops/shooter:shooter_output_fbs", |
| 84 | "//y2016/control_loops/shooter:shooter_position_fbs", |
| 85 | "//y2016/control_loops/shooter:shooter_status_fbs", |
| 86 | "//y2016/control_loops/superstructure:superstructure_goal_fbs", |
| 87 | "//y2016/control_loops/superstructure:superstructure_output_fbs", |
| 88 | "//y2016/control_loops/superstructure:superstructure_position_fbs", |
| 89 | "//y2016/control_loops/superstructure:superstructure_status_fbs", |
| 90 | "//y2016/queues:ball_detector_fbs", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 91 | "//y2016/vision:vision_fbs", |
| 92 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
| 93 | "//y2016/actors:vision_align_action_fbs", |
| 94 | "//y2016/actors:superstructure_action_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 95 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 96 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 97 | visibility = ["//visibility:public"], |
| 98 | deps = [ |
| 99 | "//aos/robot_state:config", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 100 | "//frc971/autonomous:config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 101 | "//frc971/control_loops/drivetrain:config", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 102 | "//frc971/wpilib:config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 103 | ], |
| 104 | ) |
| 105 | |
Brian Silverman | 06016bc | 2017-02-11 16:34:34 -0800 | [diff] [blame] | 106 | cc_binary( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 107 | name = "wpilib_interface", |
| 108 | srcs = [ |
| 109 | "wpilib_interface.cc", |
| 110 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 111 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 112 | deps = [ |
| 113 | ":constants", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 114 | "//aos:init", |
| 115 | "//aos:make_unique", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 116 | "//aos:math", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 117 | "//aos/controls:control_loop", |
| 118 | "//aos/logging", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 119 | "//aos/robot_state:robot_state_fbs", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 120 | "//aos/stl_mutex", |
| 121 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 122 | "//aos/util:log_interval", |
| 123 | "//aos/util:phased_loop", |
| 124 | "//aos/util:wrapping_counter", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 125 | "//frc971/autonomous:auto_fbs", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 126 | "//frc971/autonomous:auto_mode_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 127 | "//frc971/control_loops:control_loops_fbs", |
| 128 | "//frc971/control_loops/drivetrain:drivetrain_output_fbs", |
| 129 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 130 | "//frc971/wpilib:ADIS16448", |
| 131 | "//frc971/wpilib:buffered_pcm", |
| 132 | "//frc971/wpilib:dma", |
| 133 | "//frc971/wpilib:dma_edge_counting", |
Sabina Davis | b71bc28 | 2019-02-03 01:17:23 -0800 | [diff] [blame] | 134 | "//frc971/wpilib:drivetrain_writer", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 135 | "//frc971/wpilib:encoder_and_potentiometer", |
| 136 | "//frc971/wpilib:gyro_sender", |
| 137 | "//frc971/wpilib:interrupt_edge_counting", |
| 138 | "//frc971/wpilib:joystick_sender", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 139 | "//frc971/wpilib:logging_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 140 | "//frc971/wpilib:loop_output_handler", |
| 141 | "//frc971/wpilib:pdp_fetcher", |
Austin Schuh | 54667ac | 2019-02-02 16:44:49 -0800 | [diff] [blame] | 142 | "//frc971/wpilib:sensor_reader", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 143 | "//frc971/wpilib:wpilib_robot_base", |
| 144 | "//third_party:wpilib", |
| 145 | "//y2016/control_loops/drivetrain:polydrivetrain_plants", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 146 | "//y2016/control_loops/shooter:shooter_output_fbs", |
| 147 | "//y2016/control_loops/shooter:shooter_position_fbs", |
| 148 | "//y2016/control_loops/superstructure:superstructure_output_fbs", |
| 149 | "//y2016/control_loops/superstructure:superstructure_position_fbs", |
| 150 | "//y2016/queues:ball_detector_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 151 | ], |
| 152 | ) |
| 153 | |
| 154 | py_library( |
| 155 | name = "python_init", |
| 156 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 157 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 158 | visibility = ["//visibility:public"], |
Brian Silverman | 06016bc | 2017-02-11 16:34:34 -0800 | [diff] [blame] | 159 | ) |