c-true / FsConnect

Wrapper for Flight Simulator 2020 SimConnect library
59 stars 19 forks source link

Not returning Transponder codes using reflection... #21

Open jonbeckett opened 2 years ago

jonbeckett commented 2 years ago

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 ?

TimianHeber commented 2 years ago

Hi, I'm away from my rig until the weekend but will look into the issue then ASAP. It's been awhile, and I do seem to remember that there were some issues here, but I'll take a look and see if I can make it work and let you know.