Comments (7)
USB will pretty much always be faster. That being said, there are 2 flags that you can set to speed things up. If you don't use the built in combo buttons function, Type this into the command line:
gpionext set combo_delay 0
Combo Delay is the period of time in milliseconds that the system will wait before sending controller events. This is so that you can map "A" → Button1, "B" → Button2, "C" → Button1+Button2. Without the delay its hard to trigger the "C" event because both "A" and "B" would have to be hit in the same millisecond. This will set the combo delay to 0. By default, the combo delay is 50 milliseconds.
If it's still not fast enough and you have good momentary switches in your buttons:
gpionext set debounce 1
Debounce is the amount of time in milliseconds that the system will stop watching for press events from your button. Momentary switches are mechanical by nature, so when you are starting to press the button there can be one or more false connections before the actual full button press. My switches are pretty good, so I have this set to 1. Default is 20 milliseconds
Hope this helps!
from gpionext.
OMG ... That did the trick !!!! =)
gpionext set combo_delay 0
That flag did remove all delay I had. I can still use my combo since I have a standalone SHIFT key for my combos.
from gpionext.
Great! Glad that worked for you.
from gpionext.
I have noticed the delay too, so I think I have a very basic idea that can make combos possible without delay. First of all I would not call this "combo", but something like "modifier buttons"
In most cases, you decide for 1 or 2 buttons to be modifiers of the other buttons. Somehow like "shift" or "alt" works in your keyboard, you press first the shift and then any other key. That is done in a way that as the shift key has no action by itself, you don't have to delay anything.
It would be nice to define "modifier buttons" so you can trigger commands. (been this the main goal for me)
Defining one "modifier buttons" instantly duplicates the number of buttons in the joystick. (most of the times more than enough to do some other crazy stuff with the joystick.
Just a thought !! (and a wish !!)
from gpionext.
yeah, I had toyed with the idea of adding shift registers to the config menu but it was difficult to convey to the user why there were suddenly extra buttons. so I figured they could just leave one or two buttons unused and assign them whenever they need a shift.
from gpionext.
DON'T GIVE UP !! ;o)
I understand what you mean, It would be confusing at least for the ones that decide to set a "shift" button. But you can just tell them at the time of the configuration that N new virtual buttons are going to be added to their device.
As we are talking about speeding up button reaction here, I wonder how fast is the python implementation compared to a real fast USB joystick?
from gpionext.
If you set everything to it's fastest (debounce=1/combo_delay 0) and have good momentary switches then there won't really be a discernible difference between that and usb on a linux machine, especially a raspberry pi (the raspberry pi doesn't even contain an real-time clock).
from gpionext.
Related Issues (20)
- GPIOnext and sudo commands not working correctly HOT 4
- Button combos not working HOT 4
- Buttons not detected as gamepad HOT 6
- Configuration not saving HOT 1
- Support for GPIO expanders? HOT 2
- install.sh can't run without internet HOT 2
- 'dtoverlay=act-led,gpio=4' makes "gpionext config" to fail HOT 14
- RetroPie Not Recognizing New Gampad HOT 2
- Install fails as per Jaycar instructions. Help. :) HOT 5
- Only two inputs work HOT 5
- Gamepads Detected but only Keyboard controls
- ModuleNotFoundError: No module named evdev HOT 5
- gpionext config doesn't detect gpio inputs HOT 3
- Gpio next syntax error raspberry pie 3 emulation station HOT 16
- Buttons effectively 'sticking' on - not detecting signal change HOT 1
- unable to map 2 player controlls on the same controller HOT 1
- inputs not working p0W HOT 2
- Update for Raspberry Pi 5? HOT 1
- Cannot Import name 'absinfo' from 'evdev'
- Syntax error during configuration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpionext.