I want to write a couple of gauges......

FSSC, Airport 2.*, CfgEdit, etc. Get to grips with designing Scenery & Panels here!

I want to write a couple of gauges......

Postby JBaymore » Wed May 19, 2010 5:16 pm

....and I am wondering how hard this will be to do.
Last edited by JBaymore on Wed May 19, 2010 5:19 pm, edited 1 time in total.
Image ImageIntel i7 960 quad 3.2G LGA 1366, Asus P6X58D Premium, 750W Corsair, 6 gig 1600 DDR3, Spinpoint 1TB 720
User avatar
JBaymore
Global Moderator
Global Moderator
 
Posts: 10020
Joined: Sat May 24, 2003 9:15 am
Location: New Hampshire

Re: I want to write a couple of gauges......

Postby Travis » Thu May 20, 2010 5:06 pm

I wrote one gauge (a flaps switch) for my Angel 44, and it took me several tries just to get the concept down.
Last edited by Travis on Thu May 20, 2010 5:07 pm, edited 1 time in total.
Image
User avatar
Travis
Major
Major
 
Posts: 4381
Joined: Thu Feb 06, 2003 3:17 am
Location: KAUS - 30 MI NW

Re: I want to write a couple of gauges......

Postby Tech Diver » Fri May 21, 2010 5:05 pm

John, there are essentially two aspect of working with variables in gauges: Displaying the status of the variable, and toggling its state.

Can you give me some more details on the gauge? For example, if the APU is turned on, do you want a push-button to light up or would you want a graphic icon to appear on one of the MFD screens? How do you want to activate the APU?

If you can give some of the above info, I could probably put together some sample code for you regarding the APU (as a start) as well as the others you have listed.

As far as charging the battery, that is all taken care of within FSX itself. As soon the variable "APU GENERATOR ACTIVE" is TRUE, everything else is handled by the sim.

Peter
Last edited by Tech Diver on Fri May 21, 2010 5:18 pm, edited 1 time in total.
Tech Diver
2nd Lieutenant
2nd Lieutenant
 
Posts: 196
Joined: Fri Oct 30, 2009 8:47 am
Location: Concord, Massachusetts

Re: I want to write a couple of gauges......

Postby JBaymore » Sat May 22, 2010 9:21 am

John, there are essentially two aspect of working with variables in gauges: Displaying the status of the variable, and toggling its state.

Can you give me some more details on the gauge? For example, if the APU is turned on, do you want a push-button to light up or would you want a graphic icon to appear on one of the MFD screens? How do you want to activate the APU?

If you can give some of the above info, I could probably put together some sample code for you regarding the APU (as a start) as well as the others you have listed.

As far as charging the battery, that is all taken care of within FSX itself. As soon the variable "APU GENERATOR ACTIVE" is TRUE, everything else is handled by the sim.

Peter


Peter,

Thanks for the input and the kind offer.

I'm living in the "Simpit Realm" here.  A different kind of insanity.  So that sort of changes everything as to the mental orientation of this project. 

Also living in the "FS2004 World". FS2004 does not emulate the APU at all.

First of all I need to be able to create a "sub-system" within the gauge that is external to the sim itself, since the functions I need are not modeled by Microsoft in any way.  I unfortunately can't "fake" an APU out of using another non-thrust creating engine (simple), because I already fly a four engine jet.

Secondly, I then need to be able to turn this subsystem on and off, and likey not by using "unused key assignments", since my simpit already uses about every normal token key assignment that Microsoft built into the default sim.  So that likely will entail "poking" values directly into FSUIPC accessible memory offsets to turn things on and off and adjust them.

I don't need ANY displays of any kind within the sim istelf.  These are gauges in the panel that do not even need to be visiable at all.  No animations.  No lights.  No displays.  It is about the functions of the gauge, and access to those functions, not the displays.  The simpit provides all the displays (and very expensively I might add  ::) .  But they certainly ARE immersve!  :))

FSUIPC can "read" the values at any given memory offset location directly.  This can then easily pass the value over to some of the simpit specific hardware.  So, for example, when the value at a certain memory offset changes from false to true, FSUIPC detects that change and then tells something like the Phindget's LED 64 controller card to turn on green LED #27, which on the physical overhead panel in the simpit is the "APU Gen On" annunciator light.  And so on.

To get info INTO the sim, a switch on maybe say the overhead APU panel, can be thrown and then a Phidgets' input controller card will know that the switch for the APU Start was thrown to the on position.  The controller then can either send ANY key combination input to the sim, or if a key sequence will not work or is not avaialble, it can also send a key combination to FSUIPC that FSUIPC then converts to a normal Microsoft SDK token value or places directly into a memory offset.

Hope this helps you understand my needs better.

best,

....................john
Image ImageIntel i7 960 quad 3.2G LGA 1366, Asus P6X58D Premium, 750W Corsair, 6 gig 1600 DDR3, Spinpoint 1TB 720
User avatar
JBaymore
Global Moderator
Global Moderator
 
Posts: 10020
Joined: Sat May 24, 2003 9:15 am
Location: New Hampshire

Re: I want to write a couple of gauges......

Postby Tech Diver » Sat May 22, 2010 10:37 am

Hi John, Thank you for the explanation. I understand what you are saying and it is definitely quite a bit different from the way I have been interacting with the variables in the flight sim thus far. Additionally, it is for FS9 which has a number of significant differences from FSX. With all that being said, I will have to do a bit more research on this topic.

Regards,
Peter
Tech Diver
2nd Lieutenant
2nd Lieutenant
 
Posts: 196
Joined: Fri Oct 30, 2009 8:47 am
Location: Concord, Massachusetts


Return to Scenery & Panel Design

Who is online

Users browsing this forum: No registered users and 165 guests