Make candle turn off when nothing is happening
Change-Id: I4e56592cf231a0990631623b2fefc93f351e6634
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2023/control_loops/superstructure/led_indicator.cc b/y2023/control_loops/superstructure/led_indicator.cc
index 48bca1b..afd0201 100644
--- a/y2023/control_loops/superstructure/led_indicator.cc
+++ b/y2023/control_loops/superstructure/led_indicator.cc
@@ -34,7 +34,7 @@
config.brightnessScalar = 1.0;
candle_.ConfigAllSettings(config, 0);
- event_loop_->AddPhasedLoop([&](int) { DecideColor(); },
+ event_loop_->AddPhasedLoop([this](int) { DecideColor(); },
std::chrono::milliseconds(20));
}
@@ -177,9 +177,9 @@
DisplayLed(0, 0, 255);
return;
}
-
- return;
}
+
+ DisplayLed(0, 0, 0);
}
} // namespace y2023::control_loops::superstructure