mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-26 23:19:33 +00:00
upgrade
This commit is contained in:
@@ -8,6 +8,7 @@ sock.send(bytes('left','utf-8'))
|
||||
command = ''
|
||||
def receive():
|
||||
global command
|
||||
|
||||
try:
|
||||
while True:
|
||||
data = str(sock.recv(1024))
|
||||
@@ -21,12 +22,6 @@ def receive():
|
||||
data = str(sock.recv(1024))
|
||||
if b'stop' in data:
|
||||
xm.write(data[:data.index(b'stop')])
|
||||
|
||||
t_0 = Thread(target=animation)
|
||||
t_0.daemon = True
|
||||
t_0.start()
|
||||
|
||||
time.sleep(2)
|
||||
break
|
||||
else:
|
||||
xm.write(data)
|
||||
@@ -40,7 +35,7 @@ def receive():
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
||||
except:
|
||||
print('er')
|
||||
sock.close()
|
||||
@@ -49,13 +44,11 @@ def receive():
|
||||
led.off()
|
||||
sock.close()
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
pass
|
||||
|
||||
|
||||
def
|
||||
|
||||
|
||||
if __name__==__main__:
|
||||
main()
|
||||
t_0 = Thread(target=receive)
|
||||
t_0.daemon = True
|
||||
t_0.start()
|
||||
|
||||
|
||||
@@ -53,7 +53,9 @@ def read_animation_file():
|
||||
'blue': blue,
|
||||
'yaw': yaw
|
||||
})
|
||||
|
||||
def frame()
|
||||
global frames
|
||||
return frames
|
||||
|
||||
if __name__ == '__main__':
|
||||
read_animation_file()
|
||||
|
||||
Reference in New Issue
Block a user