July 22, 200619 yr Moderator >>Oops... more catching up to do, Dai... ;) FS9 does offer>ADF2>>now...>>...kinda, sorta...>>I'm likely to be sticking with C unless pushed. Actually, now>I come to think of it, my dayjob with The Other Big IDE>Company will probably let me learn XML anyway.Dai, I was referring to reading XML variables in a C gauge. For example, the following placed in _PRE_UPDATE:execute_calculator_code("(A:ADF ACTIVE FREQUENCY:1, KHz)",&adf1_freq,NULL,NULL);execute_calculator_code("(A:ADF ACTIVE FREQUENCY:2, KHz)",&adf2_freq,NULL,NULL);We now have adf1_freq and adf2_freq as FLOAT64 variables, with no muss, no fuss since we asked for 'em to be returned in KHz already.The function in gauges.h uses this prototype:BOOL (FSAPI *execute_calculator_code) (PCSTRINGZ code, FLOAT64* fvalue, SINT32* ivalue, PCSTRINGZ* svalue);This allows us to retrieve float, integer or string values from XML variables directly. This is important since there are some variables that are only availble as XML vars, there being no C equivalent! ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment