August 2, 200421 yr As the TIME OF DAY variable is not available in the Arne Bartel's enumeration (see http://forums.avsim.net/dcboard.php?az=sho...id=17177&page=), I was trying to read the value using the following code:FLOAT64 fvalue;execute_calculator_code("(A:TIME OF DAY, Enum)", &fvalue, NULL, NULL);But it does not work.Do you know how I can read this value?Thanks.Eric My Web Site
August 2, 200421 yr Author Moderator Eric, despite numerous attempts, I've been unable to get a valid return from that variable in either C or XML gauges, but for some reason known only the "MS gods" it works PERFECTLY in a MDL XML... :-hmmm day_time(E:TIME OF DAY, enum) 1I use this code to make the pilot's sunglasses appear/disappear...I wish someone could explain why the token works here but not in a gauge!But, in any event, the code you posted wouldn't work because TIME OF DAY is enumerated, so requires an E: type tag:execute_calculator_code("(E:TIME OF DAY, enum)", etc. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
August 2, 200421 yr Since some magic must be happening when a model gets the very exact code that a xml gauge would get, have you tried sending that model type code to the gauges via a L: var ?(E:TIME OF DAY, enum) (>L:TimeOfDay,enum) Regards,Roman(KGRB) FS RTWR SHRS F-111 JoinFS Little Navmap
August 3, 200421 yr Author Moderator No Roman, I actually never thought about that. I'll have to give it a try one day when I find some time! :) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
June 29, 200718 yr Author Moderator Just for the sake of "setting things right..."Here is the proper syntax for E:TIME OF DAY. The XML variable is an enumerated integer, so one needs to declare an SINT32 local variable:SINT32 iTimeOfDay;execute_calculator_code("(E:TIME OF DAY,Enum)",NULL,&iTimeOfDay,NULL); Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
July 6, 200718 yr Just to let you know:Even in FS-X the FS9 syntax (P:TIME OF DAY,enum) still works.But (E:TIME...) - E: instead of P: like written in the SDK does as well.But even when you select dawn or dusk as the actual time,it might last one more hour until you get the appropriateresult. The daytime settings seem to be a bit more complex...Herbert
July 7, 200718 yr Author Moderator For reasons which defy all logical analysis, FS actually uses a seperate "clock" for scenery than it does for the panel system......However, in all fairness the SDK's description of the variable IS "General" time of day... :) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment