Hi,
You can find status of buttons, so if its a question of whether that button is pressed or not, or the switch is in a certain position, then at least its easy.
I can't get it working if its done during initialization, but if I use a switch to check, it works fine.
Here I demonstrated with an example, I use the Engine Fuel Flow Right switch, when switched to NORM, it will 1 time try to see if the button LTB on the Trottle is pressed.
include "target.tmh"
//program startup
int main()
{
if(Init(&EventHandle)) return 1; // declare the event handler, return on error
MapKey(&Throttle, EFRNORM, EXEC("GetStatus();"));
}
int GetStatus()
{
if ( Throttle[LTB]) printf( "\xaLTB is on" );
};
//event handler
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
//add event handling code here
}
Hope you can use it