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") |
Austin Schuh | 7b9a3ba | 2017-02-19 23:11:45 -0800 | [diff] [blame] | 3 | |
Tyler Chatow | 6107aba | 2017-01-22 01:39:40 +0000 | [diff] [blame] | 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 = [ |
| 14 | "//aos:once", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 15 | "//aos/logging", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 16 | "//aos/mutex", |
John Park | bb458cd | 2019-11-03 19:18:43 -0800 | [diff] [blame] | 17 | "@com_google_absl//absl/base", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 18 | "//aos/network:team_number", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 19 | "//frc971:constants", |
| 20 | "//frc971/shooter_interpolation:interpolation", |
| 21 | "//y2017/control_loops/drivetrain:polydrivetrain_plants", |
| 22 | "//y2017/control_loops/superstructure/column:column_plants", |
| 23 | "//y2017/control_loops/superstructure/hood:hood_plants", |
| 24 | "//y2017/control_loops/superstructure/intake:intake_plants", |
| 25 | "//y2017/control_loops/superstructure/shooter:shooter_plants", |
| 26 | ], |
Tyler Chatow | 6107aba | 2017-01-22 01:39:40 +0000 | [diff] [blame] | 27 | ) |
Brian Silverman | 06016bc | 2017-02-11 16:34:34 -0800 | [diff] [blame] | 28 | |
| 29 | cc_binary( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 30 | name = "joystick_reader", |
| 31 | srcs = [ |
| 32 | "joystick_reader.cc", |
| 33 | ], |
| 34 | deps = [ |
| 35 | ":constants", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 36 | "//aos:init", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 37 | "//aos/actions:action_lib", |
Austin Schuh | a250b2d | 2019-05-27 16:14:02 -0700 | [diff] [blame] | 38 | "//aos/input:action_joystick_input", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 39 | "//aos/input:drivetrain_input", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 40 | "//aos/logging", |
| 41 | "//aos/time", |
| 42 | "//aos/util:log_interval", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 43 | "//y2017/actors:autonomous_action_lib", |
| 44 | "//y2017/control_loops/drivetrain:drivetrain_base", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 45 | "//y2017/control_loops/superstructure:superstructure_goal_fbs", |
| 46 | "//y2017/control_loops/superstructure:superstructure_status_fbs", |
| 47 | ], |
| 48 | ) |
| 49 | |
| 50 | aos_config( |
| 51 | name = "config", |
| 52 | src = "y2017.json", |
| 53 | flatbuffers = [ |
| 54 | "//y2017/control_loops/superstructure:superstructure_goal_fbs", |
| 55 | "//y2017/control_loops/superstructure:superstructure_output_fbs", |
| 56 | "//y2017/control_loops/superstructure:superstructure_position_fbs", |
| 57 | "//y2017/control_loops/superstructure:superstructure_status_fbs", |
| 58 | "//y2017/vision:vision_fbs", |
| 59 | ], |
| 60 | visibility = ["//visibility:public"], |
| 61 | deps = [ |
| 62 | "//aos/robot_state:config", |
| 63 | "//frc971/control_loops/drivetrain:config", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 64 | ], |
Campbell Crowley | 71b5f13 | 2017-02-18 13:16:08 -0800 | [diff] [blame] | 65 | ) |
| 66 | |
| 67 | cc_binary( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 68 | name = "wpilib_interface", |
| 69 | srcs = [ |
| 70 | "wpilib_interface.cc", |
| 71 | ], |
| 72 | restricted_to = ["//tools:roborio"], |
| 73 | deps = [ |
| 74 | ":constants", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 75 | "//aos:init", |
| 76 | "//aos:make_unique", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 77 | "//aos:math", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 78 | "//aos/controls:control_loop", |
| 79 | "//aos/logging", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 80 | "//aos/robot_state:robot_state_fbs", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 81 | "//aos/stl_mutex", |
| 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_output_fbs", |
| 89 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 90 | "//frc971/wpilib:ADIS16448", |
| 91 | "//frc971/wpilib:buffered_pcm", |
| 92 | "//frc971/wpilib:dma", |
| 93 | "//frc971/wpilib:dma_edge_counting", |
Sabina Davis | 7af11ad | 2019-02-03 01:16:45 -0800 | [diff] [blame] | 94 | "//frc971/wpilib:drivetrain_writer", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 95 | "//frc971/wpilib:encoder_and_potentiometer", |
| 96 | "//frc971/wpilib:interrupt_edge_counting", |
| 97 | "//frc971/wpilib:joystick_sender", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 98 | "//frc971/wpilib:logging_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 99 | "//frc971/wpilib:loop_output_handler", |
| 100 | "//frc971/wpilib:pdp_fetcher", |
Austin Schuh | bf29b6f | 2019-02-02 21:45:27 -0800 | [diff] [blame] | 101 | "//frc971/wpilib:sensor_reader", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 102 | "//frc971/wpilib:wpilib_robot_base", |
| 103 | "//third_party:wpilib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 104 | "//y2017/control_loops/superstructure:superstructure_output_fbs", |
| 105 | "//y2017/control_loops/superstructure:superstructure_position_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 106 | ], |
Brian Silverman | 06016bc | 2017-02-11 16:34:34 -0800 | [diff] [blame] | 107 | ) |
Austin Schuh | 7b9a3ba | 2017-02-19 23:11:45 -0800 | [diff] [blame] | 108 | |
Lee Mracek | 6821fe0 | 2018-11-01 17:27:30 -0400 | [diff] [blame] | 109 | robot_downloader( |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 110 | start_binaries = [ |
| 111 | ":joystick_reader", |
| 112 | ":wpilib_interface", |
| 113 | "//y2017/control_loops/drivetrain:drivetrain", |
| 114 | "//y2017/control_loops/superstructure:superstructure", |
| 115 | "//y2017/actors:autonomous_action", |
| 116 | ], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 117 | ) |
| 118 | |
| 119 | py_library( |
| 120 | name = "python_init", |
| 121 | srcs = ["__init__.py"], |
| 122 | visibility = ["//visibility:public"], |
Austin Schuh | 7b9a3ba | 2017-02-19 23:11:45 -0800 | [diff] [blame] | 123 | ) |