Comments (10)
@MarcRiera It happens when the handle is at rest, and the controller is 100% functional, I've personally tested it on 3 different PlayStation 2s and an original PlayStation when I first got the controller. I also made sure to clean the contacts as well.
from openbve.
The problem is solved! I no longer have the issue with this new build
from openbve.
@MarcRiera will really have to look at this one.
from openbve.
@RetentiveGOAT Does it happen when moving the brake handle, or even with the controller at rest? Do you have a PlayStation to check that the controller works correctly? Could you please try cleaning the connector contacts for both the controller and the adapter?
Internally, for this controller model, brake notches are a combination of four buttons. The emergency brake notch is represented internally as all four buttons released, so OpenBVE is detecting that momentarily (for some reason) these buttons are released. I can't see where this could be failing in software, so maybe it's just dirt.
from openbve.
Thanks. I haven't recreated the issue 1:1, but I ran a couple of tests with a USB controller remapper I have that gave me problems in the past and I have an idea of what could be happening.
In my case, the adapter seems to spam the PC every few milliseconds, even when nothing changes, and I get input flickering. So, buttons that are pressed are briefly reported as released (and viceversa). The issue is not limited to OpenBVE, I can see it in other software with controller support on my PC, but it doesn't seem to occur on my Nintendo Switch. I guess certain adapters are just good enough for most situations, but behave oddly on certain OS/driver/software combinations.
I want to try to implement two solutions:
-
Add a small delay to input processing in the Densha plugin for classic controllers. Input is checked constantly on a loop. I suppose waiting a couple of iterations to check for flickering could mitigate the problem without adding excessive lag.
-
If 1 is not enough, allow applying emergency only above a certain brake notch (B6, for instance). This would eliminate the issue when applying power or braking moderately. Unless a faulty/altered controller is used, it's physically impossible to change from a low-medium brake notch to emergency on a single frame.
from openbve.
@RetentiveGOAT Could you please try this build? It includes a small delay before applying the emergency brake that I hope will mitigate the issue.
from openbve.
Gotcha I will try this now, and report back!!
from openbve.
Great, thanks for testing! I'll send the pull request with the patch so the fix is included in the next release.
from openbve.
Incidentally, @MarcRiera have you seen this:
SukkoPera/PsxNewLib#9
That suggests a 50ms delay (padded with FF FF FF in between) between actual raw data byte packets recieved from the controller when plugged into an Arduino.
I'd speculate that some (most?) adapters are dropping these.
from openbve.
Incidentally, @MarcRiera have you seen this: SukkoPera/PsxNewLib#9
That suggests a 50ms delay (padded with FF FF FF in between) between actual raw data byte packets recieved from the controller when plugged into an Arduino. I'd speculate that some (most?) adapters are dropping these.
I wasn't aware of that, thanks for pointing out. It's totally possible, the world of adapters is diverse and quality varies a lot between products.
from openbve.
Related Issues (20)
- If the train we are driving runs on a track other than Rail 0, it will move awkwardly.
- [Mono] RouteViewer Colored Rail Path Form, Display Checkbox not working HOT 4
- [Opinion and Bug] Point sound axis direction and unplayed point sound HOT 1
- [ERROR] critical error when loading this route HOT 6
- [Bug] Inconsistent style of description box HOT 2
- [Question] Differences in the sliding direction behavior of speedometer HOT 1
- StateChangeSound's Position operates on the 'Object' section one level above. HOT 2
- Hugo's Switch command help only exists in English HOT 1
- [Suggestion] .x model selectable options support HOT 4
- [Suggestion] Scale and Rotate for static models in .animated HOT 3
- [Bug] Converting XML cars with extra indentation characters HOT 3
- Crosshatch's route can't load at 1.10.1.0 HOT 3
- [ERROR] Objectviewer can no longer load extensions.cfg files HOT 2
- [Question] How do I connect MTC on Windows and Linux? HOT 8
- [Suggestion] Add icons to CarXmlConvertor, ObjectBender and Win32PluginProxy apps + Update all the 10 icons (with my icon; if it might be allowed) HOT 5
- [Bug] Some parts of legacy 2D panels not rendering correctly HOT 1
- [Suggestion] Jump to station via timetable double-click HOT 2
- [Bug] Strong freezes when changing between cameras HOT 3
- BVE5: Known Issues HOT 105
- [Suggestion] Joystick axis override control option
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 openbve.