Exemplo n.º 1
0
 public LifxLightStatus(LifxColor color, LifxPowerState powerState, UInt16 dimState, String label, UInt64 tags)
 {
     mColor      = color;
     mPowerState = powerState;
     mDimState   = dimState;
     mDimState   = dimState;
     mTags       = tags;
 }
Exemplo n.º 2
0
 public LifxLightStatus(LifxColor color, LifxPowerState powerState, UInt16 dimState, String label, UInt64 tags)
 {
     mColor = color;
     mPowerState = powerState;
     mDimState = dimState;
     mDimState = dimState;
     mTags = tags;
 }
Exemplo n.º 3
0
        public LifxLightStatus GetLightStatus()
        {
            LifxGetLightStatusCommand command = new LifxGetLightStatusCommand();

            LifxCommunicator.Instance.SendCommand(command, this);

            LifxLightStatusMessage lsMessage = (LifxLightStatusMessage)command.ReturnMessage;

            //HSLColor hslColor = new HSLColor((double)(lsMessage.Hue * 240 / 65535), (double)(lsMessage.Saturation * 240 / 65535), (double)(lsMessage.Lumnosity * 240 / 65535));

            LifxColor color = new LifxColor(lsMessage.Hue, lsMessage.Saturation, lsMessage.Lumnosity, lsMessage.Kelvin);

            LifxLightStatus lightsStatus = new LifxLightStatus(color, lsMessage.PowerState, lsMessage.Dim, lsMessage.Label, lsMessage.Tags);

            return(lightsStatus);
        }
Exemplo n.º 4
0
        public LifxLightStatus GetLightStatus()
        {

            LifxGetLightStatusCommand command = new LifxGetLightStatusCommand();

            LifxCommunicator.Instance.SendCommand(command, this);

            LifxLightStatusMessage lsMessage = (LifxLightStatusMessage)command.ReturnMessage;

            //HSLColor hslColor = new HSLColor((double)(lsMessage.Hue * 240 / 65535), (double)(lsMessage.Saturation * 240 / 65535), (double)(lsMessage.Lumnosity * 240 / 65535));

            LifxColor color = new LifxColor(lsMessage.Hue, lsMessage.Saturation, lsMessage.Lumnosity, lsMessage.Kelvin);

            LifxLightStatus lightsStatus = new LifxLightStatus(color, lsMessage.PowerState, lsMessage.Dim, lsMessage.Label, lsMessage.Tags);

            return lightsStatus;
                
        }
Exemplo n.º 5
0
        public void SetColor(LifxColor color, UInt32 fadeTime)
        {
            LifxSetLightStateCommand command = new LifxSetLightStateCommand(color.Hue, color.Saturation, color.Lumnosity, color.Kelvin, fadeTime);

            LifxCommunicator.Instance.SendCommand(command, this);
        }
Exemplo n.º 6
0
        public void SetColor(LifxColor color, UInt32 fadeTime)
        {

            LifxSetLightStateCommand command = new LifxSetLightStateCommand(color.Hue, color.Saturation, color.Lumnosity, color.Kelvin, fadeTime);

            LifxCommunicator.Instance.SendCommand(command, this);
        
        }