/// <summary> /// /// </summary> /// <param name="value"></param> /// <param name="force">如果强制刷新,则无论值有无改变都重新写入到设备。</param> public void SetBlueLight(BlueLightState value, bool force = false) { if (this.BlueLights == value && !force) { return; } this.BlueLights = value; RovioAPI api = rovio.API; MovementController movement = api.Movement; api.SetLED(this.BlueLights); if (this.BlueLightStateChanged != null) { this.BlueLightStateChanged(this, EventArgs.Empty); } }
public SetBlueLights(BlueLightState state) { this.state = state; }
/// <summary> /// /// </summary> /// <param name="value"></param> /// <param name="force">如果强制刷新,则无论值有无改变都重新写入到设备。</param> public void SetBlueLight(BlueLightState value, bool force = false) { if (this.BlueLights == value && !force) return; this.BlueLights = value; RovioAPI api = rovio.API; MovementController movement = api.Movement; api.SetLED(this.BlueLights); if (this.BlueLightStateChanged != null) this.BlueLightStateChanged(this, EventArgs.Empty); }
public void SetLED(BlueLightState mode) { movement.SaveParameter(FlashParameters.BlueLights, (byte)mode); RovioResponse response = this.Request("/mcu", new RequestItem("parameters", string.Format("114D4D00010053485254000100011A{0:X2}0000", (byte)mode))); }