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 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?
If this is not the correct way, then how would I simulate a mouse click?