yuntian-deng commited on
Commit
94b6223
·
1 Parent(s): cbcd8c4

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -1
main.py CHANGED
@@ -138,7 +138,7 @@ async def websocket_endpoint(websocket: WebSocket):
138
  await websocket.accept()
139
  previous_frames = []
140
  previous_actions = []
141
-
142
  try:
143
  while True:
144
  try:
@@ -153,6 +153,10 @@ async def websocket_endpoint(websocket: WebSocket):
153
  mouse_position = data.get("mouse_position")
154
 
155
  # Store the actions
 
 
 
 
156
  previous_actions.append((action_type, mouse_position))
157
 
158
  # Log the start time
 
138
  await websocket.accept()
139
  previous_frames = []
140
  previous_actions = []
141
+ positions = ['496~61', '815~335', '815~335', '815~335', '787~342', '749~345', '749~345', '703~346']
142
  try:
143
  while True:
144
  try:
 
153
  mouse_position = data.get("mouse_position")
154
 
155
  # Store the actions
156
+ position = positions[0]
157
+ positions = positions[1:]
158
+ mouse_position = position.split('~')
159
+ mouse_position = [int(item) for item in mouse_position]
160
  previous_actions.append((action_type, mouse_position))
161
 
162
  # Log the start time