Permalink
Browse files

made voctolight command handling nicer

  • Loading branch information...
NHGmaniac committed May 26, 2018
1 parent 362f081 commit c2fbd11e6538ad0b7843fb48fd5e44b8517f323b
Showing with 9 additions and 7 deletions.
  1. +9 −7 example-scripts/voctolight/voctolight.py
@@ -70,16 +70,18 @@ def start_connection(tally_handler):
break
messages = message.split('\n')
message = messages[0]
message = messages[0].split()
if len(messages) != 0:
messages = messages[1:]
if message[:15] == 'composite_mode ':
tally_handler.set_state(message[15:])
elif message[:12] == 'video_status':
source_a, source_b = message[13:].split(' ')
tally_handler.video_change(source_a, source_b)
try:
if message[0] == 'composite_mode':
tally_handler.set_state(message[1])
elif message[0] == 'video_status':
source_a, source_b = message[1], message[2]
tally_handler.video_change(source_a, source_b)
except IndexError:
pass
if __name__ in '__main__':

0 comments on commit c2fbd11

Please sign in to comment.