Hello there, I am trying to get the GPS Events (dialing through pages, MSG, etc) to work. Typically I am using MobiFlight and FSUIPC to achieve this and it worked all great with FSX and P3D.
I am looking at the SDK Documentation that comes with the latest SDK version 0.6.1 and the Events are clearly defined there and marked as “RECOGNIZED” which I assume is saying that they tested it and it should work.
For the GNS430 I am talking about:
KEY_TOGGLE_GPS_DRIVES_NAV1 | TOGGLE_GPS_DRIVES_NAV1 | Shared Cockpit | Recognized | ||
---|---|---|---|---|---|
KEY_GPS_POWER_BUTTON | GPS_POWER_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_NEAREST_BUTTON | GPS_NEAREST_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_OBS_BUTTON | GPS_OBS_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_MSG_BUTTON | GPS_MSG_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_MSG_BUTTON_DOWN | GPS_MSG_BUTTON_DOWN | Shared Cockpit | Recognized | ||
KEY_GPS_MSG_BUTTON_UP | GPS_MSG_BUTTON_UP | Shared Cockpit | Recognized | ||
KEY_GPS_FLIGHTPLAN_BUTTON | GPS_FLIGHTPLAN_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_TERRAIN_BUTTON | GPS_TERRAIN_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_PROCEDURE_BUTTON | GPS_PROCEDURE_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_ZOOMIN_BUTTON | GPS_ZOOMIN_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_ZOOMOUT_BUTTON | GPS_ZOOMOUT_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_DIRECTTO_BUTTON | GPS_DIRECTTO_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_MENU_BUTTON | GPS_MENU_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_CLEAR_BUTTON | GPS_CLEAR_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_CLEAR_ALL_BUTTON | GPS_CLEAR_ALL_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_CLEAR_BUTTON_DOWN | GPS_CLEAR_BUTTON_DOWN | Shared Cockpit | Recognized | ||
KEY_GPS_CLEAR_BUTTON_UP | GPS_CLEAR_BUTTON_UP | Shared Cockpit | Recognized | ||
KEY_GPS_ENTER_BUTTON | GPS_ENTER_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_CURSOR_BUTTON | GPS_CURSOR_BUTTON | Shared Cockpit | Recognized | ||
KEY_GPS_GROUP_KNOB_INC | GPS_GROUP_KNOB_INC | Shared Cockpit | Recognized | ||
KEY_GPS_GROUP_KNOB_DEC | GPS_GROUP_KNOB_DEC | Shared Cockpit | Recognized | ||
KEY_GPS_PAGE_KNOB_INC | GPS_PAGE_KNOB_INC | Shared Cockpit | Recognized | ||
KEY_GPS_PAGE_KNOB_DEC | GPS_PAGE_KNOB_DEC | Shared Cockpit | Recognized |
I am using the SimConnect Demo that demonstrates how to read data from the sim and I enhanced it with the part where I am sending events.
The main steps are to:
map your client events to the ones that are known by the sim
m_oSimConnect.MapClientEventToSimEvent(EVENT_ID.GPS_MSG_BUTTON, "GPS_MSG_BUTTON");
m_oSimConnect.MapClientEventToSimEvent(EVENT_ID.GPS_PAGE_KNOB_INC, "GPS_PAGE_KNOB_INC");
m_oSimConnect.MapClientEventToSimEvent(EVENT_ID.GPS_PAGE_KNOB_DEC, "GPS_PAGE_KNOB_DEC");
register your groups
m_oSimConnect.AddClientEventToNotificationGroup(GROUP_ID.GPS, EVENT_ID.GPS_MSG_BUTTON, true);
m_oSimConnect.AddClientEventToNotificationGroup(GROUP_ID.GPS, EVENT_ID.GPS_PAGE_KNOB_DEC, true);
m_oSimConnect.AddClientEventToNotificationGroup(GROUP_ID.GPS, EVENT_ID.GPS_PAGE_KNOB_INC, true);
m_oSimConnect.SetNotificationGroupPriority(GROUP_ID.GPS, SimConnect.SIMCONNECT_GROUP_PRIORITY_HIGHEST);
And then when I click a button I am sending an Event like this:
m_oSimConnect.TransmitClientEvent(0, EVENT_ID.GPS_PAGE_KNOB_INC, 2, GROUP_ID.GPS, SIMCONNECT_EVENT_FLAG.DEFAULT);
I have also tried
m_oSimConnect.TransmitClientEvent(0, EVENT_ID.GPS_PAGE_KNOB_INC, 0, GROUP_ID.GPS, SIMCONNECT_EVENT_FLAG.DEFAULT);
I am not 100% clear on what the first param (0) and the third param (0 or 2) is about.
I have tried with the same command to send the parking brake event, and that one just works fine.
What am I missing? Does anyone know?