January 3, 200323 yr 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...)
January 4, 200323 yr 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.
January 4, 200323 yr 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 ?
January 4, 200323 yr 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