Add led_indicator to wpilib_interface
Signed-off-by: Maxwell Henderson <mxwhenderson@gmail.com>
Change-Id: Ia76a33fd4e583de839172060354606b76b56fdfa
diff --git a/y2023/BUILD b/y2023/BUILD
index d897c06..e92292b 100644
--- a/y2023/BUILD
+++ b/y2023/BUILD
@@ -297,6 +297,7 @@
"//third_party:phoenixpro",
"//third_party:wpilib",
"//y2023/control_loops/drivetrain:drivetrain_can_position_fbs",
+ "//y2023/control_loops/superstructure:led_indicator_lib",
"//y2023/control_loops/superstructure:superstructure_output_fbs",
"//y2023/control_loops/superstructure:superstructure_position_fbs",
],
diff --git a/y2023/wpilib_interface.cc b/y2023/wpilib_interface.cc
index 033d3d7..cd52cfd 100644
--- a/y2023/wpilib_interface.cc
+++ b/y2023/wpilib_interface.cc
@@ -56,6 +56,7 @@
#include "y2023/can_configuration_generated.h"
#include "y2023/constants.h"
#include "y2023/control_loops/drivetrain/drivetrain_can_position_generated.h"
+#include "y2023/control_loops/superstructure/led_indicator.h"
#include "y2023/control_loops/superstructure/superstructure_output_generated.h"
#include "y2023/control_loops/superstructure/superstructure_position_generated.h"
@@ -1026,6 +1027,8 @@
AddLoop(&can_output_event_loop);
+ // Thread 6
+ // Setup superstructure output
::aos::ShmEventLoop output_event_loop(&config.message());
output_event_loop.set_name("PWMOutputWriter");
SuperstructureWriter superstructure_writer(&output_event_loop);
@@ -1041,6 +1044,14 @@
AddLoop(&output_event_loop);
+ // Thread 7
+ // Setup led_indicator
+ ::aos::ShmEventLoop led_indicator_event_loop(&config.message());
+ led_indicator_event_loop.set_name("LedIndicator");
+ control_loops::superstructure::LedIndicator led_indicator(
+ &led_indicator_event_loop);
+ AddLoop(&led_indicator_event_loop);
+
RunLoops();
}
};