示例#1
0
from Wrappers import Corsair
from Wrappers import Razer
import time
from Wrappers.cue_sdk import *

Corsair.RequestControl()
Corsair.debugON()

RazerURI = Razer.geturi()
Razer.debugON()


def p1():
    while True:
        for i in range(170, 188, 1):

            Corsair.ledOn(i, 0, 255, 0, 0.01)
            Corsair.ledOn(i + 1, 0, 255, 0, 0.01)

        for i in range(170, 188, 1):
            Corsair.ledOn(i, 0, 0, 0, 0.01)
            Corsair.ledOn(i + 1, 0, 0, 0, 0.01)

        for i in range(188, 170, -1):
            Corsair.ledOn(i, 0, 255, 0, 0.01)
            Corsair.ledOn(i + 1, 0, 255, 0, 0.01)

        for i in range(188, 170, -1):
            Corsair.ledOn(i, 0, 0, 0, 0.01)
            Corsair.ledOn(i + 1, 0, 0, 0, 0.01)
示例#2
0
    def SDKInits(self, DEVLIST):
        global RazerURI
        ops = SDKops()

        ops.clearSDK()
        ops.SDKtypes(DEVLIST)

        if mainDebug:
            print(DEVLIST.sdks)

        if "RAZER" in DEVLIST.sdks:
            print("[INFO] RAZER Device Found. Initiating SDK")
            RazerURI = Razer.geturi()
            SDKS.Razer = True

            if "RAZER" in DEVLIST.mouse:
                SDKS.RazerMouse = True

            if "RAZER" in DEVLIST.headset:
                SDKS.RazerHeadSet = True

            if "RAZER" in DEVLIST.keyboard:
                SDKS.RazerKeybd = True

            if "RAZER" in DEVLIST.mousepad:
                SDKS.RazerMousePD = True

            if "RAZER" in DEVLIST.headsetstand:
                SDKS.RazerHeadSetStand = True

            if "RAZER" in DEVLIST.etc:
                SDKS.RazerETC = True

        if "CORSAIR" in DEVLIST.sdks:
            print("[INFO] CORSAIR Device Found. Requesting Control")
            Corsair.RequestControl()
            SDKS.Corsair = True

            if "CORSAIR" in DEVLIST.mouse:
                SDKS.CorsairMouse = True

            if "CORSAIR" in DEVLIST.headset:
                SDKS.CorsairHeadSet = True

            if "CORSAIR" in DEVLIST.keyboard:
                SDKS.CorsairKeybd = True

            if "CORSAIR" in DEVLIST.mousepad:
                SDKS.CorsairMousePD = True

            if "CORSAIR" in DEVLIST.headsetstand:
                SDKS.CorsairHeadSetStand = True

            if "CORSAIR" in DEVLIST.etc:
                SDKS.CorsairETC = True

        if ("CORSAIR" not in DEVLIST.sdks) and ("RAZER" not in DEVLIST.sdks):
            print(
                "[INFO] No Supported SDKs found. Only Razer and Corsair are supported right now."
            )
            print("[INFO] Exiting Program ...")
            exit(0)

        if mainDebug:
            print(vars(SDKS))