blob: ccbd94d6a16c74bdb8c73a8f5565d5a08c1ccd60 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
Comran Morshed41ed7c22015-11-04 21:03:37 +00002
Philipp Schradercc016b32021-12-30 08:59:58 -08003package(default_visibility = ["//visibility:public"])
4
Alex Perrycb7da4b2019-08-28 19:35:56 -07005flatbuffer_cc_library(
6 name = "rollers_goal_fbs",
Austin Schuh55a13dc2019-01-27 22:39:03 -08007 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -07008 "rollers_goal.fbs",
Austin Schuh55a13dc2019-01-27 22:39:03 -08009 ],
Alex Perrycb7da4b2019-08-28 19:35:56 -070010 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080011 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -070012)
13
14flatbuffer_cc_library(
15 name = "rollers_position_fbs",
16 srcs = [
17 "rollers_position.fbs",
Austin Schuh55a13dc2019-01-27 22:39:03 -080018 ],
Alex Perrycb7da4b2019-08-28 19:35:56 -070019 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080020 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -070021)
22
23flatbuffer_cc_library(
24 name = "rollers_output_fbs",
25 srcs = [
26 "rollers_output.fbs",
27 ],
28 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080029 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -070030)
31
32flatbuffer_cc_library(
33 name = "rollers_status_fbs",
34 srcs = [
35 "rollers_status.fbs",
36 ],
37 gen_reflections = 1,
Philipp Schraderdada1072020-11-24 11:34:46 -080038 target_compatible_with = ["@platforms//os:linux"],
Comran Morshed41ed7c22015-11-04 21:03:37 +000039)
40
41cc_library(
Austin Schuh55a13dc2019-01-27 22:39:03 -080042 name = "rollers_lib",
43 srcs = [
44 "rollers.cc",
45 ],
46 hdrs = [
47 "rollers.h",
48 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080049 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh55a13dc2019-01-27 22:39:03 -080050 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070051 ":rollers_goal_fbs",
52 ":rollers_output_fbs",
53 ":rollers_position_fbs",
54 ":rollers_status_fbs",
Austin Schuh55a13dc2019-01-27 22:39:03 -080055 "//aos/logging",
Austin Schuh0a3c9d42021-07-15 22:36:24 -070056 "//frc971/control_loops:control_loop",
Austin Schuh55a13dc2019-01-27 22:39:03 -080057 ],
Comran Morshed41ed7c22015-11-04 21:03:37 +000058)
59
60cc_binary(
Austin Schuh55a13dc2019-01-27 22:39:03 -080061 name = "rollers",
62 srcs = [
63 "rollers_main.cc",
64 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080065 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh55a13dc2019-01-27 22:39:03 -080066 deps = [
67 ":rollers_lib",
68 "//aos:init",
Alex Perrycb7da4b2019-08-28 19:35:56 -070069 "//aos/events:shm_event_loop",
Austin Schuh55a13dc2019-01-27 22:39:03 -080070 ],
Comran Morshed41ed7c22015-11-04 21:03:37 +000071)