From 8a563711ee7b18e8ec202119395960b1e0ac4de3 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Tue, 25 Apr 2023 16:12:56 -0400 Subject: [PATCH] Make the round ring represent the lowest possible frequency band --- .../typeblog/lunatic/Manager/AnimationManager.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/net/typeblog/lunatic/Manager/AnimationManager.java b/src/net/typeblog/lunatic/Manager/AnimationManager.java index ecbaf9a..1b0c56b 100644 --- a/src/net/typeblog/lunatic/Manager/AnimationManager.java +++ b/src/net/typeblog/lunatic/Manager/AnimationManager.java @@ -272,11 +272,21 @@ public final class AnimationManager { mLEDManager.setBrightness((int) (dbValue * Constants.BRIGHTNESS * 100)); } + int lightId = mLEDManager.getNumLEDs() - i - 1; + + // Swap the ring with one of the smaller belts + // so that the ring represents the lowest frequencies + if (lightId == 4) { + lightId = 3; + } else if (lightId == 3) { + lightId = 4; + } + if (dbValue > 0.5) { enabledLEDs++; - mLEDManager.enableLED(mLEDManager.getNumLEDs() - i - 1, true); + mLEDManager.enableLED(lightId, true); } else { - mLEDManager.enableLED(mLEDManager.getNumLEDs() - i - 1, false); + mLEDManager.enableLED(lightId, false); } }