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