Jump to content
The simFlight Network Forums

AJ212

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling
  • Location
    Home

AJ212's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Paul, ...you're a genius :) 3.0 is working!!! From what I've seen today it seems to work pretty well :) The problem was on my side... Remember I was asking you if I just have to copy/paste FSUIPC 3.0 into my Ref folder of my VB prog... That's what I did without checking if my App took over the correct version... Today morning I checked that and I saw that I was still running in 2.0.4xxx ooops... The reason for that was a old reference to a wrong folder... my fault... After correcting the folder ref and adding a new ref for FSUIPC 3.0 the version has been changed to 3.0.xxxx Now all threads (currently only 3 but soon it will become more :) ) are running!!! So, creating one offsets calling process() and deleting the offset works! The new timing went down to approx. < = 100ms per thread... I still have to test that stuff with more offsets per thread-list to find out how the timing behaves... it still might be, that I might go for the suggestion you made with the offset group and call process() not only for a single offset but for the whole list at once... because of calling process() "taking long"... I hope I can get back to you in case I get a problem with creating this sort of offset group... Many thanks for you help on that!!!!!!! Regards, AJ212
  2. Hi Paul, I've just tested 3.0 and encountered the same problem... :( I hope I did it right by just replacing the old DLL with the new one... I also have implemented a "sleep" for each thread once it has gone thru the list before starting the next loop... I've tested 10, 20, 50, 100ms and it just delays the alarm "offset doesn't exit" or "Index out of Array Area"... In regards of your question... YES, I am calling Process () every single time after creating an offset... the reason why I'm doing that is that each offset gets created with the same NAME (Dim FS_Value...) depending on VARsize (FS_Size) again it looks like this: 'it start with... for i = 0 to end of list.... aso... Select Case FS_Size Case 1 Dim FS_Value As Offset(Of Byte) = New Offset(Of Byte)(ThreadGroup, FS_Offset) FSUIPCConnection.Process(ThreadGroup) 'write FS_Value.Value to somewhere else to work with it... Case 2 Dim FS_Value As Offset(Of Short) = New Offset(Of Short)(ThreadGroup, FS_Offset) FSUIPCConnection.Process(ThreadGroup) 'write FS_Value.Value to somewhere else to work with it... Case 4 Dim FS_Value As Offset(Of Integer) = New Offset(Of Integer)(ThreadGroup, FS_Offset) FSUIPCConnection.Process(ThreadGroup) 'write FS_Value.Value to somewhere else to work with it... Case 8 Dim FS_Value As Offset(Of Double) = New Offset(Of Double)(ThreadGroup, FS_Offset) FSUIPCConnection.Process(ThreadGroup) 'write FS_Value.Value to somewhere else to work with it... End Select FSUIPCConnection.DeleteGroup(ThreadGroup) This selection above is looping thru a for loop from the first element in the list to the last one... Hence, I am calling process () for every single after creating an offset while polling thru all item of the list... I also was thinking about creating some sort of "OffsetArray" in the for loop and each one will be member of the same "ThreadGroup" and afterwards I wanted to call Process(ThreaGroup) instead of calling Process() for every single Offset I've created in my existing code... But I don't know how to create such a "OffsetArray" with FS_Value(i) where (i) stands for the "for loop counter" I hopy you know what I mean now... For every (i) in the loop I want to create a Offset before Calling Process("ThreadGroup") ...something like this: Dim FS_Value(i) As Offset(Of Double (Depends on the List(i) VARSize)) = New Offset(Of Double (Depends on the List(i) VARSize))(ThreadGroup, FS_Offset(i) (equals to List(i) HEXCode)) THX! AJ212
  3. Hi Paul, Thanks for your fast reply! I relay appreciate your offer and I'm absolutely willing to go to 3.0 with .net 4 or higher... making the DLL thread-safe when creating offsets sounds good! Now, for my understanding, that actually means each single thread will queue at the point of code, where I am creating an offset until the last thread has finished creating it, right? Regards, AJ212
  4. Hi, I'm using FSUIPC since more than 3 years now and didn't face a issue when reading Offsets form FSX with FSUIPC. I've recently installed FSUIPC 2.4 to check on my multithreading timing issue I encountered after changing my program code (VB2010 - .net) to accelerate my program. Here's the story: Before changing my code I was reading Offset from FSX in Serial that means I (more or less) have a List including several "HEXcodes" and corresponding "VARsizes"... Depending on the "VARsize" I am creating the offset (short, integer, double, aso...). I am polling thru the list, creating the new Offset with a "groupname" afterwards I am setting up the Process call with the group name and after retrieving the value I am deleting the group again... Depending on the length of the list a loop takes >2sec. Now I decided to split the offset list in parts depending on how many HW Output-Cards I am using (which in my case could be up to 24) ...and herewith comes the problem: When splitting up the list I was creating a thread for each single List (for test purposes I am using just 3 for now...) Now each threat creates its own offset (again depending on VARsize") and sets up the process call (by group name) and deletes the group again... Each thread has its unique group name so FSUIPC doesn't get "confused"... When starting may program this "multi-threading process call" works for about 10sec. afterwards I am getting weird errors like "index out off array area" during creating an offset or "Offset Group does not exist" during a process call aso... The funny thing is, that if I mark this line then "Set next statement" it works again for a few sec. until the next error pops up form another thread (out of 3) Unfortunately I was running out of ideas to overcome this problem so I really would appreciate if somebody could help on this topic... I also was think about to open multiple instances (FSUIPC.open) ...one for each thread but I don't know if that is even possible... Thanks for any information!!! Regards, AJ212
  5. Hi Pete, I meant the settings page directly inside MSFS2004 (reality settings)... :rolleyes: ...sorry its in german but it shows the property page of MSFS2004... first option button = ignore crash = &H830 => 0 (when selected) second option button is = detect crash = &H830 = 1 (when selected) first checkbox under "detect crash" = off-runway crash detection = &H848 (it has no influence if checked or not - I think it has not been impelmented) second checkbox under "detect crash" = detect colision with dynamic scenery = &H84A (it has no influence if checked or not - I think it has not been impelmented) However, both checkbox offsets (848, 84A) can be written to but no effect inflight... all crash detections seem to be detected with the second option button "detect crash" BR, AJ212 BTW: I'm using "FSUIPC for programmers.pdf" of the SDK v3.99 :wink: where both last mentioned offsets are described with "NO"... :roll:
  6. I'm using MSFS2004 (FS9 - with FSUIPC v3.99) for now... maybe later I'll switch to FSX but no timeline for that yet! I tried to read 0830 and got "0" as result after writing to it the read result was still ZERO and no effect on the plain inflight... For 0830 as well as for 084A there are check boxes in the FS settings... but I'm not sure if they are related to this two offsets... However, I'll check again and post an update later today! BR, AJ212
  7. Hi Pete, Sorry for the missunderstanding... I called the FSUIPC offset callbacks... little interference with other sim SW :roll: ...and, I'm not using any FSUIPC internal prepared key-macro option => under modules-FSUIPC-Button & Switches or Key Presses, cause I wanna try to handle all inputs via my own interface! Regarding the mentiones offsets: I couldn't test the season problem so far but the canopy thing is obsolete since this function is implemented within FS Falcon (SHIFT-E) ...but one more thing I have to ask you is how about the 'crash controll' offsets (&H830, &H848, &H84A) can they be changed inflight? Thanks and regards, AJ212
  8. Hi Peter, I singned at this forum to get some help on callbacks for FS9. I'm trying to programm my own interface for my MSFS2004 SIM project in combination with FSUIPC 3.99. I'm not using any Most of the callbacks are working fine but e.g. the season change callback (&H248) seems not to working. After starting a flight I'm standing on the runway with running engine and wanna write 1,2,3 or 0 to &H248 but the season is not changing at all... I don't know if I have to restart or refresh the sim after writng to this offset... ...another thing is writing to &H2A70 (canopy open/close) since there are no values written in the offset list I assume writing '0' and '1' to close and open the canopy... Thanks for your help on this... Best regards, AJ212
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.