Send accel data every 3 frames instead of 5
This commit is contained in:
		
							parent
							
								
									d7f71a41fb
								
							
						
					
					
						commit
						9583fd5529
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -257,7 +257,7 @@ class JoyDance: | ||||||
|                 if dt >= FRAME_DURATION: |                 if dt >= FRAME_DURATION: | ||||||
|                     break |                     break | ||||||
|             last_time = time_now |             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: |             if not self.should_start_accelerometer: | ||||||
|                 await asyncio.sleep(sleep_duration), |                 await asyncio.sleep(sleep_duration), | ||||||
|  | @ -299,7 +299,7 @@ class JoyDance: | ||||||
|         if not self.should_start_accelerometer: |         if not self.should_start_accelerometer: | ||||||
|             return |             return | ||||||
| 
 | 
 | ||||||
|         if frames < 5: |         if frames < 3: | ||||||
|             return |             return | ||||||
| 
 | 
 | ||||||
|         tmp_accel_data = [] |         tmp_accel_data = [] | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue