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