valkirie / handheldcompanion Goto Github PK
View Code? Open in Web Editor NEWControllerService
License: Other
ControllerService
License: Other
Observed that on some devices the accelerometer data is much more noise then on others.
Possibly add filter:
Seems best to produce some logfiles with data, implement various filters in Python and plot and compare with original data to see if parameters are correct. Testing through the application is slow.
Example GTA V:
If on foot I want to use L2 to enable gyro.
If in car I want to use L1 to enable gyro.
So both buttons should enable gyro.
This feature is available within Steam's controller configuration and reWASD. Allowing the user to scale physical joystick, within given ranges to a different game input.
Example from Steam.
Example from reWASD.
The following "building blocks" could be used to to implement this in Controller Service
Front end
Back end
We can use various interpolations:
Other
Should improve code readability and then Euler angles can be removed from GUI <-> Service interface.
so I tried to remote play ps5. opened paladin. have enabled gyro in game setting.
I have confirmed that this is worked with dual sense that I plug into the aya neo.
so I plug the dual sense out, turn controllerservice on, and use the aya neo's controller. All buttons worked, except the gyro.
on the 1st page, the text "no gyrometer detected" and "no accelerometer detected" is unchecked and disabled.
is there some driver missing or something ?
I am trying to join the discord but the link has expired/is invalid.
Handheld Companion now features a "Always on" enable button option, however sometimes its nice to temporarily disable this to realign the device physically.
Adding a whole set of button toggle leads to a lot of clutter, perhaps a simple toggle "Motion disable button", when toggled it will enable always on greyed out (so the user can't change it) and then which ever buttons are ticked disable motion control.
Symptoms, old and newly created profiles crash when additional settings page is opened due to a null pointer exception (array has no contents).
Tested with latest main branch, create new profile, check file contents:
{ "name": "Kena: Bridge of Spirits", "path": "C:\\Games\\Kena Bridge of Spirits\\Kena\\Binaries\\Win64\\Kena-Win64-Shipping.exe", "executable": "Kena-Win64-Shipping.exe", "whitelisted": false, "use_wrapper": false, "gyrometer": 1, "accelerometer": 1, "steering": 0, "inverthorizontal": false, "invertvertical": false, "umc_enabled": false, "umc_input": 0, "umc_output": 0, "aiming_sensivity": 2, "aiming_intensity": 2, "aiming_array": [], "steering_max_angle": 30, "steering_power": 1, "steering_deadzone": 0, "steering_deadzone_compensation": 0, "mousehook_enabled": true, "mousehook_exclusive": false, "umc_trigger": 0 }
There is code that should run on profile creation to fill the array with linear values, but apparently it's not working?
Profile.cs:
public Profile() { if (aiming_array.Count == 0) { for (int i = 0; i < array_size; i++) { double value = (double)i / (double)(array_size - 1); ProfileVector vector = new ProfileVector(value, 0.5f); aiming_array.Add(vector);
Not sure how to fix.
Used by JoyShockMapper (and Overlay) with great results. HC could possibly benefit.
Right now there is sensitivity for the motion control algorithms, in the past there was a feature that used the device width of 2.5x for the X direction but that was no longer an option to use within the sensors due to sensor fusion algorithms requiring the unmultiplied amount.
Need to be careful and consider data that is sent to DSU server and steering.
When putting the Aya Neo in to a sleep or hibernate state the service will gracefully stop, and the stop is logged in the logs. however the service does not start on its own upon system wake and must be manually restarted each time.
Tested with version 842 and 842+some additional commits.
Not sure how I get my system in this state but I have the following situation.
Example with start stop service:
To bring back the devices, I start Controller Service (to enable the Cloak Device tick), then I untick Cloak device and then stop the service again. Alternatively always use Controller Service to have a controller available.
Have tried the following to fix this:
Perhaps the Uncloak on close tickbox stopped working some time ago? Perhaps my device got in this state and the flag for this condition is only swapped (if true, set false, if false set true) and not reset under different circumstances?
As reported by skaelee on Discord.
When I use dolphin or pcsx2 will controller service is emulating a ps4 controller pcsx2 and dolphin would'nt find the vibration motors at all for some reason but when I turn the controller service off it finds it with my regular xinput from the controller installed inside the aya
I (Casper) double checked, indeed with DS4 selected Dolphin does not see the motors, the regular Aya controller is OK.
Further feedback:
As you can see when using controller service emulating the ps4 controller with the aya controller cloaked or un cloaked the motor isn’t recognized
The automatically generated files:
ControllerHelper/ControllerHelper.Designer.cs
ControllerHelper/ControllerHelper.resx
Generate differently between developers. Causing issues when commiting/merging ease of comparison.
The generated files on my PC / IDE have the Windows format line ending, the ones in the repo feature Unix line endings.
Also observed this with regular files, but that can be fixed by either using advanced save and selecting the Unix line ending or adding CF line ending to a config file. But this does not fix the automatically generated files.
References:
https://docs.microsoft.com/en-us/visualstudio/ide/encodings-and-line-breaks?view=vs-2022
Device: Aya Neo
Service is enabled, Windows sees dualshock 4.
When I stop the service, windows sees XBox controller. But if I restart the device, windows sees Dualshock 4, even if I don't start controller Helper. Mouse control with ayaspace is super slow when that happens.
App is not running on startup.
Only solution is to delete the service.
After some debugging, figured out DeltaMilliseconds is actually an amount of seconds, with a 100 Hz frequency of the program it's usually around 0.01xx.
The naming is confusion, please improve. It's good practice in general to state the unit type in the variable name, also helpful with rad and deg.
Tested with 0.8.4.2.
Steps to reproduce
Most likely this is caused by the wanted feature where Controller Helper opens with previous window setting (stored in appdata).
Note that when the application is minimized to system tray and Windows is restarted with the same settings, it indeed starts in the system tray.
Steps to replicate:
This same issue happens during gameplay as well, regardless of the "Vibration Strength" slider setting or controller emulated. The same games rumble works when using the native controller.
Running windows 10 home 21H1 (Latest updates installed) and Controller Service 0.8.4.2
Deactivating a Profile would be nice.
This use to be the case and was super convenient. Somehow it no longer works.
New users will want certain information and settings first, some ideas and suggestions.
Idea to improve motion steering, either when the max is reached, or just before the max angles, the device could be vibrated to indicate to the user there is no need to rotate further. If possible, individual left and right vibrations and different intensity levels, scaled over an angle range.
Vibration inputMotor = new() { LeftMotorSpeed = (ushort)((e.LargeMotor * ushort.MaxValue / byte.MaxValue) * vibrationStrength), RightMotorSpeed = (ushort)((e.SmallMotor * ushort.MaxValue / byte.MaxValue) * vibrationStrength), }; physicalController.SetVibration(inputMotor);
physicalController is the SharpDX device
so either we create a physicalController object on Handheld Companion
Either we create a new pipemessage with a vibrations strength, duration
and you handle that pipemessage from the service, sending the vibration to physicalController object
Tested with a fresh install of 0842. After installation, go through Windows -> Remove program -> Uninstall Controller Service.
Controller service uninstall is performed (controller helper briefly opens?) and uninstall states complete.
Check C:\Program Files\Controller Service
After uninstall, performing a new install the user is (correctly) prompted that that the ControllerService folder already exists.
Observed while testing, right now pressing the delete profile button will instantly delete the profile. Pressing it by accident is possible, perhaps add a confirmation dialogue box?
Perhaps additionally move the viewport up to the top, to show a new profile is now selected? It's possible now to hit delete and not even see anything change.
This used to work, prior to "minimize on close" option was introduced. Right now it's not possible to close the application if "minimized on close" is ticked. Most likely this "Quit" option now also minimizes.
Observed with the latest release (need to go back a few to try where it did still work).
As title, going to gamepad-test.com with HID Mode Xbox360, no inputs are triggered and shown, sometimes the website does not even state xinput detected and just says no controller. Switching HID mode to DS4, the website works fine, switching back to Xbox360 HID, problem persists.
It would be nice to have an option to turn off windows notifications (the notification list, when swiping from the right, where also the quick settings are) or, at least, delete notifications automatically
for example if I emulate ds4 -> notification ds4
than I emulate X360 - notification ds4 and x360
in that case, delete ds4 notification
As title installing newer version over existing one resets user settings like run at startup and enable notification i.e. existing settings are not respected. Did not check this for profiles, could be also relevant there.
A setting that controller service starts, when I start the controller Helper program (yes, I know automatic and manual, but I want it to immediately start when I start the program) would be nice.
And maybe even stop service, when I close helper program.
Observed after installing and rebooting the latest application (0.8.1.6). Service is running (or not), opening the helper application with admin rights shows the icon in the system tray but clicking it makes it disappear. Tried uninstalling and installing again, same result.
This and #24
The current implementation gets it's smoothing implicitly from the (large) amount of bars used. Double check with some plots if this is sufficiently smooth, otherwise, add linear interpolation between them.
This ticket is more of a reminder to check this.
Certain games for me only work with certain (emulated) controller types:
Kena -> DS4
Split Second -> Xbox
Forza 5 -> Xbox
Emulators -> Whichever is configured
Would be nice if the HID change could be automated based on the applied profile, three options:
The install service button on the settings page of the Controller Helper has it's text turn black instead of greyed out when stopping <-> starting the controller service. Pressing the button does not seem to do anything, so it's probably a GUI state machine issue.
https://github.com/Valkirie/ControllerService/blob/main/ControllerHelper/ControllerHelper.cs#L979
Possible bug, possibly needed due to 3D models having a different Y Z axis as "up". Need to investigate.
To reproduce, disable controller from Ayaspace, start Controller Service either from Visual Studio or GUI.
GUI shows a loading circle and then no started Controller Service, starting from Visual Studio the following stack trace is shown:
[14:46:48 INF] ControllerService, Version=0.9.2.0, Culture=neutral, PublicKeyToken=null (0.9.2.0) [14:46:49 INF] HideDevice hiding USB\VID_045E&PID_02EA&IG_00\00&00&00000E45848BED7E [14:46:49 INF] HideDevice hiding HID\VID_045E&PID_02EA&IG_00\8&6D38B9C&0&0000 [14:46:50 INF] XInputGirometer initialised. Report interval set to 10ms [14:46:50 INF] XInputAccelerometer initialised. Report interval set to 10ms [14:46:50 INF] XInputInclinometer initialised. Report interval set to 10ms Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at System.Collections.Generic.List
1.get_Item(Int32 index) at ControllerService.ControllerService..ctor(ILogger1 logger, IHostApplicationLifetime lifetime) in C:\Users\caspe\Source\Repos\ControllerService\ControllerService\ControllerService.cs:line 119 at System.RuntimeMethodHandle.InvokeMethod(Object target, Span
1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at ControllerService.Program.Main(String[] args) in C:\Users\caspe\Source\Repos\ControllerService\ControllerService\Program.cs:line 38 C:\Users\caspe\Source\Repos\ControllerService\bin\ControllerService.exe (process 4956) exited with code -532462766. Press any key to close this window . . . `
Copy and pasted from discord
I tried using Ds4windows. I'm just curious.
It didn't recognize the virtual Dualshock 4, but my original. BUT now controller Helper doesn't start anymore. I uninstalled it, restarted, reinstalled it, restarted again, but nothing. I try to open it as administrator, it is for a couple seconds in the tray button right, but than disappear
PC is also super slow when it tries to start
I uninstalled also both nefarius programs, no dice.
I uploaded a .dmg file to discord.
I'm at a lost. :(
The code for the device width ratio of 2.5 is stil present, including a logging statement, but it's no longer used nor required.
With a default Windows install, or in my case, the Aya Neo, when installing new or updates of Controller Service windows blocks the install with a pop up. This is known as Windows SmartScreen which shows a warning when installing or running unsigned executable's.
See more here: https://vovsoft.com/blog/how-to-solve-windows-protected-your-pc/
After digging around for a bit, aside from disabling this protection in Windows, the better(?) option would be to have Windows/Microsoft know about Controller Service by providing it "Signed". Then it gets an improved reputation factor over time...
I apologize if this is the wrong area to ask this. I've been attempting to use this software to play PS4 games on my Aya Neo through PSNow. However, I get a wireless controller disconnected issue when attempting to play any PS4 game. The issue does not exist when navigating PSNow menus or PS3 games. Is there a solution?
The automatically generated files:
ControllerHelper/ControllerHelper.Designer.cs
ControllerHelper/ControllerHelper.resx
Generate differently between developers. Causing issues when commiting/merging ease of comparison.
The following line of code gets removed with my IDE.
this.toolTip1.SetToolTip(this.lb_touchpad, resources.GetString("lb_touchpad.ToolTip"));
With the recent fix for issue: #13, with pull request #34 the application does start minimized in the system tray, but also a very small window is shown in the bottom left of the system.
This is similar to early January (no ticket made), the application was also made really small when minimized was pressed, where the fix was: 12d05ac
Current WPF3D implamentation is with the basic version of Helix framework, which has a limited feature set and is CPU intensive: https://github.com/helix-toolkit/helix-toolkit/wiki/WPF-vs-WPF.SharpDX
One of the first improvements to do would be using a shadow map, which would create shadows from objects onto objects. Example of SharpDX: https://github.com/helix-toolkit/helix-toolkit/tree/develop/Source/Examples/WPF.SharpDX/ShadowMapDemo
What is a shadow map? https://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.