Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 1 | load("//frc971:downloader.bzl", "robot_downloader") |
| 2 | load("//aos:config.bzl", "aos_config") |
| 3 | load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") |
| 4 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
| 5 | |
| 6 | robot_downloader( |
| 7 | data = [ |
| 8 | ":config.json", |
| 9 | ], |
| 10 | start_binaries = [ |
| 11 | ":joystick_reader", |
| 12 | ":wpilib_interface", |
| 13 | "//y2020/control_loops/drivetrain:drivetrain", |
| 14 | "//y2020/control_loops/superstructure:superstructure", |
| 15 | "//y2020/actors:binaries", |
| 16 | ], |
| 17 | ) |
| 18 | |
| 19 | cc_library( |
| 20 | name = "constants", |
| 21 | srcs = [ |
| 22 | "constants.cc", |
| 23 | ], |
| 24 | hdrs = [ |
| 25 | "constants.h", |
| 26 | ], |
| 27 | visibility = ["//visibility:public"], |
| 28 | deps = [ |
| 29 | "//aos/logging", |
| 30 | "//aos/mutex", |
| 31 | "//aos/network:team_number", |
| 32 | "//frc971:constants", |
| 33 | "//frc971/control_loops:pose", |
| 34 | "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem", |
| 35 | "//y2020/control_loops/drivetrain:polydrivetrain_plants", |
| 36 | "@com_google_absl//absl/base", |
| 37 | ], |
| 38 | ) |
| 39 | |
| 40 | cc_binary( |
| 41 | name = "wpilib_interface", |
| 42 | srcs = [ |
| 43 | "wpilib_interface.cc", |
| 44 | ], |
| 45 | restricted_to = ["//tools:roborio"], |
| 46 | deps = [ |
| 47 | ":constants", |
| 48 | "//aos:init", |
| 49 | "//aos:make_unique", |
| 50 | "//aos:math", |
| 51 | "//aos/controls:control_loop", |
| 52 | "//aos/events:shm_event_loop", |
| 53 | "//aos/logging", |
| 54 | "//aos/robot_state:robot_state_fbs", |
| 55 | "//aos/stl_mutex", |
| 56 | "//aos/time", |
| 57 | "//aos/util:log_interval", |
| 58 | "//aos/util:phased_loop", |
| 59 | "//aos/util:wrapping_counter", |
| 60 | "//frc971/autonomous:auto_mode_fbs", |
| 61 | "//frc971/control_loops:control_loops_fbs", |
| 62 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
James Kuszmaul | a244a91 | 2020-01-18 13:50:50 -0800 | [diff] [blame^] | 63 | "//frc971/wpilib:ADIS16470", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 64 | "//frc971/wpilib:buffered_pcm", |
| 65 | "//frc971/wpilib:drivetrain_writer", |
| 66 | "//frc971/wpilib:encoder_and_potentiometer", |
| 67 | "//frc971/wpilib:interrupt_edge_counting", |
| 68 | "//frc971/wpilib:joystick_sender", |
| 69 | "//frc971/wpilib:logging_fbs", |
| 70 | "//frc971/wpilib:loop_output_handler", |
| 71 | "//frc971/wpilib:pdp_fetcher", |
| 72 | "//frc971/wpilib:sensor_reader", |
| 73 | "//frc971/wpilib:wpilib_interface", |
| 74 | "//frc971/wpilib:wpilib_robot_base", |
| 75 | "//third_party:phoenix", |
| 76 | "//third_party:wpilib", |
| 77 | "//y2020/control_loops/superstructure:superstructure_output_fbs", |
| 78 | "//y2020/control_loops/superstructure:superstructure_position_fbs", |
| 79 | ], |
| 80 | ) |
| 81 | |
| 82 | cc_binary( |
| 83 | name = "joystick_reader", |
| 84 | srcs = [ |
| 85 | ":joystick_reader.cc", |
| 86 | ], |
| 87 | deps = [ |
| 88 | "//aos:init", |
| 89 | "//aos/actions:action_lib", |
| 90 | "//aos/input:action_joystick_input", |
| 91 | "//aos/input:drivetrain_input", |
| 92 | "//aos/input:joystick_input", |
| 93 | "//aos/logging", |
| 94 | "//frc971/autonomous:auto_fbs", |
| 95 | "//frc971/autonomous:base_autonomous_actor", |
| 96 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 97 | "//y2020/control_loops/drivetrain:drivetrain_base", |
| 98 | "//y2020/control_loops/superstructure:superstructure_goal_fbs", |
| 99 | "//y2020/control_loops/superstructure:superstructure_status_fbs", |
| 100 | ], |
| 101 | ) |
| 102 | |
| 103 | aos_config( |
| 104 | name = "config", |
| 105 | src = "y2020.json", |
| 106 | flatbuffers = [ |
| 107 | "//y2020/control_loops/superstructure:superstructure_goal_fbs", |
| 108 | "//y2020/control_loops/superstructure:superstructure_output_fbs", |
| 109 | "//y2020/control_loops/superstructure:superstructure_position_fbs", |
James Kuszmaul | a244a91 | 2020-01-18 13:50:50 -0800 | [diff] [blame^] | 110 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 111 | "//y2020/control_loops/superstructure:superstructure_status_fbs", |
| 112 | ], |
| 113 | visibility = ["//visibility:public"], |
| 114 | deps = [ |
| 115 | "//aos/robot_state:config", |
| 116 | "//frc971/autonomous:config", |
| 117 | "//frc971/control_loops/drivetrain:config", |
| 118 | "//frc971/wpilib:config", |
| 119 | ], |
| 120 | ) |
| 121 | |
| 122 | py_library( |
| 123 | name = "python_init", |
| 124 | srcs = ["__init__.py"], |
| 125 | visibility = ["//visibility:public"], |
| 126 | ) |