コード例 #1
0
def get_status():
    pooferList = list()
    patternList = list()
    for pooferId in poofermapping.mappings:
        pooferList.append({
            "id":
            pooferId,
            "enabled":
            flames_controller.isPooferEnabled(pooferId),
            "active":
            flames_controller.isPooferActive(pooferId)
        })
    for patternName in pattern_manager.getPatternNames():
        patternList.append({
            "name":
            patternName,
            "enabled":
            flames_controller.isFlameEffectEnabled(patternName),
            "active":
            flames_controller.isFlameEffectActive(patternName)
        })
    return {
        "globalState": (not flames_controller.isStopped()),
        "poofers": pooferList,
        "patterns": patternList
    }
コード例 #2
0
def patternName_valid(patternName):
    return patternName in pattern_manager.getPatternNames()