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
234 stars 104 forks source link

MF Connector can incorrectly show MF WASM module is installed (when it is not) #640

Closed ssewell closed 2 years ago

ssewell commented 2 years ago

Describe the bug If the MF WASM module isn't installed but the sim is running, MF Connector will indicate it the WASM module is installed, but communication with MSFS will be broken.

Steps To Reproduce Steps to reproduce the behavior:

  1. Remove mobiflight-event-module from the MSFS Community folder
  2. Launch MSFS and confirm the mobiflight-event-module isn't present in the DevMode packages image
  3. Launch MobiFlight and observe that it indicates that WASM module is present even though it's not installed image

Expected behavior Sim Status at the bottom of the MF window would indicate the WASM module is missing.

Actual behavior Sim Status at the bottom of the MF indicate the WASM module is installed.

Details

neilenns commented 2 years ago

I took a quick look at this and it's more complicated than I thought it would be. The "WASM Module (MSFS2020)" text isn't actually an indication of the WASM module being installed. It's simply the text shown to indicate that SimConnect is used to communicate with FS2020:

https://github.com/MobiFlight/MobiFlight-Connector/blob/3792b5630b08aca62e206d80aea2c1731f170113/UI/MainForm.cs#L700-L705

I'm not sure there's any property anywhere that actually indicates whether the WASM module is installed.

JaimeLeon2 commented 2 years ago

That is very weird. In my mind, I thought that the "MSFS2020 detected" flag was for SimConnect and the "WASM Module (MSFS2020)" flag was to indicate that the wasm module was installed and alive.

ssewell commented 2 years ago

Was a misunderstanding on my part as well. I'll keep this in the back of my mind, will investigate possibilities for detection. A few that come to mind:

DocMoebiuz commented 2 years ago

No, no - the green check mark should be the indication and I find it awkward too if the green check mark indicates that the WASM module is OK when it is not