reorganises and cleans up some parts of the code

This commit is contained in:
2025-10-31 10:16:50 +01:00
parent 750436732c
commit d7bf3977fc
4 changed files with 170 additions and 176 deletions

View File

@@ -45,7 +45,8 @@ while True:
header[16] = t_high & 0xff
header[17] = t_high >> 8
num_events = random.randint(0, 243)
# num_events = random.randint(0, 243)
num_events = 243
# update buffer length
buffer_length = 21 + num_events * 3
@@ -102,4 +103,4 @@ while True:
sock.sendto(bytes(tosend), ('127.0.0.1', 54321))
mv = memoryview(bytes(header)).cast('H')
print(f'Sent packet {mv[3]} with {num_events} events {base_timestamp}')
time.sleep(1)
# time.sleep(0.0005)