ignore the sound for now. event mechanism is working good with renderer.
This commit is contained in:
parent
550556e0e4
commit
5e8a04c54f
4 changed files with 151 additions and 10 deletions
|
|
@ -3,13 +3,23 @@ import os
|
|||
import random
|
||||
import time
|
||||
import socket
|
||||
import sys
|
||||
|
||||
delay = 0.1
|
||||
|
||||
if len(sys.argv) <= 1:
|
||||
print("usage: ./prog $NUM_SHOOTS [$FLOAT_DELAY_BETWEEN_SHOTS]")
|
||||
exit(1)
|
||||
|
||||
if len(sys.argv) > 2:
|
||||
delay = float(sys.argv[2])
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect(("192.168.0.191", 3490))
|
||||
|
||||
for i in range(100):
|
||||
for i in range(int(sys.argv[1])):
|
||||
a = random.randint(0, 360)
|
||||
msg = str(a) + " \r\n"
|
||||
s.send(msg.encode())
|
||||
time.sleep(0.1)
|
||||
time.sleep(delay)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue