Commit 48300134 authored by Vyskocil, Dr. Jiri (FWU) - 18565's avatar Vyskocil, Dr. Jiri (FWU) - 18565
Browse files

open day

parent 85fa72d2
......@@ -94,11 +94,13 @@ def peek(data):
blobiness = np.add.reduceat(np.add.reduceat(data, indices_rows, 0), indices_cols, 1)
blobiness = blobiness / (step_cols * step_rows)
storage = np.append(storage, np.atleast_3d(blobiness), axis=2)
rotation_speed = np.sum(blobiness[:, 0]) - np.sum(blobiness[:, 4]) * 0.01
rotation_speed = np.clip(rotation_speed, -0.05, 0.05)
rotation_speed = (np.sum(blobiness[:, 0])-10) * 0.0003
rotation_speed = np.clip(rotation_speed, -0.002, 0.002)
asyncio.run(send_rotation(rotation_speed))
tint = np.sum(blobiness[:, 2]) * 0.1
asyncio.run(send_tint(tint))
if DEBUG:
print(np.sum(blobiness[:, 0]), np.sum(blobiness[:, 4]), np.sum(blobiness[:, 2]), rotation_speed, tint)
if __name__ == '__main__':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment