Ejemplo n.º 1
0
        public async void Cmd_Send_LedState_UnLoad(LED_STATE _State)
        {
            string strCmd = "LED_STATE UNLOAD " + _State.ToString();

            while (Seq_SendCommand(strCmd) == 0)
            {
                await Task.Delay(Loop_Delay);
            }
        }
Ejemplo n.º 2
0
        public async void Cmd_Send_LedState_Reserve(LED_STATE _State)
        {
            string strCmd = "LED_STATE RESERVE " + _State.ToString();

            while (Seq_SendCommand(strCmd) == 0)
            {
                await Task.Delay(Loop_Delay);
            }
        }
Ejemplo n.º 3
0
        // Responsible method for notifying registered objects of the event
        // Can be overridden by derived class
        protected virtual void OnLedChanged(LEDEventArgs e)
        {
            LED_STATE CurrentState = e.RetID();             // custom event arg

            // These are the LED state changes we choose to update on
            if ((CurrentState == LED_STATE.ON) |
                (CurrentState == LED_STATE.OFF) |
                (CurrentState == LED_STATE.DISABLED))
            {
                if (LedChanged != null)                         // if anyone has signed up to be
                {
                    LedChanged(this, e);                        //notified of an LED change
                }
            }
        }
Ejemplo n.º 4
0
 public void LedOff()
 {
     m_nLedMode = LED_STATE.OFF;
     LedDraw();
 }
Ejemplo n.º 5
0
 public void LedDisable()
 {
     m_nLedMode = LED_STATE.DISABLED;
     LedDraw();
 }
Ejemplo n.º 6
0
        /// <summary>
        /// IBitmapLED interface implenentation
        /// </summary>

        public void LedOn()
        {
            m_nLedMode = LED_STATE.ON;
            LedDraw();
        }
Ejemplo n.º 7
0
        public static RazerReport RazerChromaStandardSetLedState(LED_STORAGE storage, LEDS led_id, LED_STATE led_state)
        {
            RazerReport report = GetRazerReport(0x03, 0x00, 0x03);

            report.arguments[0] = (byte)storage;
            report.arguments[1] = (byte)led_id;
            report.arguments[2] = clamp_u8((byte)led_state, 0x00, 0x01);
            return(report);
        }