diff --git a/README.md b/README.md index ae6d9b9..655726c 100644 --- a/README.md +++ b/README.md @@ -166,15 +166,20 @@ After compiling and uploading the programm to your hardware, you can connect via Read and follow the instructions throughout the config.h file and write down your results. Recompile after every step. +This calibration is supported by various debug outputs which can toggle on or off before compiling or during run time by sending the corresponding number via the serial interface. +All debug outputs are described at the top of your config_sample.h. + 1. Check and correct your pin out -> Refer to the pictures in the [Electronics](#electronics) section below. 2. Tune dead zone to avoid jittering 3. Getting min and max values for your joysticks - There is a semi-automatic approach, which returns you the minimum and maximum values seen within 15s. 4. Adjust sensitivity -5. Choose modifier function +5. Choose modifier function: + +Choose a modifier function with the help of the following picture. Note, that the Squared, Squared Tan and Cubed Tan function act like a deadzone filter, because small inputs are resulting in nearly zero output, which may reduced unwanted movements. +Also note, that some of those functions are already at their maximum output (and therefore limited), before the input reaches 350. +![picture illustrating the different modifier functions](pictures/modifierFunctions.svg) -This calibration is supported by various debug outputs which can toggle on or off before compiling or during run time by sending the corresponding number via the serial interface. -All debug outputs are described at the top of your config_sample.h. # Use the spacemouse ## Download the 3dconnexion driver on windows and mac diff --git a/pictures/modifierFunctions.ods b/pictures/modifierFunctions.ods new file mode 100644 index 0000000..c843005 Binary files /dev/null and b/pictures/modifierFunctions.ods differ diff --git a/pictures/modifierFunctions.svg b/pictures/modifierFunctions.svg new file mode 100755 index 0000000..2c701d7 --- /dev/null +++ b/pictures/modifierFunctions.svg @@ -0,0 +1,1009 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0,0 + 50,0 + 100,0 + 150,0 + 200,0 + 250,0 + 300,0 + 350,0 + 400,0 + 0,0 + 50,0 + 100,0 + 150,0 + 200,0 + 250,0 + 300,0 + 350,0 + 400,0 + Modifier Function + + + + + + Linear – 0Linear – 0 + Squared – 1Squared – 1 + Tan() - 2Tan() - 2 + Squared tan – 3Squared tan – 3 + Cubed tan – 4Cubed tan – 4 + x - input + result - output +like a deadzoneoutput limited to 350 diff --git a/spacemouse-keys/config_sample.h b/spacemouse-keys/config_sample.h index 041d38d..3a034e0 100644 --- a/spacemouse-keys/config_sample.h +++ b/spacemouse-keys/config_sample.h @@ -123,11 +123,12 @@ // Fifth calibration: Modifier Function // Modify resulting behaviour of spacemouse outputs the suppres small movements around zero and enforce big movements even more. +// Check the README.md for more details and a plot of the different functions. // (This function is applied on the resulting velocities and not on the direct input from the joysticks) // This should be at level 0 when starting the calibration! // 0: linear y = x [Standard behaviour: No modification] // 1: squared function y = x^2*sign(x) [altered squared function working in positive and negative direction] -// 2: tangent function: y = tan(x) [Results in a flat curve near zero but increases the more you are away from zero] +// 2: tangent function: y = tan(x) [Results in a linear curve near zero but increases the more you are away from zero] // 3: squared tangent function: y = tan(x^2*sign(X)) [Results in a flatter curve near zero but increases alot the more you are away from zero] // 4: cubed tangent function: y = tan(x^3) [Results in a very flat curve near zero but increases drastically the more you are away from zero] // Recommendation after tuning: MODFUNC 3