Creating a DGIV Simpit

meson800

Addon Developer
Addon Developer
Donator
Joined
Aug 6, 2011
Messages
405
Reaction score
2
Points
18
For a simpit dedicated to the DGIV that I am creating, I need to know how to click one of the DGIV's switches. My design has switches connected to a microcomputer (Arduino), and the microcomputer sends switch positions to a custom Orbiter module through a serial port.

So far, my module looks for a vessel named 'DGIV_SIM' (which will always be a DGIV), creates a VESSEL2 interface, then invokes the interface's
Code:
clbkPanelMouseEvent.

OBJHANDLE hVessel = oapiGetVesselByName("DGIV_SIM");
if (oapiIsVessel(hVessel))
	{
		VESSEL2 vesselInterface = VESSEL2(hVessel,1);
vesselInterface.clbkPanelMouseEvent(0,PANEL_MOUSE_LBDOWN,1,1);
}



If this is the correct way to simulate a click event, then does anybody know the correct ID, MX, and MY values are for the various DGIV switches?
If this is not the correct way, then how would I simulate a mouse click on a DGIV?:)
 
Top