Closed Cupiii closed 3 years ago
Hi Andreas,
Sure, I'll get on it. Do you know if there are other requirements for the signature of TransmitClientEvent? (i.e. other data types) Anyway, I'll add the uint64 and hopefully push a new release this weekend, monday at the latest.
Thanks for your quick reply. Just got my Arduino to work with the ComStandbyFrequency. ;-)
Do you know if there are other requirements for the signature of TransmitClientEvent? (i.e. other data types)
Oh, no, i actually dont know,
Hey Timian,
so i looked it up. The TransmitClientEvent (SimConnect_TransmitClientEvent) only accepts a dword (which for my understanding is a uint32). The Simulator then decides how to handle the data.
This (how the Sim handles the data), if i understood correctly, causes some confusion in some forums, on how MSFS/FSX handles negative numbers. Sometimes its "$ffff-abs(negnum)", sometimes it's "$ffffffff-abs(negnum)". It seems, you just have to try - and interestingly sometimes both seem to work, or the sim only accepts some ranges and interpretes them accordingly to the range (which seems to be the case here with the Radiofrequencys).
But beware, i might be wrong here... I'm no expert... And as I said, the there is confusion in the forums on this.
Thanks for your effort.
Andreas
Thanks for the info :-) Yeah, there's a lot of trial and error with MSFS, which is why I would like a shared common handling of such issues. I'll make a ComManager as a reference implementation to investigate how to control radio stuff.
I'm looking into something similar to the code posted here, as a trick to support your case, where it command an increment in addition to the set operation, but we will have to see.
Thanks for sharing the link. Very interesting. Looking forward to your code. Thanks for a little bit less trial and error. ;-).
I found some information about an undocumented way on how to set 3 decimal frequencies (See link below). It seems to work, but I need a couple of days to clean things up, and need to investigate how to read these values back.
Interesting, will try today.
Hi Andreas, I have now finally pushed a new verision where I added a RadioManager. It should support 3 decimals for radio frequency so try it out or steal the code and see if it works for you. I'll add support for NAV radios shortly,
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