Jump to content



Submitter

SUPPORT TOPIC File Information

  • Submitted: Jan 07 2014 01:40 AM
  • Last Updated: Jan 07 2014 01:40 AM
  • File Size: 115.26KB
  • Views: 2364
  • Downloads: 136

Download JoystickCenter 1.1

* * * * * 1 Votes
Nanotech calibration drift



Small utility to help keep Nanotech analog nudging centered/calibrated.  
 
Source is included for anyone who wants to mess around with it.    Note that I did just enough to make it do what I needed to do and nothing more.   It's ugly, dirty, filthy, proof-of-concept quality code.    If someone wants to take this and make it into a more user-friendly package knock yourself out!
 
Summary:
 
1) Sample the joystick input once every 30 seconds
2) Record those samples for 10 seconds
3) If any movement during those 10 seconds is above a threshold (i.e., you're nudging), stop and wait for things to settle.
4) If you make it through 10 seconds, average the readings and set the new center.   Rinse, repeat.
 
It has a UI so you can sort of see what it's doing.   At startup and runs and minimizes into your tray (as to not mess with Hyperpin).    If you open it you can see the numeric readings of your X and Y axis.   If you watch it in the first 10 seconds you should see it center itself.
 
The configuration constants are currently:
 
#define SAMPLES_TO_TAKE (30 * 10) 
#define MAX_DEVIATION 200
#define DELAYTIME (30 * 10)
#define ADJUST_THRESHOLD 5
 
This does mean your calibrations need to be in the ballpark (idle values no more than +- 200 off of actual center)  in order for it to start working.    You could set higher deviations, but that means the centers could get temporarily corrupted by gentle nudging.     
 
I have not seen any performance impact from this.  Its calculations are very light. 

What's New in Version 1.1 (See full changelog)

  • Version 1.0 - Initial Release
  • Version 1.1 - Prevent FPLaunch from closing







user(s) are online (in the past 15 minutes)

members, guests, anonymous users