elite-vr-cockpit icon indicating copy to clipboard operation
elite-vr-cockpit copied to clipboard

Set Speed #% does not work

Open dantman opened this issue 6 years ago • 8 comments

I believe the Set Speed Zero / Set Speed 75% / etc system buttons may not be working.

I don't think they are non-functional, I expect ED is receiving their keypresses. However I presume that because the throttle is an axis it overrides any button press based throttle changes.

We may want to intercept the Set Speed control buttons and make them update our throttle location instead of sending keypresses.

dantman avatar Sep 10 '18 12:09 dantman

for me the only one not working was Set Speed Zero, All others worked. My mappings in ED for Speeds are as follows NUMPAD_1 = -100% NUMPAD_2 = -75% NUMPAD_3 = -50% NUMPAD_4 = -25% NUMPAD_5 = Zero NUMPAD_6 = 25% NUMPAD_7 = 50% NUMPAD_8 = 75% NUMPAD_9 = 100%

Todd1215 avatar Oct 04 '18 15:10 Todd1215

We have numpad mappings: https://github.com/dantman/elite-vr-cockpit/blob/master/Assets/Scripts/KeyboardInterface.cs#L75-L84

I'm not sure why one speed binding would work but not others.

dantman avatar Oct 04 '18 19:10 dantman

Hello,

I removed all bindings in ED Setup and only this one

NUMPAD_1 = -100% NUMPAD_2 = -75% NUMPAD_3 = -50% NUMPAD_4 = -25% NUMPAD_5 = Zero NUMPAD_6 = 25% NUMPAD_7 = 50% NUMPAD_8 = 75% NUMPAD_9 = 100%

Throttle was not binded. ZeroSpeed still not working. So I think it can't be override but sometimes it seems to be working.

How can I debug the Project in Unity? If I start in Unity IDE the Scene EVCR it Crash always. best Regards Ferry

FerryIcker avatar Oct 23 '18 21:10 FerryIcker

You'll have to debug why it crashes. There's a Unity Editor log file you can find.

dantman avatar Oct 23 '18 21:10 dantman

Thanks for your fast answer. I read the logfile. It crash when i press the stop button in Unity IDE.

Unity Editor by Unity Technologies [version: Unity 2018.2.8f1_ae1180820377] vrclient_x64.dll caused an Access Violation (0xc0000005) in module vrclient_x64.dll at 0033:27bde545. Error occurred at 2018-10-23_231744. C:\Unity3D\Unity\Editor\Unity.exe, run by Ferry.

FerryIcker avatar Oct 23 '18 23:10 FerryIcker

Was this error ever resolved? I get this same error when stopping play mode.

yschuurmans avatar Jan 08 '20 15:01 yschuurmans

Thanks for your fast answer. I read the logfile. It crash when i press the stop button in Unity IDE.

Was this error ever resolved? I get this same error when stopping play mode.

Nvm, fixed it by disabling VR Support in Edit>project settings>player>XR settings>Virtual reality support

yschuurmans avatar Jan 08 '20 16:01 yschuurmans

Note, speed is used as percentage of speed in this comment

👋 I had an issue with the SetSpeedZero too, I need to do further testing with SetSpeedX.

From my understanding of the Journal API and how we interact with Elite Dangerous (i.e. through simulated keyboard joystick input).

Here's what I think is the interaction/data flow so far: image

One solution would be to not do 1-to-1 simulated input and keep the speed in the state of Elite VR Cockpit and only use the throttle axis input to set the speed. That would allow us to have a feedback loop on the virtual throttle, and set its handle properly, avoiding the user to 'update' the speed to a wrong one as soon as he grabs it because the position of the handle and the speed setpoint would be the same.

image

Another one would be for buttons to directly provide feedback to the virtual throttle at the same time that they set the speed. image (note, the button use SetHandle to avoid setting the speed twice).

Solution 1 v.s. Solution 2:

Solution 1 is more sturdy, thanks to the throttle feedback loop, we ensure that every component that needs to know the speed that it knows it. However, we repeat what ED is doing with the throttle. One could argue that the program should not know the speed and act as such.

Solution 2 is relatively lightweight and does not require too many changes (i.e. from my PoC, I would say that some specialization of ControlButton and the likes are enough to make it works reliably). It might be less sturdy because if the game doesn't "catch" the input we'll have then desync between the in-game and virtual throttles. However, it's keeping it simple and avoid having to double the state of the game.

My opinion

I would argue that Solution 2 is closer to what EDVRC is trying to accomplish, by being an input method. If the API were to evolve to include the throttle position/speed, yes it'll be nice to use a feedback loop to feed the virtual throttle fresh data.

Unexplored concerns

  • What if FlightAssist is off? How does the throttle behave in-game?
  • What if the 6DOF is being used?

louis-bompart avatar Jul 07 '20 18:07 louis-bompart