Improve tracking
This commit is contained in:
		
							parent
							
								
									35906a79bd
								
							
						
					
					
						commit
						3ef500148d
					
				
					 2 changed files with 9 additions and 9 deletions
				
			
		|  | @ -293,11 +293,11 @@ class JoyDance: | ||||||
| 
 | 
 | ||||||
|             # Accelerator axes on phone & Joy-Con are different so we need to swap some axes |             # Accelerator axes on phone & Joy-Con are different so we need to swap some axes | ||||||
|             # https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/imu_sensor_notes.md |             # https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/imu_sensor_notes.md | ||||||
|             accel = accels[2] |             for accel in accels: | ||||||
|             x = accel[1] * -1 |                 x = accel[1] * -1 | ||||||
|             y = accel[0] |                 y = accel[0] | ||||||
|             z = accel[2] |                 z = accel[2] | ||||||
|             self.accel_data.append([x, y, z]) |                 self.accel_data.append([x, y, z]) | ||||||
|         except OSError: |         except OSError: | ||||||
|             self.disconnect() |             self.disconnect() | ||||||
|             return |             return | ||||||
|  |  | ||||||
|  | @ -14,10 +14,10 @@ WS_SUBPROTOCOLS = {} | ||||||
| WS_SUBPROTOCOLS[WsSubprotocolVersion.V1.value] = 'v1.phonescoring.jd.ubisoft.com' | WS_SUBPROTOCOLS[WsSubprotocolVersion.V1.value] = 'v1.phonescoring.jd.ubisoft.com' | ||||||
| WS_SUBPROTOCOLS[WsSubprotocolVersion.V2.value] = 'v2.phonescoring.jd.ubisoft.com' | WS_SUBPROTOCOLS[WsSubprotocolVersion.V2.value] = 'v2.phonescoring.jd.ubisoft.com' | ||||||
| 
 | 
 | ||||||
| FRAME_DURATION = 1 / 60 | FRAME_DURATION = 0.015 | ||||||
| SEND_FREQ_MS = 0.005 | SEND_FREQ_MS = 0.05 | ||||||
| ACCEL_ACQUISITION_FREQ_HZ = 60  # Hz | ACCEL_ACQUISITION_FREQ_HZ = 200  # Hz | ||||||
| ACCEL_ACQUISITION_LATENCY = 40  # ms | ACCEL_ACQUISITION_LATENCY = 0  # ms | ||||||
| ACCEL_MAX_RANGE = 8  # ±G | ACCEL_MAX_RANGE = 8  # ±G | ||||||
| 
 | 
 | ||||||
| DEFAULT_CONFIG = { | DEFAULT_CONFIG = { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue