コード例 #1
0
ファイル: RovioSettings.cs プロジェクト: sunsunsun000/rovio
        /// <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);
            }
        }
コード例 #2
0
ファイル: SetBlueLights.cs プロジェクト: sunsunsun000/rovio
 public SetBlueLights(BlueLightState state)
 {
     this.state = state;
 }
コード例 #3
0
ファイル: RovioSettings.cs プロジェクト: SaintLoong/rovio
        /// <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);
        }
コード例 #4
0
 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)));
 }
コード例 #5
0
ファイル: RovioAPI.Others.cs プロジェクト: SaintLoong/rovio
 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)));
 }