예제 #1
0
 public LifxLightStatus(LifxColor color, LifxPowerState powerState, UInt16 dimState, String label, UInt64 tags)
 {
     mColor      = color;
     mPowerState = powerState;
     mDimState   = dimState;
     mDimState   = dimState;
     mTags       = tags;
 }
예제 #2
0
 public LifxLightStatus(LifxColor color, LifxPowerState powerState, UInt16 dimState, String label, UInt64 tags)
 {
     mColor = color;
     mPowerState = powerState;
     mDimState = dimState;
     mDimState = dimState;
     mTags = tags;
 }
예제 #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);
        }
예제 #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;
                
        }
예제 #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);
        }
예제 #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);
        
        }