Convert aos over to flatbuffers
Everything builds, and all the tests pass. I suspect that some entries
are missing from the config files, but those will be found pretty
quickly on startup.
There is no logging or live introspection of queue messages.
Change-Id: I496ee01ed68f202c7851bed7e8786cee30df29f5
diff --git a/y2016/BUILD b/y2016/BUILD
index ee77f00..f3887b5 100644
--- a/y2016/BUILD
+++ b/y2016/BUILD
@@ -1,4 +1,5 @@
load("//frc971:downloader.bzl", "robot_downloader")
+load("//aos:config.bzl", "aos_config")
cc_library(
name = "constants",
@@ -34,16 +35,18 @@
"//aos/logging",
"//aos/time",
"//aos/util:log_interval",
- "//frc971/autonomous:auto_queue",
- "//frc971/control_loops/drivetrain:drivetrain_queue",
+ "//frc971/autonomous:auto_fbs",
+ "//frc971/control_loops/drivetrain:drivetrain_goal_fbs",
+ "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
"//frc971/queues:gyro",
"//y2016/actors:autonomous_action_lib",
"//y2016/actors:superstructure_action_lib",
"//y2016/actors:vision_align_action_lib",
- "//y2016/control_loops/shooter:shooter_queue",
+ "//y2016/control_loops/shooter:shooter_goal_fbs",
+ "//y2016/control_loops/superstructure:superstructure_goal_fbs",
"//y2016/control_loops/superstructure:superstructure_lib",
- "//y2016/control_loops/superstructure:superstructure_queue",
- "//y2016/queues:ball_detector",
+ "//y2016/control_loops/superstructure:superstructure_status_fbs",
+ "//y2016/queues:ball_detector_fbs",
],
)
@@ -65,6 +68,28 @@
],
)
+aos_config(
+ name = "config",
+ src = "y2016.json",
+ flatbuffers = [
+ "//y2016/control_loops/shooter:shooter_goal_fbs",
+ "//y2016/control_loops/shooter:shooter_output_fbs",
+ "//y2016/control_loops/shooter:shooter_position_fbs",
+ "//y2016/control_loops/shooter:shooter_status_fbs",
+ "//y2016/control_loops/superstructure:superstructure_goal_fbs",
+ "//y2016/control_loops/superstructure:superstructure_output_fbs",
+ "//y2016/control_loops/superstructure:superstructure_position_fbs",
+ "//y2016/control_loops/superstructure:superstructure_status_fbs",
+ "//y2016/queues:ball_detector_fbs",
+ "//y2017/vision:vision_fbs",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [
+ "//aos/robot_state:config",
+ "//frc971/control_loops/drivetrain:config",
+ ],
+)
+
cc_binary(
name = "wpilib_interface",
srcs = [
@@ -78,16 +103,16 @@
"//aos:math",
"//aos/controls:control_loop",
"//aos/logging",
- "//aos/logging:queue_logging",
- "//aos/robot_state",
+ "//aos/robot_state:robot_state_fbs",
"//aos/stl_mutex",
"//aos/time",
"//aos/util:log_interval",
"//aos/util:phased_loop",
"//aos/util:wrapping_counter",
- "//frc971/autonomous:auto_queue",
- "//frc971/control_loops:queues",
- "//frc971/control_loops/drivetrain:drivetrain_queue",
+ "//frc971/autonomous:auto_fbs",
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops/drivetrain:drivetrain_output_fbs",
+ "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
"//frc971/wpilib:ADIS16448",
"//frc971/wpilib:buffered_pcm",
"//frc971/wpilib:dma",
@@ -97,16 +122,18 @@
"//frc971/wpilib:gyro_sender",
"//frc971/wpilib:interrupt_edge_counting",
"//frc971/wpilib:joystick_sender",
- "//frc971/wpilib:logging_queue",
+ "//frc971/wpilib:logging_fbs",
"//frc971/wpilib:loop_output_handler",
"//frc971/wpilib:pdp_fetcher",
"//frc971/wpilib:sensor_reader",
"//frc971/wpilib:wpilib_robot_base",
"//third_party:wpilib",
"//y2016/control_loops/drivetrain:polydrivetrain_plants",
- "//y2016/control_loops/shooter:shooter_queue",
- "//y2016/control_loops/superstructure:superstructure_queue",
- "//y2016/queues:ball_detector",
+ "//y2016/control_loops/shooter:shooter_output_fbs",
+ "//y2016/control_loops/shooter:shooter_position_fbs",
+ "//y2016/control_loops/superstructure:superstructure_output_fbs",
+ "//y2016/control_loops/superstructure:superstructure_position_fbs",
+ "//y2016/queues:ball_detector_fbs",
],
)