Skip to content

Commit

Permalink
Merge pull request #648 from gr8kingg/disable-blink
Browse files Browse the repository at this point in the history
Optionally disable status light blinks
  • Loading branch information
josephdadams authored Feb 5, 2024
2 parents 236ce92 + bafeea7 commit c45866d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions listener_clients/blink1-listener/blink1-listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
parser.add_argument(
"--disable-flash", action="store_true", help="Disable client listener flash"
)
parser.add_argument(
"--disable-status-blink", action="store_true", help="Disable all status light blinks"
)
parser.add_argument(
"--skip-blink1",
action="store_true",
Expand Down Expand Up @@ -155,6 +158,8 @@ def connect():
"supportsChat": False,
},
)
if args.disable_status_blink:
return
repeatNumber = 2
while repeatNumber:
repeatNumber = repeatNumber - 1
Expand All @@ -167,6 +172,8 @@ def connect():
@sio.event
def connect_error(data):
print("Unable to connect to Tally Arbiter server:", args.host, args.port)
if args.disable_status_blink:
return
doBlink(150, 150, 150)
time.sleep(0.3)
doBlink(0, 0, 0)
Expand All @@ -176,6 +183,8 @@ def connect_error(data):
@sio.event
def disconnect():
print("Disconnected from Tally Arbiter server:", args.host, args.port)
if args.disable_status_blink:
return
doBlink(255, 255, 255)
time.sleep(0.3)
doBlink(0, 0, 0)
Expand All @@ -185,6 +194,8 @@ def disconnect():
@sio.event
def reconnect():
print("Reconnected to Tally Arbiter server:", args.host, args.port)
if args.disable_status_blink:
return
repeatNumber = 2
while repeatNumber:
repeatNumber = repeatNumber - 1
Expand Down

0 comments on commit c45866d

Please sign in to comment.