blob: 0b9115001c001d96bc6aec4834cc2940f6c7fb01 [file] [log] [blame]
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
package(default_visibility = ["//visibility:public"])
static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops:profiled_subsystem_fbs",
],
)
static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
target_compatible_with = ["@platforms//os:linux"],
)
flatbuffer_ts_library(
name = "superstructure_status_ts_fbs",
srcs = [
"superstructure_status.fbs",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//frc971/control_loops:control_loops_ts_fbs",
"//frc971/control_loops:profiled_subsystem_ts_fbs",
"//frc971/control_loops/flywheel:flywheel_controller_status_ts_fbs",
],
)
static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops:profiled_subsystem_fbs",
"//frc971/control_loops/flywheel:flywheel_controller_status_fbs",
],
)
static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops:profiled_subsystem_fbs",
],
)
cc_library(
name = "superstructure_lib",
srcs = [
"superstructure.cc",
],
hdrs = [
"superstructure.h",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
":superstructure_goal_fbs",
":superstructure_output_fbs",
":superstructure_position_fbs",
":superstructure_status_fbs",
"//aos/containers:sized_array",
"//aos/events:event_loop",
"//frc971/control_loops:control_loop",
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops/drivetrain:drivetrain_status_fbs",
"//frc971/zeroing:absolute_and_absolute_encoder",
"//frc971/zeroing:absolute_encoder",
"//frc971/zeroing:pot_and_absolute_encoder",
"//y2020:constants",
"//y2020/control_loops/superstructure/hood:hood_encoder_zeroing_estimator",
"//y2020/control_loops/superstructure/shooter",
"//y2020/control_loops/superstructure/turret:aiming",
],
)
cc_binary(
name = "superstructure",
srcs = [
"superstructure_main.cc",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
":superstructure_lib",
"//aos:init",
"//aos/events:shm_event_loop",
],
)
cc_test(
name = "superstructure_lib_test",
srcs = [
"superstructure_lib_test.cc",
],
data = [
"//y2020:aos_config",
"@superstructure_replay",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
":superstructure_goal_fbs",
":superstructure_lib",
":superstructure_output_fbs",
":superstructure_position_fbs",
":superstructure_status_fbs",
"//aos:math",
"//aos/events/logging:log_reader",
"//aos/events/logging:log_writer",
"//aos/network:team_number",
"//aos/testing:googletest",
"//aos/time",
"//frc971/control_loops:capped_test_plant",
"//frc971/control_loops:control_loop_test",
"//frc971/control_loops:position_sensor_sim",
"//frc971/control_loops:team_number_test_environment",
"//frc971/control_loops/drivetrain:drivetrain_status_fbs",
"//frc971/control_loops/flywheel:flywheel_test_plant",
"//y2020/control_loops/superstructure/hood:hood_plants",
"//y2020/control_loops/superstructure/intake:intake_plants",
"//y2020/control_loops/superstructure/shooter:shooter_plants",
],
)
ts_project(
name = "turret_plotter",
srcs = ["turret_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//aos:configuration_ts_fbs",
"//aos/network/www:aos_plotter",
"//aos/network/www:colors",
"//aos/network/www:plotter",
"//aos/network/www:proxy",
"//aos/network/www:reflection_ts",
"@com_github_google_flatbuffers//reflection:reflection_ts_fbs",
"@com_github_google_flatbuffers//ts:flatbuffers_ts",
],
)
ts_project(
name = "finisher_plotter",
srcs = ["finisher_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//aos/network/www:aos_plotter",
"//aos/network/www:colors",
"//aos/network/www:proxy",
],
)
ts_project(
name = "accelerator_plotter",
srcs = ["accelerator_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//aos/network/www:aos_plotter",
"//aos/network/www:colors",
"//aos/network/www:proxy",
],
)
ts_project(
name = "hood_plotter",
srcs = ["hood_plotter.ts"],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//aos/network/www:aos_plotter",
"//aos/network/www:colors",
"//aos/network/www:proxy",
],
)
cc_binary(
name = "superstructure_replay",
srcs = ["superstructure_replay.cc"],
deps = [
":superstructure_lib",
"//aos:configuration",
"//aos:init",
"//aos/events:simulated_event_loop",
"//aos/events/logging:log_reader",
"//aos/network:team_number",
],
)