public Blink1Preset ToResponseType(byte[] responseData) { var color = Color.FromArgb(responseData[2], responseData[3], responseData[4]); var duration = new Blink1Duration(responseData[5], responseData[6]); return(new Blink1Preset(color, duration)); }
public EnableInactivityModeCommand(Blink1Duration waitDuration, bool maintainState, ushort startPosition, ushort endPosition) { this.waitDuration = waitDuration; this.maintainState = maintainState; this.startPosition = startPosition; this.endPosition = endPosition; }
public void ImplicitConversionToTimeSpan(uint timeInMilliseconds, uint expected) { var ts = TimeSpan.FromMilliseconds(timeInMilliseconds); var sut = new Blink1Duration(ts); TimeSpan actual = sut; Assert.Equal(expected, actual.TotalMilliseconds); }
public void LowIsSetCorrectlyFromTimeSpanCtorInput(uint timeInMilliseconds, byte expected) { var ts = TimeSpan.FromMilliseconds(timeInMilliseconds); var sut = new Blink1Duration(ts); var actual = sut.Low; Assert.Equal(expected, actual); }
public EnableInactivityModeCommand(Blink1Duration waitDuration) { this.waitDuration = waitDuration; }
public Blink1Preset(Color color, TimeSpan duration) { Color = color; this.duration = duration; }
public FadeToColorCommand(Color color, Blink1Duration duration, LEDPosition ledPosition) { this.color = color; this.duration = duration; this.ledPosition = ledPosition; }
public FadeToColorCommand(Color color, Blink1Duration duration) : this(color, duration, LEDPosition.Both) { }