private static void UpdateLights()
        {
            int?newBrightness = null;
            ColorInformation colorInformation = new ColorInformation();

            switch (PartyOptions.activePartyOption.brightnessOptionIndex)
            {
            case 1:
                newBrightness = SetRandomBrightness();
                break;
            }

            switch (PartyOptions.activePartyOption.colorOptionIndex)
            {
            case 2:
                colorInformation = LightProcessingColor.SetRandomColorFromUIInput();
                break;
            }

            if (BridgeInformation.usedLights.Count > 0)
            {
                BasicLightController.SendCommonCommond();
            }

            if (newBrightness != null || colorInformation.rgbColor != null || colorInformation.colorTemperature != null)
            {
                PartyUIUpdater.UpdateOutputDisplay(newBrightness, colorInformation.rgbColor, colorInformation.colorTemperature);
            }
        }
Example #2
0
        private static ColorInformation ProcessInputDifferenceColor(double soundLevel)
        {
            ColorInformation colorInformation = new ColorInformation();

            double inputDifference = soundLevel - savedSoundLevel;

            if (inputDifference > PartyOptions.activePartyOption.colorDifferencePercent)
            {
                colorInformation = LightProcessingColor.SetRandomColorFromUIInput();
            }

            PartyUIUpdater.NewInputDifference(inputDifference);
            savedSoundLevel = soundLevel;

            return(colorInformation);
        }