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.

Get Flaps position using the SDK ?

Featured Replies

Good afternoon,Since a few month, I try to code a DLL which is supposed to create interactive Force feedback effects in Fly!II.I'm quite happy of the actual state of it, except I didn't find out how I could retrieve the real Flaps position (fo buffeting simulation purpose).I've tried to use the message system, as shown by Laurent Claudet (PA-19 failure sample C++) in this way :{ g_sMessage.id = MSG_GETDATA; g_sMessage.group = 'flap'; g_sMessage.dataType = TYPE_INT; g_sMessage.user.u.hw = HW_FLAP; g_sMessage.user.u.unit = 1; APISendMessage(&g_sMessage);}But I've never retrieve any useful informations :-((In fact, I'm looking for a generic solution (aircraft independent !) so I don't really know what is the good value to pass in :"g_sMessage.group" and "g_sMessage.dataType"Is it also possible (ideal solution) to be "wake up" only when a change occurs, using : g_sMessage.id = MSG_DATACHANGED; ??Many Thanks for your help (and sorry for my poor english...)

Hi Roland, this is what has worked for me for all airplanes://============================unsigned int ui_datatag;int i_value;g_sMessage.id = MSG_GETDATA;g_sMessage.group = 'flap';g_sMessage.dataType = TYPE_INT;if (b_extend) // Trying to EXTEND FLAPS{ui_datatag = 'incr';g_sMessage.user.u.datatag = ui_datatag;APISendMessage(&g_sMessage);// Get actual value and incrementi_value = g_sMessage.intData + 1;}else // RETRACT FLAPS{ui_datatag = 'decr';g_sMessage.user.u.datatag = ui_datatag;APISendMessage(&g_sMessage);// Get actual value and decreasei_value = g_sMessage.intData - 1;}// Clear values before using it again.memset((void*) &g_sMessage, 0, sizeof(SMessage));// Now send action to be executed.g_sMessage.id = MSG_SETDATA;g_sMessage.group = 'flap';g_sMessage.user.u.datatag = ui_datatag;g_sMessage.intData = i_value;g_sMessage.dataType = TYPE_INT;APISendMessage(&g_sMessage);//=====================================Hope this helps.Luis Balarin.

Hi Luis,Thanks a lot for this complete example !I'm going to try it right now.Thanks againDo you think it is possible to get the airbrake position in the same manner ?

Great, It's working well !It seems that the HW_FLAP must not be filled in, I don't know why.Thanks for your Help.

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.