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 | ], |
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/network:team_number", |
Brian Silverman | 1463c09 | 2020-10-30 17:28:24 -0700 | [diff] [blame] | 16 | "//aos/stl_mutex", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 17 | "//frc971:constants", |
| 18 | "//frc971/shooter_interpolation:interpolation", |
| 19 | "//y2017/control_loops/drivetrain:polydrivetrain_plants", |
| 20 | "//y2017/control_loops/superstructure/column:column_plants", |
| 21 | "//y2017/control_loops/superstructure/hood:hood_plants", |
| 22 | "//y2017/control_loops/superstructure/intake:intake_plants", |
| 23 | "//y2017/control_loops/superstructure/shooter:shooter_plants", |
Brian Silverman | f4d329c | 2021-11-04 19:32:10 -0700 | [diff] [blame] | 24 | "@com_github_google_glog//:glog", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 25 | "@com_google_absl//absl/base", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 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 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 34 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 35 | deps = [ |
| 36 | ":constants", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 37 | "//aos:init", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 38 | "//aos/actions:action_lib", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 39 | "//aos/logging", |
| 40 | "//aos/time", |
| 41 | "//aos/util:log_interval", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 42 | "//frc971/input:action_joystick_input", |
| 43 | "//frc971/input:drivetrain_input", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 44 | "//y2017/actors:autonomous_action_lib", |
| 45 | "//y2017/control_loops/drivetrain:drivetrain_base", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 46 | "//y2017/control_loops/superstructure:superstructure_goal_fbs", |
| 47 | "//y2017/control_loops/superstructure:superstructure_status_fbs", |
| 48 | ], |
| 49 | ) |
| 50 | |
| 51 | aos_config( |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame^] | 52 | name = "aos_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 53 | src = "y2017.json", |
| 54 | flatbuffers = [ |
| 55 | "//y2017/control_loops/superstructure:superstructure_goal_fbs", |
| 56 | "//y2017/control_loops/superstructure:superstructure_output_fbs", |
| 57 | "//y2017/control_loops/superstructure:superstructure_position_fbs", |
| 58 | "//y2017/control_loops/superstructure:superstructure_status_fbs", |
| 59 | "//y2017/vision:vision_fbs", |
| 60 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 61 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 62 | visibility = ["//visibility:public"], |
| 63 | deps = [ |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame^] | 64 | "//frc971/control_loops/drivetrain:aos_config", |
| 65 | "//frc971/input:aos_config", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 66 | ], |
Campbell Crowley | 71b5f13 | 2017-02-18 13:16:08 -0800 | [diff] [blame] | 67 | ) |
| 68 | |
| 69 | cc_binary( |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 70 | name = "wpilib_interface", |
| 71 | srcs = [ |
| 72 | "wpilib_interface.cc", |
| 73 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 74 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 75 | deps = [ |
| 76 | ":constants", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 77 | "//aos:init", |
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/logging", |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 80 | "//aos/stl_mutex", |
| 81 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 82 | "//aos/util:log_interval", |
| 83 | "//aos/util:phased_loop", |
| 84 | "//aos/util:wrapping_counter", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 85 | "//frc971/autonomous:auto_fbs", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 86 | "//frc971/autonomous:auto_mode_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 87 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 88 | "//frc971/control_loops:control_loops_fbs", |
| 89 | "//frc971/control_loops/drivetrain:drivetrain_output_fbs", |
| 90 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 91 | "//frc971/input:robot_state_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 92 | "//frc971/wpilib:ADIS16448", |
| 93 | "//frc971/wpilib:buffered_pcm", |
| 94 | "//frc971/wpilib:dma", |
| 95 | "//frc971/wpilib:dma_edge_counting", |
Sabina Davis | 7af11ad | 2019-02-03 01:16:45 -0800 | [diff] [blame] | 96 | "//frc971/wpilib:drivetrain_writer", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 97 | "//frc971/wpilib:encoder_and_potentiometer", |
| 98 | "//frc971/wpilib:interrupt_edge_counting", |
| 99 | "//frc971/wpilib:joystick_sender", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 100 | "//frc971/wpilib:logging_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 101 | "//frc971/wpilib:loop_output_handler", |
| 102 | "//frc971/wpilib:pdp_fetcher", |
Austin Schuh | bf29b6f | 2019-02-02 21:45:27 -0800 | [diff] [blame] | 103 | "//frc971/wpilib:sensor_reader", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 104 | "//frc971/wpilib:wpilib_robot_base", |
| 105 | "//third_party:wpilib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 106 | "//y2017/control_loops/superstructure:superstructure_output_fbs", |
| 107 | "//y2017/control_loops/superstructure:superstructure_position_fbs", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 108 | ], |
Brian Silverman | 06016bc | 2017-02-11 16:34:34 -0800 | [diff] [blame] | 109 | ) |
Austin Schuh | 7b9a3ba | 2017-02-19 23:11:45 -0800 | [diff] [blame] | 110 | |
Lee Mracek | 6821fe0 | 2018-11-01 17:27:30 -0400 | [diff] [blame] | 111 | robot_downloader( |
Brian Silverman | f819b44 | 2019-01-20 16:51:04 -0800 | [diff] [blame] | 112 | start_binaries = [ |
| 113 | ":joystick_reader", |
| 114 | ":wpilib_interface", |
| 115 | "//y2017/control_loops/drivetrain:drivetrain", |
| 116 | "//y2017/control_loops/superstructure:superstructure", |
| 117 | "//y2017/actors:autonomous_action", |
| 118 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 119 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 120 | ) |
| 121 | |
| 122 | py_library( |
| 123 | name = "python_init", |
| 124 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 125 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 126 | visibility = ["//visibility:public"], |
Austin Schuh | 7b9a3ba | 2017-02-19 23:11:45 -0800 | [diff] [blame] | 127 | ) |