From 716eb9c2ef6ac77600eb9c8c8f7e5a2aa9a42f88 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 8 Jul 2020 12:54:43 +0300 Subject: maybe figured out how ramp works --- force-effects.txt | 60 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 12 deletions(-) (limited to 'force-effects.txt') diff --git a/force-effects.txt b/force-effects.txt index 8181860..e8fe6f1 100644 --- a/force-effects.txt +++ b/force-effects.txt @@ -3,6 +3,10 @@ their USB commands. All values seem to be little-endian. Also, general note, it seems like some effects are affected by the direction of the force, denoted by *** +As far as I can tell, fade_level and attack_level values are calculated by +mapping the u16 into s16 and taking the absolute value, and after that +multiplying by the direction. + All values are examples of actual commands that I captured on the USB interface, not the only ones available. @@ -94,15 +98,16 @@ FF_RAMP: 60 00 - standard header 01 - ID 6b - new ramp effect - f6 7f - difference? *** - fe ff - level? ** (possibly starting_level?) + f6 7f - difference *** + fe ff - level? *** (level = (if end_level > start_level, end_level, else + start_level) - difference?) 00 00 - f7 17 - time? + f7 17 - time 00 80 - some kind of marker - 00 00 - attack_length? - f6 7f - attack_level but with difference? *** - 00 00 - fade_length? - f6 7f - fade_level but with difference? *** + 00 00 - attack_length + f6 7f - attack_level *** + 00 00 - fade_length + f6 7f - fade_level*** 04 - invert (going "down", 05, going "up", 04) 4f f7 17 - time again? @@ -121,7 +126,7 @@ FF_SPRING: fc 7f - negative coefficient (left?) fe ff - deadband (left?) (deadband + offset) (fe ff means no deadband) fe ff - deadband (right?) (deadband + offset) - a6 6a a6 6a fe ff fe ff fe ff fe ff df 58 a6 6a 06- some weird hard-coded + a6 6a a6 6a fe ff fe ff fe ff fe ff df 58 a6 6a 06 - some weird hard-coded values to do with springs? 4f @@ -160,10 +165,10 @@ FF_PERIODIC: 00 00 - offset of effect (forward/backward) e8 03 - period 00 80 - 00 00 - attack_length? - 00 00 - attack_level? *** - 00 00 - fade_length? - 00 00 - fade_level? *** + 00 00 - attack_length + 00 00 - attack_level *** + 00 00 - fade_length + 00 00 - fade_level *** 01 - type of periodic ( square 01, sine 03, triangle 02, @@ -202,3 +207,34 @@ Rotation angle: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +Open: + 60 01 - standard header? + 04 - ? + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + + (this command doesn't appear every time, odd) + 60 12 - ? + bf 04 00 00 03 b7 1e - ? + 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + + 60 01 - ? + 05 - ? + 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +Close: + 60 01 - standard header? + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + -- cgit v1.3