run encoder.apply_config on successful dir_find

This commit is contained in:
Oskar Weigl
2021-04-13 23:29:45 -04:00
committed by PAJohnson
parent fee2aa60dc
commit 26cd9ecbe9
3 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -74,8 +74,8 @@ void StatusLedController::update() {
} else {
// Slow blue pulsating
const uint32_t period_ms = 4096;
const uint8_t min_brightness = 64;
const uint8_t max_brightness = 180;
const uint8_t min_brightness = 50;
const uint8_t max_brightness = 160;
uint32_t brightness = std::abs((int32_t)(t % period_ms) - (int32_t)(period_ms / 2)) * (max_brightness - min_brightness) / (period_ms / 2) + min_brightness;
brightness = (brightness * brightness) >> 8; // eye response very roughly sqrt
status_led.set_color(rgb_t{0, 0, (uint8_t)brightness});