- View New Content
-
Getting Started
-
Tutorials
Tutorial Categories
Tutorials Main Page Installation and Setup Downloadable TutorialsROM Adjustments
Number of Balls Adjustments Volume Adjustments
-
Visual Pinball Tables
VP 8 Desktop Tables
All VPM Recreations VP Recreations VP/VPM MODs VP Originals ROMsVP 9 Desktop Tables
All VPM Recreations VP Recreations VP/VPM MODs VP Originals ROMsVP9 Cabinet Tables
All Full Screen Cabinet Full Screen B2S Cabinet Spanned Cabinet Tables Media Packs ROMsVPX Tables
All VPinMAME Recreations VPX- - /VPinMAME - MOD Tables VPX Recreations VPX Originals Media Packs ROMs VR
-
Frontend Media & Backglass
Media Packs
Complete Media Packs Wheel Logos VideosBackglasses
dB2S Animated Backglasses UVP Animated Backglasses Topper Images
- Future Pinball Tables
-
Design Resources
Main Resources
Table Templates Playfield Images Image Library Sound Library Key CodesVP Guides
VP8 Guide - English VP8 Guide - Deutsch VP9 Guide - English VP9.1.x Guide - English VP Object Guide VPM DocumentationFuture Pinball Resources
Playfield Images 3D Model LibraryFuture Pinball Guides
FP Script Guide Big Draco Script Guide FP Table Design Guide FP DMD Guide
- Other Features
- Bug Tracker
- Image Gallery
- Blogs
-
More
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.
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
- 18,269 Total Files
- 57 Total Categories
- 872 Total Authors
- 25,259,421 Total Downloads
- NFL (Stern 2001) Seahawks Superbowl Edition Latest File
- xenonph Latest Submitter
user(s) are online (in the past 15 minutes)
members, guests, anonymous users










are all trademarks of VPFORUMS.