blob: 7565daf37550a83c0ca36de9ba238e284386d39c [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"],
Austin Schuh14d7d3d2020-09-10 18:14:36 -070010 data = [":config"],
Philipp Schraderdada1072020-11-24 11:34:46 -080011 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh55a13dc2019-01-27 22:39:03 -080012 deps = [
13 ":basic",
James Kuszmaul78e29ac2020-07-28 21:07:03 -070014 ":basic_goal_fbs",
15 ":basic_output_fbs",
16 ":basic_position_fbs",
17 ":basic_status_fbs",
James Kuszmaul61750662021-06-21 21:32:33 -070018 "//frc971/control_loops:control_loop_test",
Alex Perrycb7da4b2019-08-28 19:35:56 -070019 "//aos/events:shm_event_loop",
Austin Schuh55a13dc2019-01-27 22:39:03 -080020 "//aos/testing:googletest",
21 "//frc971/control_loops:state_feedback_loop",
22 "//frc971/control_loops:team_number_test_environment",
23 ],
Parker Schuh18dbbb42017-10-18 21:45:33 -070024)
25
26cc_library(
Austin Schuh55a13dc2019-01-27 22:39:03 -080027 name = "basic",
28 srcs = ["basic.cc"],
29 hdrs = ["basic.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -080030 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh55a13dc2019-01-27 22:39:03 -080031 deps = [
James Kuszmaul78e29ac2020-07-28 21:07:03 -070032 ":basic_goal_fbs",
33 ":basic_output_fbs",
34 ":basic_position_fbs",
35 ":basic_status_fbs",
James Kuszmaul61750662021-06-21 21:32:33 -070036 "//frc971/control_loops:control_loop",
Austin Schuh55a13dc2019-01-27 22:39:03 -080037 ],
Parker Schuh18dbbb42017-10-18 21:45:33 -070038)
39
Alex Perrycb7da4b2019-08-28 19:35:56 -070040flatbuffer_cc_library(
James Kuszmaul78e29ac2020-07-28 21:07:03 -070041 name = "basic_goal_fbs",
Austin Schuh55a13dc2019-01-27 22:39:03 -080042 srcs = [
James Kuszmaul78e29ac2020-07-28 21:07:03 -070043 "basic_goal.fbs",
44 ],
45 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080046 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul78e29ac2020-07-28 21:07:03 -070047)
48
49flatbuffer_cc_library(
50 name = "basic_output_fbs",
51 srcs = [
52 "basic_output.fbs",
53 ],
54 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080055 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul78e29ac2020-07-28 21:07:03 -070056)
57
58flatbuffer_cc_library(
59 name = "basic_status_fbs",
60 srcs = [
61 "basic_status.fbs",
62 ],
63 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080064 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul78e29ac2020-07-28 21:07:03 -070065)
66
67flatbuffer_cc_library(
68 name = "basic_position_fbs",
69 srcs = [
70 "basic_position.fbs",
71 ],
72 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080073 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul78e29ac2020-07-28 21:07:03 -070074)
75
76aos_config(
77 name = "config",
78 src = "codelab.json",
79 flatbuffers = [
80 ":basic_goal_fbs",
81 ":basic_position_fbs",
82 ":basic_status_fbs",
83 ":basic_output_fbs",
84 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080085 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul78e29ac2020-07-28 21:07:03 -070086 deps = [
James Kuszmaul7077d342021-06-09 20:23:58 -070087 "//frc971/input:config",
Austin Schuh55a13dc2019-01-27 22:39:03 -080088 ],
Parker Schuh18dbbb42017-10-18 21:45:33 -070089)