blob: ac0b80cd0413e00f1f6fc83a9b72d09ab53e30e7 [file] [log] [blame]
Austin Schuh55a13dc2019-01-27 22:39:03 -08001package(default_visibility = ["//visibility:public"])
Parker Schuh18dbbb42017-10-18 21:45:33 -07002
Alex Perrycb7da4b2019-08-28 19:35:56 -07003load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
James Kuszmaul78e29ac2020-07-28 21:07:03 -07004load("//aos:config.bzl", "aos_config")
Parker Schuh18dbbb42017-10-18 21:45:33 -07005
6cc_binary(
Austin Schuh55a13dc2019-01-27 22:39:03 -08007 name = "basic_test",
8 testonly = 1,
9 srcs = ["basic_test.cc"],
James Kuszmaul78e29ac2020-07-28 21:07:03 -070010 data = [":config.json"],
Austin Schuh55a13dc2019-01-27 22:39:03 -080011 deps = [
12 ":basic",
James Kuszmaul78e29ac2020-07-28 21:07:03 -070013 ":basic_goal_fbs",
14 ":basic_output_fbs",
15 ":basic_position_fbs",
16 ":basic_status_fbs",
Austin Schuh55a13dc2019-01-27 22:39:03 -080017 "//aos/controls:control_loop_test",
Alex Perrycb7da4b2019-08-28 19:35:56 -070018 "//aos/events:shm_event_loop",
Austin Schuh55a13dc2019-01-27 22:39:03 -080019 "//aos/testing:googletest",
20 "//frc971/control_loops:state_feedback_loop",
21 "//frc971/control_loops:team_number_test_environment",
22 ],
Parker Schuh18dbbb42017-10-18 21:45:33 -070023)
24
25cc_library(
Austin Schuh55a13dc2019-01-27 22:39:03 -080026 name = "basic",
27 srcs = ["basic.cc"],
28 hdrs = ["basic.h"],
29 deps = [
James Kuszmaul78e29ac2020-07-28 21:07:03 -070030 ":basic_goal_fbs",
31 ":basic_output_fbs",
32 ":basic_position_fbs",
33 ":basic_status_fbs",
Austin Schuh55a13dc2019-01-27 22:39:03 -080034 "//aos/controls:control_loop",
35 ],
Parker Schuh18dbbb42017-10-18 21:45:33 -070036)
37
Alex Perrycb7da4b2019-08-28 19:35:56 -070038flatbuffer_cc_library(
James Kuszmaul78e29ac2020-07-28 21:07:03 -070039 name = "basic_goal_fbs",
Austin Schuh55a13dc2019-01-27 22:39:03 -080040 srcs = [
James Kuszmaul78e29ac2020-07-28 21:07:03 -070041 "basic_goal.fbs",
42 ],
43 gen_reflections = 1,
44)
45
46flatbuffer_cc_library(
47 name = "basic_output_fbs",
48 srcs = [
49 "basic_output.fbs",
50 ],
51 gen_reflections = 1,
52)
53
54flatbuffer_cc_library(
55 name = "basic_status_fbs",
56 srcs = [
57 "basic_status.fbs",
58 ],
59 gen_reflections = 1,
60)
61
62flatbuffer_cc_library(
63 name = "basic_position_fbs",
64 srcs = [
65 "basic_position.fbs",
66 ],
67 gen_reflections = 1,
68)
69
70aos_config(
71 name = "config",
72 src = "codelab.json",
73 flatbuffers = [
74 ":basic_goal_fbs",
75 ":basic_position_fbs",
76 ":basic_status_fbs",
77 ":basic_output_fbs",
78 ],
79 deps = [
80 "//aos/robot_state:config",
Austin Schuh55a13dc2019-01-27 22:39:03 -080081 ],
Parker Schuh18dbbb42017-10-18 21:45:33 -070082)