blob: c9929321eff6dc34618d7e08f134aa309393ac66 [file] [log] [blame]
James Kuszmaul7077d342021-06-09 20:23:58 -07001load("//aos:config.bzl", "aos_config")
Austin Schuh8f99c822024-05-05 22:43:40 -07002load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
James Kuszmaul7077d342021-06-09 20:23:58 -07003
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",
Austin Schuh99f7c6a2024-06-25 22:07:44 -070056 "@com_google_absl//absl/log",
57 "@com_google_absl//absl/log:check",
Austin Schuh3e45c752019-02-02 12:19:11 -080058 ],
John Park33858a32018-09-28 23:05:48 -070059)
Sabina Davis91b23602019-01-21 00:06:01 -080060
61cc_library(
Ravago Jones8c65c432023-03-25 17:35:39 -070062 name = "redundant_joystick_data",
63 srcs = [
64 "redundant_joystick_data.cc",
65 ],
66 hdrs = [
67 "redundant_joystick_data.h",
68 ],
69 target_compatible_with = ["@platforms//os:linux"],
70 deps = [
71 ":driver_station_data",
72 "//aos/events:event_loop",
73 ],
74)
75
76cc_library(
Sabina Davis91b23602019-01-21 00:06:01 -080077 name = "action_joystick_input",
78 srcs = ["action_joystick_input.cc"],
79 hdrs = ["action_joystick_input.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -080080 target_compatible_with = ["@platforms//os:linux"],
Sabina Davis91b23602019-01-21 00:06:01 -080081 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070082 ":drivetrain_input",
Ravago Jones8c65c432023-03-25 17:35:39 -070083 ":redundant_joystick_data",
Sabina Davis91b23602019-01-21 00:06:01 -080084 "//aos:init",
85 "//aos/actions:action_lib",
Sabina Davis91b23602019-01-21 00:06:01 -080086 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -070087 "//frc971/autonomous:auto_fbs",
Austin Schuhed5b26d2019-12-05 20:51:59 -080088 "//frc971/autonomous:auto_mode_fbs",
Sabina Davis91b23602019-01-21 00:06:01 -080089 "//frc971/autonomous:base_autonomous_actor",
Austin Schuh0a3c9d42021-07-15 22:36:24 -070090 "//frc971/input:joystick_input",
Sabina Davis91b23602019-01-21 00:06:01 -080091 ],
92)
James Kuszmaul7077d342021-06-09 20:23:58 -070093
James Kuszmaulf01da392023-12-14 11:22:14 -080094static_flatbuffer(
James Kuszmaul7077d342021-06-09 20:23:58 -070095 name = "robot_state_fbs",
96 srcs = ["robot_state.fbs"],
James Kuszmaul7077d342021-06-09 20:23:58 -070097 target_compatible_with = ["@platforms//os:linux"],
98)
99
James Kuszmaulf01da392023-12-14 11:22:14 -0800100static_flatbuffer(
James Kuszmaul7077d342021-06-09 20:23:58 -0700101 name = "joystick_state_fbs",
102 srcs = ["joystick_state.fbs"],
James Kuszmaul7077d342021-06-09 20:23:58 -0700103 target_compatible_with = ["@platforms//os:linux"],
104)
105
106aos_config(
Austin Schuhc5fa6d92022-02-25 14:36:28 -0800107 name = "aos_config",
James Kuszmaul7077d342021-06-09 20:23:58 -0700108 src = "robot_state_config.json",
109 flatbuffers = [
110 ":joystick_state_fbs",
111 ":robot_state_fbs",
112 ],
113 target_compatible_with = ["@platforms//os:linux"],
114 visibility = ["//visibility:public"],
Austin Schuhc5fa6d92022-02-25 14:36:28 -0800115 deps = ["//aos/events:aos_config"],
James Kuszmaul7077d342021-06-09 20:23:58 -0700116)