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/y2014/BUILD b/y2014/BUILD
index b11f170..1e1384b 100644
--- a/y2014/BUILD
+++ b/y2014/BUILD
@@ -1,4 +1,5 @@
load("//frc971:downloader.bzl", "robot_downloader")
+load("//aos:config.bzl", "aos_config")
cc_library(
name = "constants",
@@ -33,13 +34,14 @@
"//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_status_fbs",
"//frc971/queues:gyro",
"//y2014/actors:shoot_action_lib",
- "//y2014/control_loops/claw:claw_queue",
+ "//y2014/control_loops/claw:claw_goal_fbs",
+ "//y2014/control_loops/claw:claw_status_fbs",
"//y2014/control_loops/drivetrain:drivetrain_base",
- "//y2014/control_loops/shooter:shooter_queue",
+ "//y2014/control_loops/shooter:shooter_goal_fbs",
],
)
@@ -61,12 +63,32 @@
"hot_goal_reader.cc",
],
deps = [
+ "//aos:byteorder",
"//aos:init",
- "//aos/events:shm-event-loop",
+ "//aos/events:shm_event_loop",
"//aos/logging",
- "//aos/logging:queue_logging",
"//aos/time",
- "//y2014/queues:hot_goal",
+ "//y2014/queues:hot_goal_fbs",
+ ],
+)
+
+aos_config(
+ name = "config",
+ src = "y2014.json",
+ flatbuffers = [
+ "//y2014/control_loops/shooter:shooter_goal_fbs",
+ "//y2014/control_loops/shooter:shooter_output_fbs",
+ "//y2014/control_loops/shooter:shooter_position_fbs",
+ "//y2014/control_loops/shooter:shooter_status_fbs",
+ "//y2014/control_loops/claw:claw_goal_fbs",
+ "//y2014/control_loops/claw:claw_output_fbs",
+ "//y2014/control_loops/claw:claw_position_fbs",
+ "//y2014/control_loops/claw:claw_status_fbs",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [
+ "//aos/robot_state:config",
+ "//frc971/control_loops/drivetrain:config",
],
)
@@ -82,15 +104,15 @@
"//aos:make_unique",
"//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/control_loops:queues",
- "//frc971/control_loops/drivetrain:drivetrain_queue",
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops/drivetrain:drivetrain_output_fbs",
+ "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
"//frc971/wpilib:buffered_pcm",
"//frc971/wpilib:dma",
"//frc971/wpilib:dma_edge_counting",
@@ -99,16 +121,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_interface",
"//frc971/wpilib:wpilib_robot_base",
"//third_party:wpilib",
- "//y2014/control_loops/claw:claw_queue",
- "//y2014/control_loops/shooter:shooter_queue",
- "//y2014/queues:auto_mode",
+ "//y2014/control_loops/claw:claw_output_fbs",
+ "//y2014/control_loops/claw:claw_position_fbs",
+ "//y2014/control_loops/shooter:shooter_output_fbs",
+ "//y2014/control_loops/shooter:shooter_position_fbs",
+ "//y2014/queues:auto_mode_fbs",
],
)