Code Monkey home page Code Monkey logo

fsconnect's People

Contributors

arthurkok2 avatar timianheber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fsconnect's Issues

Client event support

Hi, I'm finally far enough into my development that it was time to look at setting the time in the sim and enabling/disabling slew mode. Both those things can only by achieved by sending simconnect events not by setting sim vars.

So I checked out your feature/settime branch and copied the fsconnect changes into my project overriding the one from the published nuget package. I'm happy to say it worked flawlessly for both purposes. I did not test out the world manager class as I want to keep the dependency down to just the main package but my code is nearly identical so that should work.

Not sure when you were planning to release that branch into the main package but looking forward to removing a whole bunch of warnings regarding conflicting class definitions ๐Ÿ˜„ and to provide some additional testing feedback.

TransmitclientEvent only with 16 bit uint.

Hello Timian,

Thanks for the Library, which is really easy to use.

I use this code to set the Com Stby Frequency in MSFS:

`
fsConnect.MapClientEventToSimEvent(TestEnums.GroupId, TestEnums.EventId, FsEventNameId.ComStbyRadioSet);
fsConnect.SetNotificationGroupPriority(TestEnums.GroupId);

fsConnect.TransmitClientEvent(TestEnums.EventId, (uint)bcdStbyFreq, TestEnums.GroupId);
`
The problem is, that an uint BCD only has 4 digits. I'm Able to set com Frequency to 124.000 and 124.010 (using uint16 BCD 2400 and 2401 (the leading "1" in 100.000 is ommited)), but not to 124.005, which i am able in Garmin GNS 530.

So i would need a TransmitClientEvent with an uint64, i guess.

Greetings

Andreas

Unable to set heading bug

Hi,

I successfully connected to FS2020 and received the heading bug setting using RequestData on FsSimVar.AutopilotHeadingLockDir.
However, I was unable to set the value using a client event. I basically followed the example in the README. After successful connection I call:

        fsConnect.MapClientEventToSimEvent(ev.group, ev.setHeadingBug, FsEventNameId.HeadingBugSet);
        fsConnect.SetNotificationGroupPriority(ev.group);
        fsConnect.TransmitClientEvent(ev.setHeadingBug, (uint) 0, ev.group);

I expected the AP heading selector to switch to 0, but it stays at the heading dialed in. I tried several alternatives (e.g. binding my event to FsEventNameId.HeadingBugInc, FsEventNameId.FlapsIncr), but none worked. However, a call to SetText does show a text popup in MSFS (so, it's probably not a connection issue).

Any help appreciated.

EDIT: Inserted 2nd code line

RequestData(Enum requestId) ... multiple requestIds?

I'm currently developing an application that tracks a lot of simvars and I have grouped them into two separate structs based on the sampling rate required. I initially thought I would just create

  • two structs and their simvar definitions
  • two requestIDs in an enum
  • register them both to the same FsConnect instance
  • use the RequestData function with the specific enum/int value

But that created some weird results:

  • the second registered enum was never returned
  • I got FsDataReceived events with the second enum ID, but containing the struct data from the first one
  • using an enum int value other than 0 never seems to return any data

The only way I was able to work around it was to create two FsConnect instances with only the one registered struct each, and since both are requesting data quite often and need to be running anyways I was ok with that.

But now I'm developing a "plane ground operations" step that requires a few more variables, but only for a limited amount of time, so I would be looking at a third connection to the sim - not sure if I'm still comfortable with that. Did I do/understand something wrong about the struct registrations? Or is this a limitation of SimConnect that it only supports one?

May not have permission to write SimConnect.cfg

The SimConnect.cfg file is currently written to Executing assembly's location. This may be in an area where the process does not have access to write to.

Consider writing to the user's documents folder as the SimConnect.dll also looks here.

Not returning Transponder codes using reflection...

Hi, I've been playing with FsConnect, and cannot get it to return transponder codes. I think I'm doing it right - just wanted to check.

When setting up the response I have this:

[SimVar(NameId = FsSimVar.TransponderCode, UnitId = FsUnit.Bco16)]
public uint TransponderCode;

And then use it like this:

uint transponder_code = Bcd.Bcd2Dec(r.TransponderCode);

It always returns 0... Any thoughts ?

SimConnect.cfg in My Documents - conflict with other mods

CJ4 mod team contacted me about conflict with my Kinetic Assistant, which uses your fsConnect.DLL, that SimConnect.cfg in My Documents cause their WASM module functionality problems. I have fixed it on my end, but you should consider to set local CFG placement as default:

public SimConnectFileLocation SimConnectFileLocation { get; set; } = SimConnectFileLocation.Local;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.