blob: 90e5ce67aacaee97d4c793858ac612ea5ff7c5ce [file] [log] [blame]
James Kuszmaul7077d342021-06-09 20:23:58 -07001load("//aos:config.bzl", "aos_config")
2load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
3
Philipp Schradercc016b32021-12-30 08:59:58 -08004package(default_visibility = ["//visibility:public"])
5
Brian Silverman100534c2015-09-07 15:51:23 -04006cc_library(
Austin Schuh3e45c752019-02-02 12:19:11 -08007 name = "joystick_input",
8 srcs = [
9 "joystick_input.cc",
10 ],
11 hdrs = [
12 "joystick_input.h",
13 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080014 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh3e45c752019-02-02 12:19:11 -080015 deps = [
James Kuszmaul7077d342021-06-09 20:23:58 -070016 ":robot_state_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -070017 "//aos/events:event_loop",
Austin Schuh3e45c752019-02-02 12:19:11 -080018 "//aos/logging",
Austin Schuh0a3c9d42021-07-15 22:36:24 -070019 "//frc971/input:driver_station_data",
Austin Schuh3e45c752019-02-02 12:19:11 -080020 ],
Brian Silverman100534c2015-09-07 15:51:23 -040021)
Sabina Davis92d2efa2017-11-04 22:35:25 -070022
23cc_library(
Austin Schuh3e45c752019-02-02 12:19:11 -080024 name = "drivetrain_input",
25 srcs = [
26 "drivetrain_input.cc",
27 ],
28 hdrs = [
29 "drivetrain_input.h",
30 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080031 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh3e45c752019-02-02 12:19:11 -080032 deps = [
James Kuszmaul7077d342021-06-09 20:23:58 -070033 ":robot_state_fbs",
Austin Schuh3e45c752019-02-02 12:19:11 -080034 "//aos:math",
Austin Schuh3e45c752019-02-02 12:19:11 -080035 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -070036 "//frc971/control_loops:control_loops_fbs",
Austin Schuh3e45c752019-02-02 12:19:11 -080037 "//frc971/control_loops/drivetrain:drivetrain_config",
Alex Perrycb7da4b2019-08-28 19:35:56 -070038 "//frc971/control_loops/drivetrain:drivetrain_goal_fbs",
39 "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
James Kuszmaul75a18c52021-03-10 22:02:07 -080040 "//frc971/control_loops/drivetrain:spline_goal_fbs",
Austin Schuh0a3c9d42021-07-15 22:36:24 -070041 "//frc971/input:driver_station_data",
Austin Schuh3e45c752019-02-02 12:19:11 -080042 ],
Sabina Davis92d2efa2017-11-04 22:35:25 -070043)
John Park33858a32018-09-28 23:05:48 -070044
45cc_library(
Austin Schuh3e45c752019-02-02 12:19:11 -080046 name = "driver_station_data",
47 srcs = [
48 "driver_station_data.cc",
49 ],
50 hdrs = [
51 "driver_station_data.h",
52 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080053 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh3e45c752019-02-02 12:19:11 -080054 deps = [
James Kuszmaul7077d342021-06-09 20:23:58 -070055 ":joystick_state_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -070056 "@com_github_google_glog//:glog",
Austin Schuh3e45c752019-02-02 12:19:11 -080057 ],
John Park33858a32018-09-28 23:05:48 -070058)
Sabina Davis91b23602019-01-21 00:06:01 -080059
60cc_library(
61 name = "action_joystick_input",
62 srcs = ["action_joystick_input.cc"],
63 hdrs = ["action_joystick_input.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -080064 target_compatible_with = ["@platforms//os:linux"],
Sabina Davis91b23602019-01-21 00:06:01 -080065 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070066 ":drivetrain_input",
Sabina Davis91b23602019-01-21 00:06:01 -080067 "//aos:init",
68 "//aos/actions:action_lib",
Sabina Davis91b23602019-01-21 00:06:01 -080069 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -070070 "//frc971/autonomous:auto_fbs",
Austin Schuhed5b26d2019-12-05 20:51:59 -080071 "//frc971/autonomous:auto_mode_fbs",
Sabina Davis91b23602019-01-21 00:06:01 -080072 "//frc971/autonomous:base_autonomous_actor",
Austin Schuh0a3c9d42021-07-15 22:36:24 -070073 "//frc971/input:joystick_input",
Sabina Davis91b23602019-01-21 00:06:01 -080074 ],
75)
James Kuszmaul7077d342021-06-09 20:23:58 -070076
77flatbuffer_cc_library(
78 name = "robot_state_fbs",
79 srcs = ["robot_state.fbs"],
80 gen_reflections = 1,
81 target_compatible_with = ["@platforms//os:linux"],
82)
83
84flatbuffer_cc_library(
85 name = "joystick_state_fbs",
86 srcs = ["joystick_state.fbs"],
87 gen_reflections = 1,
88 target_compatible_with = ["@platforms//os:linux"],
89)
90
91aos_config(
92 name = "config",
93 src = "robot_state_config.json",
94 flatbuffers = [
95 ":joystick_state_fbs",
96 ":robot_state_fbs",
97 ],
98 target_compatible_with = ["@platforms//os:linux"],
99 visibility = ["//visibility:public"],
100 deps = ["//aos/events:config"],
101)