FSDreamTeam forum
May 24, 2013, 06:57:56 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: GSX Released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: How to programmatically detect “You control” feature is available  (Read 662 times)
FS++
Newbie
*
Posts: 10


« on: October 21, 2012, 11:37:40 AM »

As you probably know we have a voice interface to GSX, which is working great.
And we really don’t see a need for an SDK.

My question,

For those airports where “You control” feature is enabled, is there a way to reliably check that the feature is active (or enabled)?

It’s mainly to know what kind of menu to expect first.

Thanks

Ian
Logged
Bruce Hamilton
Beta tester
Hero Member
*****
Posts: 1537



« Reply #1 on: October 21, 2012, 01:13:59 PM »

Who is "we", do you have a mouse in your pocket?   Grin
Not all of us use FS2Crew, my voice interface doesn't recognize anything but the ATC menu.  We do need the SDK.
Logged

Intel Core i7-2600 Sandy Bridge 3.40GHz Asus P8Z68-V Pro/Gen3 G.Skill Ripjaws 16GB Western Digital 1TB  GeForce 8800GTX
FS++
Newbie
*
Posts: 10


« Reply #2 on: October 21, 2012, 03:50:24 PM »

"We" have nothing to do with FS2Crew. Grin

Since you asked...

Here we are: http://www.multicrewxp.com

Logged
Bruce Hamilton
Beta tester
Hero Member
*****
Posts: 1537



« Reply #3 on: October 21, 2012, 04:37:58 PM »

Copilot sounds too robotic for me, prefer being able to change voices like IYP.
Logged

Intel Core i7-2600 Sandy Bridge 3.40GHz Asus P8Z68-V Pro/Gen3 G.Skill Ripjaws 16GB Western Digital 1TB  GeForce 8800GTX
virtuali
Administrator
Hero Member
*****
Posts: 13016



WWW
« Reply #4 on: October 21, 2012, 08:50:29 PM »

For those airports where “You control” feature is enabled, is there a way to reliably check that the feature is active (or enabled)?

It's an interesting question, I'll have a look at it and, if there isn't any other way, we could set an FSX variable that your addon can read, which will be set only if the scenery uses the YouControl menu.
Logged

Umberto Colapicchioni
http://www.virtualisoftware.com
FS++
Newbie
*
Posts: 10


« Reply #5 on: October 22, 2012, 11:19:24 PM »

OK, thanks Umberto.

As an interim solution would it be possible to check for the presence of a particular file (within FSX folder) that would imply one of your detailed sceneries for a specific airport is installed (Geneva Cointrin for example)?

And is that enough to assume "You control" will be available?

Ian
Logged
virtuali
Administrator
Hero Member
*****
Posts: 13016



WWW
« Reply #6 on: October 23, 2012, 09:18:49 AM »

As an interim solution would it be possible to check for the presence of a particular file (within FSX folder) that would imply one of your detailed sceneries for a specific airport is installed (Geneva Cointrin for example)?

No, it's not (I would told you that, if that was possible), since the file that enables YouControl it's the same that enables some scenery objects, docking systems, GSX customization AND YouControl so, there's no way for you to tell YouControl it's available or not, just by its presence.

Of course, you can just keep a list of known FSDT sceneries (that will have to be kept updated when we release a new scenery) and a file that has to be checked.

In this case, you should check the fsdreamteam\Couatl folder, inside you'll find several folders with the scenery names (it's usually the ICAO, but not always), each one containing a file named __init__.pye, if that file exists, that means the scenery has at least some special interactive scenery objects OR some docking systems OR a YouControl menu.

Not all FSDT sceneries have a YouControl menu, KORD doesn't have one for example, and the Hawaii1 and 2 are "multi-area" products, so each one will handle two airports, so you'll have to handle this special case too.

I think it's a bit cumbersome and not automatically reliable, because we might change this at any time, so it would be MUCH better if we publish an FSX variable to check as soon as any airport creates the YouControl menu, so this will always work, will not require any checks, will never be broken by new releases and it will be trivial to code too.
Logged

Umberto Colapicchioni
http://www.virtualisoftware.com
virtuali
Administrator
Hero Member
*****
Posts: 13016



WWW
« Reply #7 on: October 23, 2012, 11:15:32 AM »

Try the attached youcontrol.pye file, to be put in the following folder:

FSX\fsdreamteam\Couatl\common

This will set the following FSX custom variable:

FSDT_VAR_YouControlIsAvailable

to be 0.0 (double) if there's no YouControl menu or 1.0 if there's a YouControl menu before the GSX menu. Note that the variable is updated immediately AFTER the user has pressed the GSX/YouControl Hotkey (CTRL+F12), which means you shouldn't rely on its value until after the menu has been opened.

It's possible to read this variable both in C and/or XML from a gauge, for example, in C:

double* value;
execute_calculator_code( "(L:FSDT_VAR_YouControlIsAvailable, number)", &value, NULL, NULL);



Let me know if it works for you, so we can insert this file in the regular distribution, and this will hopefully be a first step towards a GSX SDK.

* youcontrol.pye (6.59 KB - downloaded 20 times.)
« Last Edit: October 23, 2012, 11:18:17 AM by virtuali » Logged

Umberto Colapicchioni
http://www.virtualisoftware.com
FS++
Newbie
*
Posts: 10


« Reply #8 on: October 23, 2012, 12:57:32 PM »


Excellent!

Our module “fsInsider.dll” running inside the FSX process should be able to read that using “execute_calculator_code” FSX SDK API.

Will let you know the outcome by Friday.

Thanks.
Logged
FS++
Newbie
*
Posts: 10


« Reply #9 on: October 25, 2012, 12:38:46 PM »

Is the custom variable "FSDT_VAR_YouControlIsAvailable" already in version 1.7.4, or shall I wait until you upload the next revision?

Thanks
Logged
virtuali
Administrator
Hero Member
*****
Posts: 13016



WWW
« Reply #10 on: October 25, 2012, 12:51:50 PM »

Is the custom variable "FSDT_VAR_YouControlIsAvailable" already in version 1.7.4, or shall I wait until you upload the next revision?

Right now, you have to use the youcontrol.pye file I've attached, it's not available in any other version. I wanted to hear some feedback before including in the regular distribution. It it works, it will appear as a minor Live Update, that can be applied without reinstalling GSX or restarting FSX.
Logged

Umberto Colapicchioni
http://www.virtualisoftware.com
FS++
Newbie
*
Posts: 10


« Reply #11 on: October 25, 2012, 03:25:39 PM »

Is the custom variable "FSDT_VAR_YouControlIsAvailable" already in version 1.7.4, or shall I wait until you upload the next revision?

Right now, you have to use the youcontrol.pye file I've attached, it's not available in any other version. I wanted to hear some feedback before including in the regular distribution. It it works, it will appear as a minor Live Update, that can be applied without reinstalling GSX or restarting FSX.

After relacing the file, I am pleased to report it's working. The var isn't there intially. But as soon as the hotkey is pressed it becomes available. Just as you mentioned above.

Tested with both Geneva Demo scenery and default EDDM. It gives a 1 at LSGG and 0 at EDDM as expected.

Thanks a million.

Ian

Logged
virtuali
Administrator
Hero Member
*****
Posts: 13016



WWW
« Reply #12 on: November 19, 2012, 01:24:03 PM »

We have opened a section for developers in this forum, and would like to hear their suggestions:

http://www.fsdreamteam.com/forum/index.php?topic=7585.0
Logged

Umberto Colapicchioni
http://www.virtualisoftware.com
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!