commit d4df262fb42e2b4715ec777f012fdcedf4b6aca5
parent efa6bc3a3fa194696e2e79c87042cfa207ece5c3
Author: rob <rob@tarina.org>
Date: Tue, 10 Jan 2023 01:40:58 +0200
poah
Diffstat:
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/tarinactrl.py b/tarinactrl.py
@@ -24,7 +24,7 @@ camselected=0
newselected=0
mastersound=0
recording=None
-sleep=0.1
+sleep=0.2
rectime=None
##---------------Connection----------------------------------------------
@@ -66,7 +66,7 @@ def listenforclients(host, port, q):
q.put('')
def printmenu(recording,selected,cameras,camselected,serverstatus,rectime):
- print(term.home+term.on_red+term.clear)
+ print(term.home+term.clear)
print(time.time())
print(rectime)
if serverstatus != None:
@@ -208,11 +208,13 @@ def main(serverstatus):
if c not in camerasoff:
if a == camselected:
if a == mastersound:
+ sendtocamera(c,port,'STOP')
time.sleep(sleep)
sendtocamera(c,port,'RECSOUND')
else:
+ sendtocamera(c,port,'STOP')
+ time.sleep(sleep)
sendtocamera(c,port,'PLACEHOLDER')
- sendtocamera(c,port,'STOP')
elif a == newselected:
if a == mastersound:
sendtocamera(c,port,'STOP')
@@ -220,11 +222,13 @@ def main(serverstatus):
sendtocamera(c,port,'REC')
recording=newselected
rectime=time.time()
- elif a == mastersound:
+ else:
+ if a == mastersound:
+ sendtocamera(c,port,'STOP')
+ time.sleep(sleep)
+ sendtocamera(c,port,'RECSOUND')
sendtocamera(c,port,'STOP')
time.sleep(sleep)
- sendtocamera(c,port,'RECSOUND')
- else:
sendtocamera(c,port,'PLACEHOLDER')
a=a+1
camselected=newselected