MobiFlight-Connector icon indicating copy to clipboard operation
MobiFlight-Connector copied to clipboard

Automatically recognize joystick devices based on device type alone, avoid orphaned serials dialog

Open tigert opened this issue 5 months ago • 2 comments

Is your feature request related to a problem? Please describe. When sharing pre-made configuration files for joystick devices, for example the WinWing panels, you get the orphaned serials dialog for a new config you download every time, even if you have just one panel of the type on your setup, because MobiFlight checks the serial number of all devices for a match when events are received or sent.

Describe the solution you'd like In case of known joystick devices, when checking a config for orphaned events, we could ignore the serial number if there is only one compatible device connected.

We should resort to the serial number in case you have many and thus the choice is ambiguous.

tigert avatar Jul 25 '25 19:07 tigert

This can be taken to a more generic level.

Mapping (suggestion) based on the controller name.

Since there is a possibility that one has two controllers with the same name connected, eg MCDU, Yoke, we gotta think about this.

Option 1: ask for a user interaction.

  1. Load a profile
  2. Detect missing devices
  3. Check for connected device types
  4. If connected device type(s) is/are found -> Dialog: Profile is using ACME-controller and found 1 ACME controller connected.

Confirm you want to use that one. (Yes) / No

-> if multiple devices are detected provide select option

Option 2) Silently assigning the best guess. Enumerate devices, take first match.

Option 2.1) Like 2) but a notification (toast) tells user about what happened.

In any case, we could have a dialog, that allows for remapping device to a different one.

Not only the orphaned/missing devices would show but all.


This is a quick brain dump. I am sure we can build on top of this.

DocMoebiuz avatar Jul 26 '25 07:07 DocMoebiuz

Yeah.

I like the idea of trying to be smarter with device selection - and you are right, its the same for arduino based devices of known type too - like the mini overhead. or the coreflight modules, or any other "known design" that comes with a bundled profile and a mfmc pin configuration file.

One could extend the "auto-switch profile for this aircraft" to "automatically match profiles of known devices with compatible aircraft" too if the matching was based on compatibility and not just the serial number.

tigert avatar Jul 26 '25 07:07 tigert