blob: f827497279a1427e8b213fca3f42d6ab0976db8b [file] [log] [blame]
load("//aos:config.bzl", "aos_config")
load("//frc971:downloader.bzl", "robot_downloader")
robot_downloader(
binaries = [
"//aos/network:web_proxy_main",
"//aos/events/logging:log_cat",
],
data = [
":aos_config",
"@ctre_phoenix6_api_cpp_athena//:shared_libraries",
"@ctre_phoenix6_tools_athena//:shared_libraries",
],
dirs = [
"//y2022_bot3/actors:splines",
],
start_binaries = [
"//aos/events/logging:logger_main",
":joystick_reader",
":wpilib_interface",
"//y2022_bot3/control_loops/drivetrain:drivetrain",
"//y2022_bot3/control_loops/drivetrain:trajectory_generator",
],
target_compatible_with = ["@platforms//os:linux"],
)
robot_downloader(
name = "pi_download",
binaries = [
"//aos/events/logging:log_cat",
],
data = [
":aos_config",
],
start_binaries = [
"//aos/events/logging:logger_main",
"//aos/network:message_bridge_client",
"//aos/network:message_bridge_server",
"//aos/network:web_proxy_main",
],
target_compatible_with = ["//tools/platforms/hardware:raspberry_pi"],
target_type = "pi",
)
aos_config(
name = "aos_config",
src = "y2022_bot3.json",
flatbuffers = [
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
"//aos/network:timestamp_fbs",
"//frc971/input:robot_state_fbs",
],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
":config_imu",
":config_roborio",
],
)
aos_config(
name = "config_imu",
src = "y2022_bot3_imu.json",
flatbuffers = [
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
"//aos/network:timestamp_fbs",
"//aos/network:remote_message_fbs",
],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
"//aos/events:aos_config",
"//frc971/control_loops/drivetrain:aos_config",
],
)
aos_config(
name = "config_roborio",
src = "y2022_bot3_roborio.json",
flatbuffers = [
"//aos/network:remote_message_fbs",
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
"//aos/network:timestamp_fbs",
"//y2019/control_loops/drivetrain:target_selector_fbs",
"//y2022_bot3/control_loops/superstructure:superstructure_goal_fbs",
"//y2022_bot3/control_loops/superstructure:superstructure_output_fbs",
"//y2022_bot3/control_loops/superstructure:superstructure_position_fbs",
"//y2022_bot3/control_loops/superstructure:superstructure_status_fbs",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//aos/events:aos_config",
"//frc971/autonomous:aos_config",
"//frc971/control_loops/drivetrain:aos_config",
"//frc971/input:aos_config",
"//frc971/wpilib:aos_config",
],
)
cc_library(
name = "constants",
srcs = [
"constants.cc",
],
hdrs = [
"constants.h",
],
visibility = ["//visibility:public"],
deps = [
"//aos/mutex",
"//aos/network:team_number",
"//frc971:constants",
"//frc971/control_loops:pose",
"//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem",
"//frc971/shooter_interpolation:interpolation",
"//frc971/zeroing:pot_and_absolute_encoder",
"//y2022_bot3/control_loops/drivetrain:polydrivetrain_plants",
"//y2022_bot3/control_loops/superstructure/climber:climber_plants",
"//y2022_bot3/control_loops/superstructure/intake:intake_plants",
"@com_google_absl//absl/base",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
],
)
cc_binary(
name = "wpilib_interface",
srcs = [
"wpilib_interface.cc",
],
target_compatible_with = ["//tools/platforms/hardware:roborio"],
deps = [
":constants",
"//aos:init",
"//aos:math",
"//aos/events:shm_event_loop",
"//aos/logging",
"//aos/stl_mutex",
"//aos/time",
"//aos/util:log_interval",
"//aos/util:phased_loop",
"//aos/util:wrapping_counter",
"//frc971/autonomous:auto_mode_fbs",
"//frc971/control_loops:control_loop",
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops/drivetrain:drivetrain_position_fbs",
"//frc971/input:robot_state_fbs",
"//frc971/queues:gyro_fbs",
"//frc971/wpilib:ADIS16448",
"//frc971/wpilib:buffered_pcm",
"//frc971/wpilib:drivetrain_writer",
"//frc971/wpilib:encoder_and_potentiometer",
"//frc971/wpilib:interrupt_edge_counting",
"//frc971/wpilib:joystick_sender",
"//frc971/wpilib:logging_fbs",
"//frc971/wpilib:loop_output_handler",
"//frc971/wpilib:pdp_fetcher",
"//frc971/wpilib:sensor_reader",
"//frc971/wpilib:wpilib_interface",
"//frc971/wpilib:wpilib_robot_base",
"//third_party:phoenix",
"//third_party:wpilib",
"//y2022_bot3/control_loops/superstructure:superstructure_output_fbs",
"//y2022_bot3/control_loops/superstructure:superstructure_position_fbs",
],
)
cc_binary(
name = "joystick_reader",
srcs = [
":joystick_reader.cc",
],
deps = [
":constants",
"//aos:init",
"//aos/actions:action_lib",
"//aos/logging",
"//frc971/autonomous:auto_fbs",
"//frc971/autonomous:base_autonomous_actor",
"//frc971/control_loops:profiled_subsystem_fbs",
"//frc971/input:action_joystick_input",
"//frc971/input:drivetrain_input",
"//frc971/input:joystick_input",
"//y2022_bot3/control_loops/drivetrain:drivetrain_base",
"//y2022_bot3/control_loops/superstructure:superstructure_goal_fbs",
"//y2022_bot3/control_loops/superstructure:superstructure_status_fbs",
],
)
py_library(
name = "python_init",
srcs = ["__init__.py"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
sh_binary(
name = "log_web_proxy",
srcs = ["log_web_proxy.sh"],
data = [
":aos_config",
"//aos/network:log_web_proxy_main",
],
target_compatible_with = ["@platforms//os:linux"],
)