Add code for status led
Changes color based on the status of the robot.
Change-Id: Id8817f360fc1063f19117a020ed9a8210eb04f3c
Signed-off-by: Henry Speiser <henry@speiser.net>
diff --git a/y2022/wpilib_interface.cc b/y2022/wpilib_interface.cc
index b11dc3a..2e33db3 100644
--- a/y2022/wpilib_interface.cc
+++ b/y2022/wpilib_interface.cc
@@ -50,6 +50,7 @@
#include "frc971/wpilib/sensor_reader.h"
#include "frc971/wpilib/wpilib_robot_base.h"
#include "y2022/constants.h"
+#include "y2022/control_loops/superstructure/led_indicator.h"
#include "y2022/control_loops/superstructure/superstructure_can_position_generated.h"
#include "y2022/control_loops/superstructure/superstructure_output_generated.h"
#include "y2022/control_loops/superstructure/superstructure_position_generated.h"
@@ -702,6 +703,12 @@
AddLoop(&output_event_loop);
+ // Thread 5.
+ ::aos::ShmEventLoop led_indicator_event_loop(&config.message());
+ control_loops::superstructure::LedIndicator led_indicator(
+ &led_indicator_event_loop);
+ AddLoop(&led_indicator_event_loop);
+
RunLoops();
}
};