Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Joystick control in a Gauge.dll

Featured Replies

I've make my Gauge.dll working with SimConnect. The first Thing i made was receiving the "SITUATION_SAVED" Event so i'm able to write my Configfile for the Panelstats if Users save a Flight. Now i want to tkae "Control over the Joystickinputs. Can read (intercept?) the Inputs with SimConnect succesfully but FSX is still responsing to the Inputs (what he should'nt do in the Moment). Have read about this "maskable" InputGroups but nothing helps. So, I post some Code here how it works at the Moment.GAUGE_CALLBACK sys_gauge_cb;HANDLE hSimConnect = NULL;static enum GROUP_ID { GROUP0,};static enum EVENT_ID { EVENT_FLIGHT_SAVE, EVENT_XAXIS,};static enum INPUT_ID { INPUT_XAXIS,};static enum DATA_DEFINE_ID { FLIGHTCONTROLS,};case PANEL_SERVICE_PRE_INSTALL:{{HRESULT hr;if (SUCCEEDED(SimConnect_Open(&hSimConnect, "Gauge", NULL, 0, 0, 0))){hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_FLIGHT_SAVE, "SITUATION_SAVE");hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_XAXIS);hr = SimConnect_AddClientEventToNotificationGroup(hSimConnect, GROUP0, EVENT_FLIGHT_SAVE);hr = SimConnect_AddClientEventToNotificationGroup(hSimConnect, GROUP0, EVENT_XAXIS, TRUE);hr = SimConnect_SetNotificationGroupPriority(hSimConnect, GROUP0, SIMCONNECT_GROUP_PRIORITY_DEFAULT); hr = SimConnect_MapInputEventToClientEvent(hSimConnect, INPUT_XAXIS, "joystick:0:XAxis", EVENT_XAXIS);hr = SimConnect_SetInputGroupPriority(hSimConnect, INPUT_XAXIS, SIMCONNECT_GROUP_PRIORITY_HIGHEST_MASKABLE);hr = SimConnect_SetInputGroupState(hSimConnect, INPUT_XAXIS, SIMCONNECT_STATE_ON);hr = SimConnect_AddToDataDefinition(hSimConnect, FLIGHTCONTROLS, "AILERON POSITION", NULL, SIMCONNECT_DATATYPE_INT32); hr = SimConnect_CallDispatch(hSimConnect, MyDispatchProc, NULL);}else{MessageBox(NULL, L"Failed connecting Flight Simulator", L"SimConnect Error", MB_OK | MB_ICONERROR);exit (-1);}}Thanks for any Help.Regards,Sven

I have been able to do what you're looking for. I think what you need to do is to set the event as maskable in MapInputEventToClientEvent(). Try using something along the lines of:hr = SimConnect_MapInputEventToClientEvent(hSimConnect, INPUT_XAXIS, "joystick:0:XAxis", EVENT_XAXIS, 0, (SIMCONNECT_CLIENT_EVENT_ID)SIMCONNECT_UNUSED, 0, true);I hope that will help you.Klas

Thanks for your help, works fine now :-)Regards,Sven

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.