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); } }
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); } }
// 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 } } }
public void LedOff() { m_nLedMode = LED_STATE.OFF; LedDraw(); }
public void LedDisable() { m_nLedMode = LED_STATE.DISABLED; LedDraw(); }
/// <summary> /// IBitmapLED interface implenentation /// </summary> public void LedOn() { m_nLedMode = LED_STATE.ON; LedDraw(); }
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); }