Add 2022 joystick reader
Change-Id: I20a502c46a19c9b2e4170db3847eed740901e490
Signed-off-by: Henry Speiser <henry@speiser.net>
Signed-off-by: Milind Upadhyay <milind.upadhyay@gmail.com>
Signed-off-by: Ravago Jones <ravagojones@gmail.com>
diff --git a/y2022/BUILD b/y2022/BUILD
index cc3aa93..4589c98 100644
--- a/y2022/BUILD
+++ b/y2022/BUILD
@@ -1,9 +1,11 @@
load("//frc971:downloader.bzl", "robot_downloader")
load("//aos:config.bzl", "aos_config")
+load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("//tools/build_rules:template.bzl", "jinja2_template")
robot_downloader(
binaries = [
+ ":setpoint_setter",
"//aos/network:web_proxy_main",
],
data = [
@@ -147,6 +149,7 @@
name = "config_roborio",
src = "y2022_roborio.json",
flatbuffers = [
+ ":setpoint_fbs",
"//aos/network:remote_message_fbs",
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
@@ -252,6 +255,8 @@
":joystick_reader.cc",
],
deps = [
+ ":constants",
+ ":setpoint_fbs",
"//aos:init",
"//aos/actions:action_lib",
"//aos/logging",
@@ -267,6 +272,27 @@
],
)
+flatbuffer_cc_library(
+ name = "setpoint_fbs",
+ srcs = [
+ "setpoint.fbs",
+ ],
+ gen_reflections = 1,
+ target_compatible_with = ["@platforms//os:linux"],
+)
+
+cc_binary(
+ name = "setpoint_setter",
+ srcs = ["setpoint_setter.cc"],
+ target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":constants",
+ ":setpoint_fbs",
+ "//aos:init",
+ "//aos/events:shm_event_loop",
+ ],
+)
+
py_library(
name = "python_init",
srcs = ["__init__.py"],