Make the round ring represent the lowest possible frequency band

This commit is contained in:
Peter Cai 2023-04-25 16:12:56 -04:00
parent 9a52cee239
commit 8a563711ee

View file

@ -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);
}
}