tarinactrl

git clone https://git.tarina.org/tarinactrl
Log | Files | Refs

commit eb5459dc5e8134ee59d8755d935b5cac03f2fb30
parent c69c866d2ada38422082d0a3affe84bc09909af6
Author: rob <rob@tarina.org>
Date:   Mon, 19 Dec 2022 02:12:06 +0200

best

Diffstat:
Mtarinactrl.py | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tarinactrl.py b/tarinactrl.py @@ -25,6 +25,7 @@ newselected=0 mastersound=0 recording=None sleep=0.5 +rectime=None ##---------------Connection---------------------------------------------- @@ -54,15 +55,18 @@ def listenforclients(host, port, q): data = c.recv(1024) if not data: break - status = data + status = data.decode() c.close() q.put(status) break except: q.put('') -def printmenu(recording,selected,cameras,camselected): +def printmenu(recording,selected,cameras,camselected,serverstatus): print(term.home+term.on_red+term.clear) + print(time.time()) + print(rectime) + print(serverstatus) if recording != None: print("Camera "+ str(recording)+" is recording! Shut up. And Action!") a=0 @@ -164,6 +168,7 @@ def main(serverstatus): else: sendtocamera(i,port,'REC') recording=camselected + rectime=time.time() elif a == mastersound: sendtocamera(i,port,'STOP') if recording !=None: @@ -215,7 +220,7 @@ def main(serverstatus): sendtocamera(c,port,'PLACEHOLDER') a=a+1 camselected=newselected - printmenu(recording,selected,cameras,camselected) + printmenu(recording,selected,cameras,camselected,serverstatus) return serverstatus if __name__ == '__main__':