|
|
@ -126,11 +126,14 @@ class controller: |
|
|
|
print("Error: Light index '" + str(index) + "' out of range") |
|
|
|
print("Error: Light index '" + str(index) + "' out of range") |
|
|
|
|
|
|
|
|
|
|
|
def setPreset( presetID:str, index:int=-1 ): |
|
|
|
def setPreset( presetID:str, index:int=-1 ): |
|
|
|
|
|
|
|
if( PRESETS.get(presetID) ): |
|
|
|
if( index == -1 ): |
|
|
|
if( index == -1 ): |
|
|
|
for key in LIGHTS: |
|
|
|
for key in LIGHTS: |
|
|
|
controller.setLightPreset( key, presetID ) |
|
|
|
controller.setLightPreset( key, presetID ) |
|
|
|
else: |
|
|
|
else: |
|
|
|
controller.setLightPreset( index, presetID ) |
|
|
|
controller.setLightPreset( index, presetID ) |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
print("Error: Unknown preset '" + presetID + "'") |
|
|
|
|
|
|
|
|
|
|
|
def countLights(): |
|
|
|
def countLights(): |
|
|
|
return len(LIGHTS) |
|
|
|
return len(LIGHTS) |
|
|
|