• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Search results

  1. MaxPaperno

    MSFS20 DLL vs. WASM modules

    A WASM module already is a DLL. That's the only kind MSFS will load as part of a package. What other kind of DLL do you want to include and what do you want to do with it? Can you even link a WASM module to an external lib? I hadn't thought of that. But I'm not seeing how it could run...
  2. MaxPaperno

    MSFS20 SimConnect 3D Vector class/API

    PS. The actual FsVec* struct types are defined in MSFS_Core.h. MSFS_Vectors.h just has the op functions.
  3. MaxPaperno

    MSFS20 SimConnect 3D Vector class/API

    Ah... maybe in MSFS_SDK\WASM\include\MSFS\MSFS_Vector.h ? There are 2D and 3D float and double vector types and some basic ops. I don't see docs, but it's pretty straight forward. Looks like some Vfx functions make use of them. -Max
  4. MaxPaperno

    MSFS20 SimConnect 3D Vector class/API

    Hi Misho, Class? It ain't got no class... :-P It has a struct... https://docs.flightsimulator.com/html/Programming_Tools/SimConnect/API_Reference/Structures_And_Enumerations/SIMCONNECT_DATA_XYZ.htm And the corresponding type in...
  5. MaxPaperno

    MSFS20 Object creation via SimConnect, wasm & GPS tracking map

    PS. I have no idea what that memory usage is showing you... and I don't see any issues in the code. Your g_state struct is 64B and that would be on the stack anyway... what's on the heap? Probably some MSFS internals? SimConnect? Does the memory usage change during runtime (probably more...
  6. MaxPaperno

    MSFS20 Object creation via SimConnect, wasm & GPS tracking map

    Hi Cheyenne, Looks like you made good progress! OK, the WASM side looks pretty good, with just a couple minor comments. I'll tackle that first. (I'm just picking out what I see offhand... not actually testing any code.) You only need those on module_init() and module_deinit(). You want to...
  7. MaxPaperno

    MSFS20 Object creation via SimConnect, wasm & GPS tracking map

    PS. I just checked out the "CommBusAircraft" example from the latest MSFS SDK and it seems the JS API side has changed from what is currently documented at https://docs.flightsimulator.com/html/Programming_Tools/WASM/Communication_API/Communication_API.htm Or maybe that also still works, but...
  8. MaxPaperno

    MSFS20 Object creation via SimConnect, wasm & GPS tracking map

    Hi Cheyenne, I'm not seeing any Communication API code in here... 🧐 For example to set the JS value wasmReady from within the WASM module you'd need: In JS: function wasmReadyCallback() { wasmReady = true; } const wasmListener = RegisterViewListener('JS_LISTENER_COMM_BUS')...
  9. MaxPaperno

    MSFS20 Object creation via SimConnect, wasm & GPS tracking map

    Hi Cheyenne, glad that was helpful! So what does your code look like now? Did you set up that "Communication API" stuff? AFAIK there's no other way to communicate with a WASM module from JS/in-game panel. You'll need to set up a basic message exchange "protocol." Of course if there was a JS...
  10. MaxPaperno

    MSFS20 Object creation via SimConnect, wasm & GPS tracking map

    Hello Cheyenne, I think there's some confusion here... maybe it's on my part, but I suspect not at this point.. :) The WASM modules that run inside MSFS itself (such as you have there) cannot be called from JavaScript like that... they're running in a different process altogether. In fact...
  11. MaxPaperno

    MSFS20 C# SimConnect COM Exception 0xC00000B0 (Pipe Disconnected)

    Hi Manuel, Sure, consolidating all related SC access to one thread makes sense, as long as that thread itself doesn't try to send messages concurrently (using the SC instance for a lock(), for example). Or maybe just some helper function which does the actual SC calls inside a lock. Locking...
  12. MaxPaperno

    SimConnect_Text debug output

    Hard to say w/out seeing your code or knowing how, specifically, yours doesn't work. Does it compile? Is it a console app or have a console attached? 🤷‍♂️
  13. MaxPaperno

    SimConnect_Text debug output

    The Text() function doesn't work in MSFS2020 (it is listed as deprecated in current online SDK docs). Print debug info to stdout/stderr (console) or a log file. Or, in a GUI app, you could also use a temporary window/text widget. HTH, -Max
  14. MaxPaperno

    MSFS20 C# SimConnect COM Exception 0xC00000B0 (Pipe Disconnected)

    Hi Manuel, Yes, I think it would make sense to eliminate concurrency/threading issues first in this case. There may be something else going on as well, but multi-thread/concurrent access to same SimConnect instance should definitely be managed carefully (or avoided). You could probably just...
  15. MaxPaperno

    MSFS20 C# SimConnect COM Exception 0xC00000B0 (Pipe Disconnected)

    Hi Manuel, Ah, intermittent and hard to reproduce... bummer! :-( Clearly they're using it incorrectly! :) OK, and you can recover your app, so that's good. My guess based on this is that the SimConnect client instance has quietly crashed/terminated/disconnected (possibly in another...
  16. MaxPaperno

    MSFS20 C# SimConnect COM Exception 0xC00000B0 (Pipe Disconnected)

    Hi Manuel, I doubt we have enough information here for anyone to provide specific solutions. Assuming the exception is even related to multi-threading issues, these are generally not trivial to debug. Complete code, or perhaps better yet the simplest example which causes the issue, would...
  17. MaxPaperno

    MSFS20 Trying to get aircraft registration via SimConnect

    I don't understand what you mean... Is the request for ATC ID returning the wrong ID for you? Or you still have extra characters in the result? It's hard to diagnose code/results from snippets and partial details... sorry. In theory this could be a "valid" result (eg. close to zero fuel)...
  18. MaxPaperno

    MSFS20 Trying to get aircraft registration via SimConnect

    I've found the "default" behavior of the IDs unpredictable, though I've never been much concerned with it. Once set via a SimConnect client, it seems to stick through aircraft changes (tail number and in ATC calls), but not always shown in the cockpit. Isn't "D-EFCS" the sim's default or...
  19. MaxPaperno

    MSFS20 Trying to get aircraft registration via SimConnect

    One bug I see is that you don't increment the dataPtr after the line: g_aircraftDataCurrent.engineN2RPM[1] = *(double*)dataPtr; (needs dataPtr += sizeof(double); added afterwards) So that would account for the extra garbage chars before the ID string. The ID may not match the aircraft config...
  20. MaxPaperno

    MSFS20 Trying to get aircraft registration via SimConnect

    ATC ID should be correct. If you're seeing nonsense/garbage output then perhaps you're reading/displaying the string values incorrectly in code? Code-wise, string types need to be treated differently from numerics in a couple places of the subscription/reading procedures. Exactly what/how...
Back
Top