diff --git a/src/controllerSoftware/run.py b/src/controllerSoftware/run.py index b1031ed..36f22fb 100644 --- a/src/controllerSoftware/run.py +++ b/src/controllerSoftware/run.py @@ -35,6 +35,8 @@ def posColorByte(pos, section, color): async def setOnUserInput(client, chars): while True: configZone = input("Input Zone [Up, Down, Left, Right, Inner, Outer]: ") + if configZone not in list(LampArray.keys()): + continue configColor = input("Input Color [000000]: ") configColorCenter = input("Input Color for Center Lamp [000000]: ") await setLampToColor(client, chars, configZone, configColor, configColorCenter) @@ -106,7 +108,7 @@ async def connect_to_ble_device(device_name): # await setLampToColor(client, service.characteristics, Right, color) # await setLampToColor(client, service.characteristics, Inner, color) # await setLampToColor(client, service.characteristics, Outer, color) - if service.uuid != 1: + if service.handle != 1: await setOnUserInput(client, sorted_characteristics) else: