Send accel data every 3 frames instead of 5

This commit is contained in:
redphx 2022-04-27 17:35:52 +07:00
parent d7f71a41fb
commit 9583fd5529

View file

@ -257,7 +257,7 @@ class JoyDance:
if dt >= FRAME_DURATION:
break
last_time = time_now
frames = frames + 1 if frames < 5 else 1
frames = frames + 1 if frames < 3 else 1
if not self.should_start_accelerometer:
await asyncio.sleep(sleep_duration),
@ -299,7 +299,7 @@ class JoyDance:
if not self.should_start_accelerometer:
return
if frames < 5:
if frames < 3:
return
tmp_accel_data = []