FSDeveloper Community

Go Back   FSDeveloper Community > Microsoft Flight Simulator development > SimConnect > SimConnect

SimConnect Use this forum for all your SimConnect related discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 07 May 2012, 12:17
Koalar Koalar is offline
  china
Join Date: Dec 2008
Posts: 5
How to read the first digit of ADF freqency

I'm using the variable "ADF FREQUENCY:1" to get the ADF frequency, the unit is KHz, if the ADF frequency is 1234.0 in the game, I got a return value of 102340, if the frequency is 0234.0, I got 102340 all the same. Similar if I choose to return in BCD16 or Hz, the return value is always the same regardless of the first digit. I'm so confused. Could any body help me with this?

Last edited by Koalar; 07 May 2012 at 12:24.
Reply With Quote
  #2  
Old 07 May 2012, 12:34
n4gix n4gix is offline
  unitedstates
Location: Hammond, Indiana
Join Date: Sep 2006
Posts: 8,525
Try using this instead:

(A:ADF ACTIVE FREQUENCY:1,KHz)
__________________
Bill Leaming
3d Modeler Max/GMax
C & XML Gauge Programmer
Eaglesoft Development Group
http://eaglesoftdg.com

Intel® Core™ i7-3770k 4.2GHz - Crucial 16GB DDR3 - Dual Radeon HD770 1GB DDR5 (Crossfire) - Eco II Watercooling - Win7 64bit
Intel® Core™ i7-2600k 3.4GHz - Crucial 4GB DDR3 - NVIDIA GeForce GTX550Ti 1GB - Win7 64bit
Intel® Core™ i7-860 2.8GHz - Crucial 8GB DDR3 - NVIDIA GeForce GTS240 1GB - Win8 64bit
NOTE: Unless explicitly stated otherwise, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
Reply With Quote
  #3  
Old 07 May 2012, 12:48
Koalar Koalar is offline
  china
Join Date: Dec 2008
Posts: 5
Another question

The fraction part of the ADF frequency is also not reflected in the return value. Most of the time, the return value doesn't change whatever the fraction part is. But both the first digit and the fraction part can be set correctly throw the event ADF_COMPLETE_SET.
Reply With Quote
  #4  
Old 07 May 2012, 12:58
Koalar Koalar is offline
  china
Join Date: Dec 2008
Posts: 5
Quote:
Originally Posted by n4gix View Post
Try using this instead:

(A:ADF ACTIVE FREQUENCY:1,KHz)
That works! I can't believe I mistook the description for the simulation variable and stucked here for a whole night. Thank you n4gix!
Reply With Quote
  #5  
Old 08 May 2012, 12:45
n4gix n4gix is offline
  unitedstates
Location: Hammond, Indiana
Join Date: Sep 2006
Posts: 8,525
Quote:
Originally Posted by Koalar View Post
That works! I can't believe I mistook the description for the simulation variable and stucked here for a whole night. Thank you n4gix!
I keep the FSX SDK loaded on my dev machine 99.9% of the time for ready reference. I can't possibly remember all of the exact token/event names myself with complete certainty!
__________________
Bill Leaming
3d Modeler Max/GMax
C & XML Gauge Programmer
Eaglesoft Development Group
http://eaglesoftdg.com

Intel® Core™ i7-3770k 4.2GHz - Crucial 16GB DDR3 - Dual Radeon HD770 1GB DDR5 (Crossfire) - Eco II Watercooling - Win7 64bit
Intel® Core™ i7-2600k 3.4GHz - Crucial 4GB DDR3 - NVIDIA GeForce GTX550Ti 1GB - Win7 64bit
Intel® Core™ i7-860 2.8GHz - Crucial 8GB DDR3 - NVIDIA GeForce GTS240 1GB - Win8 64bit
NOTE: Unless explicitly stated otherwise, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FSX] [C++] How to read variables ? JPC06240 SimConnect 14 04 Feb 2012 03:15
I have read and read, and cant figure it out. commercialcobb SketchUp 6 10 Jan 2012 01:57
MCX 1093 - Attempted to read or write protected memory BASys ModelConverterX 2 07 Jul 2011 14:32
[FSX] Read XML variables through simconnect ? bcs112 SimConnect 3 03 Sep 2010 07:02
Busy - limited time to read threads arno General chat 6 21 Apr 2008 15:47


All times are GMT -4. The time now is 05:45.

Kirsch designed by Andrew & Austin


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.