MobiFlight / MobiFlight-Connector

MobiFlight is an open source project that allows you to create your own home cockpit for your favorite flight simulator in a flexible, affordable and extremely user-friendly way.
https://mobiflight.com
MIT License
233 stars 104 forks source link

Event code updated in Hubhop is shown in MF Connector, but is shown as custom code, not as preset #718

Open JaimeLeon2 opened 2 years ago

JaimeLeon2 commented 2 years ago

Describe the bug After updating the code in one event for CJ4 ENG RUNSTOP button in Hubhop, updated the events in MF Connector, the code is displayed in MF Connector correctly, but is not flagged as a preset but rather as custom code.

Steps To Reproduce Steps to reproduce the behavior:

  1. Update event in Hubhop and save the modified event.
  2. Update events in MF Connector from Hubhop
  3. Use UI to select the modified event. Note that the preset is shown and the code is put correctly in the code box.

image

  1. Press Ok and save the config.
  2. Reenter the same config. Note the preset information is not displayed. The code box has the code, but it is shown as a customized event, not as a preset.

image

Expected behavior Event should be shown as a preset.

Actual behavior Event is shown as a customized event.

Details

Additional context none

MobiFlight-Admin commented 2 years ago

I know why it happens. It has a :1 which I convert into a :index because I assumed that the preset will not come with the specific :1 (inspired by the COM radio preset)

But I guess I should check without and with the :index replacement to see if i can find a config.

JaimeLeon2 commented 2 years ago

Yes, I think a generic event would have :index, but a specific airplane event would most likely have a pre-defined index.