Jump to content
The simFlight Network Forums

PhilippeV8

Members
  • Posts

    46
  • Joined

  • Last visited

Everything posted by PhilippeV8

  1. 1) forgot to ask .. you speak of fsuipc's IPC read/write logging what's that ? is that a function I can call in the software ? or is that something I find in the GUI in FS ? Or is that a tool I need ? I don't think I've ever heard of anything like that. Then 'bout using a language I am familiar with .. yes I am familiar with VB.Net though I have only had 2 years of programming in school. Twice the same year that is. With half a year being Java and half a year being VB.Net. So yes I can manage writing my own program and my own software. And NO I do not have any clue what most code of the fsuipc is doing. Also I know certain terms like arrays and hashtables and functions and librarys etc .. but then there are things you talk about like accessing memory and pfffff .. don't know. Sometimes it goos way over my head still. So what the ideal scenario for me would be is just copy paste the "fsuipc-code"-block into my program so that the link exists between my soft and the dll. From there off, I write my software like I want. That's it. So don't expect me to be able to do any bug fixing into that fsuipc code block :) So as you see .. I only use VB.Net because I got only 2 languages to chose from. And I kinda hate Java and I kinda like VB.Net because it's easy coding in the Visual Studio IDE. Then on the part where you say: That's not what Bob sais in his comment. He tells us to do: (timer tick) read / process / get / read / process / get (timer tick) read / process / get / read / process / get (timer tick) read / process / get / read / process / get (timer tick) read / process / get / read / process / get or at least thats how I understand it. Is that wrong you think ? Should I interprete that line "repeat steps 3, 4 and 5 as necessary as this: (timer tick) read read read process get get get (timer tick) read read read process get get get (timer tick) read read read process get get get (timer tick) read read read process get get get that would make more sence from what you (Pete) say .. however he sais "repeat steps 3, 4 and 5" where step 4 is the process item which he thus sais to repeat ....[/code]
  2. Could be indeed, I have to say .. I do not understand ANY of the fsuipc code anyway. I just hope I can put it in there and that it works, nothing more, nothing less. But the thing is, if you take that code out which I posted, then the thing won't compile simply because it contains the ... Dim t_FSUIPC_Lib_Version As Integer ... to say the least. But indeed if I take the other line where 't_FS..etc' is actually used out as well .. then the program can compile again without errors. Concerning how I do my "inefficient" code, I found both this: ' BASIC USAGE GOES LIKE THIS: ' - call FSUIPC_Initialization() to initialize important vars at beginning ' of program. ' - call FSUIPC_Open() to connect with FSUIPC if it's available. ' - call a series of FSUIPC_Read and/or FSUIPC_Write and/or FSUIPC_WriteS (be careful when ' combining these in the one transaction, for your own sanity). ' - call FSUIPC_Process() to actually get/set the data from/to FS. ' - For reads, call FSUIPC_Get to retrieve data read from FSUIPC (New for VB .Net) ' - repeat steps 3, 4, and 5 as necessary (Bob's comments from inside his code) And this: (Bob's comments on a previous topic on the same problem here in the forum) http://forums.simflight.com/viewtopic.php?t=14236&start=0&postdays=0&postorder=asc&highlight= Either way could it be that this way I work is the reason why it goos wrong ? If I do not manage to get my fault out of the code, I hope I can send my entire code to Bob and have him have a look at it and tell me what goos wrong.
  3. I figured out his nick on this forum is "Airforce 2" so I've sent him a PM ;) Hope he can read the other topic cuz I explained quite a bit in there. Cheers, Phil
  4. Ok, in the meantime I had filtered out some faults myself, still no joy though. Then I got Scott L Fausel's code .. again no joy. So it must be that I am doing something wrong elswhere ... Ok on the errors in the code file "FSUIPC Shell.vb" that is in the SDK zip: At one part there is a ";" sign which VB.Net does not want to recognise so removing that one works fine. Then there is a section: ' write our Library version number to a special read-only offset ' This is to assist diagnosis from FSUIPC logging ' But only do this on first try Dim t_FSUIPC_Lib_Version As Integer If (i < 2) And (Not FSUIPC_Write(&H330A, 2, t_FSUIPC_Lib_Version, dwResult)) Then FSUIPC_Close() FSUIPC_Open = False 'Console.WriteLine("Stopped line 455") Exit Function End If That is missing. It should come in front of the line: ' Actually send the request and get the responses ("process") Which you can find using a search. These 2 changes make it possible for the code to be compiled. However it does not link to fsuipc. So in Bob's code the initial function calls to open fsuipc, if it doesn't work it "End"s the program so by removing that you can actually get the GUI to show and stay on your screen. Adding a button which calls the fsuipc_open command and shows a msgbox stating "ok" or "not ok" gives me the info if connected or not. So this is how I know that this mod doesn't make the code connect to fsuipc. I don't know where there is something different still but I got Scott L Fausels code working (connecting to fsuipc). However as said, still it goos funny after a minute or 5. Values (like Nav and XPDR) are read every 100ms. When they go weird they stay to that weird value. Then when I hit a btn in my (hardware) cockpit so to send a "virtual joystick button" or else .. to trigger a "write" command that weird value changes. Maybe this gives a clue ... What I do is: I have a timer going round in 100ms. First it will call "ReadFromFS" and pass an address and a length to that function. Inside that function first the read is called, then the process, then the get, then it will return the value (xpdr or whatever). Same thing over and over again untill I got all my values (maybe 8 or 9 I need). After that still in the timer I got a code which will call a "WriteToFS" function IF a variable it true. So whenever I press a switch it is sensed by the Photon scanning code and will set that variable true and provide a number. The code into the timer will notice the true state of that variable and get the number. Then it will set the variable back to false and use the number to go look into 2 arrays for both the correct offset to write to and the value to write. Then it will call that "WriteToFS" and provide it with the offset and the value. The WriteToFS will do first a write, followed by a process. Then the timer tick starts over again. Maybe you see something wrong in this ?
  5. Ok, I found a few threads here with the same issue as mine. From that one I found a "wraparound" bug-fix which I did. From the looks of things .. it goos a little better now but the thing still hangs after 2 to 3 minutes. Maybe there are more bugs ? Either way, I hear that Scott L Fausel is using .Net and fsuipc without any problem. So I hope he can help me out. But hope to hear from Bob Scott none the less.
  6. Anyone can help me out here pls ? If Mr Scott can make the .Net part of the fsuipc SDK work, I'd be a big step closer to getting my sim cockpit flying !
  7. With logging tools you mean "fsinterrogate.exe" from the SDK ? Which zip, which file ? Obviously the zip with the .Net code in it. Go to this site: http://www.schiratti.com/dowson.html Scroll down to the bottom. Download the "fsuipc sdk 21st release". Inside you'll find "UIPC_SDK VB .Net Shell Revision 2.003.zip". Inside the files are .Net project. When opened in VisualStudio.Net one can not compile this project due to the 2 failts into the code. I wish you could have someone with good knowledge of VB and VB.Net look at this part of the SDK because it simply does not work.
  8. Hi Pete, I am having problems again with the .Net code for fsuipc. When using my own code I can write my program and make it do nothing but read the nav and com etc values. Nothing but that: all goos well. I can set up my code such that it does nothing but write the "virtual joystick button presses". Nothing but that: all goos well. Now as soon as I do both in my code, the readings go wild after .. lets say 1.5 to 2 minutes. When trying to use the code from Bob Scott which comes straight from the FSuipc SDK, it doesn't even want to 'render' because there are 2 errors into his code. One is a ";" somewhere. Which is an unrecognised character. And the other is "t_FSUIPC_Lib_Version" which is not declared. Maybe you can help .. if not you can maybe forward me an address where I can contact Mr Scott via E-mail. Tnx
  9. Well what I'm doing is quite simple. I have Scott's Photon interface without his software. He is using the offset to pass keystrokes via widefs. I am using the joystick button offsets as you suggested me before. I do program the output on the Fsuipc "button" page. Remember the issue I had within fs9 and not in fs8 with the thing going wierd when I go to the "button" page. I do not know if I am losing Shift events on the FS pc when doing something local. I have never experianced any problem with this. Or before with my Hagstrom, no problem then either. What I think now that is going wrong somewhere is that the shift key is pressed but sometimes is not released .. might that be the problem ?
  10. Hi Pete, Quick question. I use the virtual joystick buttons to pass triggers from my program via widefs to fsuipc on the sim pc. Now I noticed that when I use a key like "m" it works perfect. When I use "shift+m" however .. 50% of the times it misses the shift and gives me an "m" !! Do I do something wrong ? Or is there a way around this ? Cuz I do not want this to be happening !
  11. Hi Pete, A while ago I asked some questions regarding sending keys via wideFS. I'm done with that now, they work. You suggested using the "joystick button" 3340 offset. Now I am trying to make that work. However, when I select the "button" page in fsuipc (fs9) the whole thing doesn't respond anymore. Windows does not indicate that FS has crashed but I can not close it, and neither can I change anything to the fsuipc window. Then I tried doing the same in FS8 and there, all works fine. Any idea what might be going wrong in fs9 ? Either way I can program the actions to perform in fs8, then copy paste the section [buttons] from the fsuipc.ini file from the fs8 modules folder to the one from the fs9 folder. Then it works as well in fs9. Strange though that this thing goos wrong with the "buttons" page in fs9. The version I work with atm is 3.22 and as I am typing this I have checked. It is the last new version.
  12. Hmmmz .. I see your point :) So first I write my program to use this "button" facility. Then I hook up my sim to the interface. Then I press a button in my cockpit while having the "button" window shown in FS>Fsuipc. Then it will be triggered and I can set the output key. That is nice indeed. I don't have my interface yet, that's probably why I didn't understand it straight away and I couldn't use it at this point. I expect my Photon to be here next week. It's a strange idea however if you use a hardware interface and need keycommand to think of something as a joystick :wink: thus my confusion. I know from Scott from Photon hardware that he is using an other option. Offset 3200. His point on using this prior to using the "sendkey" option is that it would enable sending keys to FS even when FS has no focus. He is making software that is used by a varyity of people whom have all other needs. However, my software is just for me personal use so I can make it a simple as I want. Either way, it turns out I have these 3 choises I can make. Buttons, Sendkey or Offset 3200. In the end, they all come down to the same thing. Though using buttons as you suggest would allow me to change a key command later in time without having to go into my code but I don't see that as a problem. I keep my source files so ... If in time an other option than sendkey seems preferable to me I can still change. That's the big advantage of making your own software :) I know now how to use all 3. I'm outa here now. Thnx very much for the info and for taking the time to try and help me out here. I appreciate it a lot. Cheers, P.
  13. Victory for me :D I tested an older gauge file and indeed it turns out that Espen changed something in his new file which cancels the option for the panel to receive keypresses generated by the pc and not by the user. Sorry to have bothered you here Pete. I'm on my way to e-mail espen. Cheers!
  14. Well if I don't have a joystick button to press to let fsuipc know which button I want to assign whatever action tohow do I do this then ? Either way, I'm currently testing an older gau file to see if it makes any difference. If not I'll first check with Espen as to why it doesn't work. The reason why I prefer keypresses over anything with joystick buttons is that espen is just making those keypresses hard coded in his gauge files. And I find using "virtual joysticks" rather confusing If my software can just do keypresses as if I would just press the keys and if espens panel captures them, then it's quite easy. All I need to do is make my software send a keypress and not write anything via to fsuipc which I can do, but I find it rather complicated at the same time. Though your explaining on the 3340 subject makes much better sence now. So if I would need to use that for whatever reason, tnx ! I think I get it now :)
  15. Ok sorry ! A final test gave me this result: It is espens panel that does not accept initiated by a software, only by hand. This became obvious when I ran my software on the server PC. I know that Espen has been fooling around with the "receive key" option in his panel or whatever it is called. The problem we had was that his panel would accept keys even when FS did not have the focus. This would result in a weird setting of the panel whenever you whould let FS fly on autopilot for a bit and go type something in a forum or on msn. He wanted that out and I think now instead of disabeling the option to send keys when the panel is out of focus, he disabeled the option of sending keys from a software. I am very happy to know and to tell you, Pete: your stuff still works great :wink: :lol: I'll have to talk to Espen. 1 very final test is comming up with an older version of his panel to check if indeed it did use to work before. It should but just to make sure.
  16. Oh My God ! This is madness ! :shock: I have done something else. I've given focus on the server pc not to fs but to notepad there. Turns out that my "sendkey("c")" DOES get to the server pc via wideclient. However for some reason it doesn't do anything in FS. While a normal keypres "by hand" does work ? Is this strange or what :?: Any ideas there, Pete ?
  17. Hi Pete, I've been working on my software some more and came to the conclusion that WideClient.exe does not receive the keypresses generated by my code. :cry: It does get the ones I do on the keyboard. The ini file is set up right and all. But no luck with the "sendkey("a") test I did. Even with wideclient having the focus, of cours. Notepad receives those keysends just fine. If I find no sollution for this I'll have a look at those 3340 ofsets. Is it correct if I think I should send a string with 0's and 1's to this offset. If e.g. the first bit of my string is a 1 and all the others are 0 then the first "joystick button" is pressed. You talk about 9 such "joysticks" or 9 dwords. Do I all write these to 3340 ? or is it 3340 then 3341 for the next ? And how do I set these in fsuipc ? It must be via the ini file or something since I can not access the "button" menu so it seems without pressing a joystick button. This all seems rather confusing and complex to set up compared to the first sollution. I wonder if you have any idea why my "sendkey" function from VS.Net does not get heard by wideclient while it does work on notepad and on FS if on the same pc. I could shift my software to the FS pc and not use widefs but then i would lose FPS due to the processing speed needed for my software which would be sad indeed. Any idea maybe on how I could fix this ? Hope to hear from you soon so I can get back to work 8)
  18. awesome, tnx! I was looking all over the pdf files from both fsuipc and widefs but couldn't find it there.
  19. I read in the WideFS manual that WideClient can send keys to programs whenever something on the FS (server) pc is triggered (like a key or a button). Is this proces also possible in the other direction ? I will have to run my interface software on a client pc due to the fact that it uses to much resources and it would hurt FS's FPS. Because the panel I use doesn't use FS token variables, and needs direct key input, I would need WideClient to forward the key input from the client pc back to the server pc and trigger the keys there. Is this possible ? If not, will it be in the future ?
  20. http://users.skynet.be/porreke/FSuipc.Net.txt I thought this was still missing from the SDK, right ? There is a VB sample in there but all it does is copy the orriginal code to a .Net project. It doesn't give any example code as to actually use the thing. My version here does. Enjoy !
  21. Hy Peter ! I got a question for you .. I got this problem here. I'm building my cockpit around Espens famous Fokker50 panel ( http://www.fokker50.be.tf if you want to check what I got so far ) Now this panel uses it's own variables most of the time. Since I'll be using FSbus to interface most of my cockpit I'll be able to use keys / buttons / 7seg LED displays / LEDs. The situation is as follows: The data for the LED displays, like altitude setting of the autopilot, hdg, crs, com and nav will not be a problem to get out of FS via fsuipc I think. Then there are the inputs I make via my cockpit towards the panel. For that Espen is making me an updated version of the gau file with hard-coded key commands, so there again, no problem. Then there is the issue of the LED's. All LED's that are in switches that go on/off on a keypress will be no problem. I'll get an FSkey card from FSbus and the input is registered by the FSbus controller and can be sent to FS via fsuipc (or directly via keypress hardcoded in the gauges) as well as back to FSbus controller cards. So when I press eg the switch for the lights, the FSbus controller will register the input and turn on the lights in FS via fsuipc and will turn on the led in the cockpit which is connected to an FSled card. Ok, so far so good. The green leds for the gear will be no problem since this is a basic FS function and FSbus will notice this change via fsuipc and will change the leds in the cockpit as needed. But then the problem occures. Mostly this is for the autopilot functions. There are a number of LEDs in the cockpit which should go out when an event in FS takes place. This event is not registerable via FSuipc since Espen used his own vars. Eg of these are: ASEL (option that is set to monitor if the plane has reached a specific alt. if it does, the led goos out) Emergency lights etc. Now for my question :? Could you .. (and i know you would be very kind & generous if you would) .. make me a dll plugin for FS which could get me that data out of FS ? Maybe a special version of the FSuipc dll or such ? I know some programming in .Net and VB6 and Java, but I got no idea how to make gauges or FS plugins myself :oops: If you would want to make this work for me, I'd first ask Espen the names of the vars or the location in the memory or whatever it is that you'd need and then pass it to you. I hope then that I can make the FSbus system locate these data changes in the computer and make it output to my cockpit. Would be awesome ! In fact .. the emergency panel is optional. Indeed when something goos wrong I'd be happy to know what is wrong (I'll hear the beeper anyway) but if I have to I can make a switch under the emergency panel in the cockpit which pops up the emergency gauge panel on my outside vieuw panel and thus I could check what is wrong. So that's not high on my priority list. It's the ASEL option and maybe a few others that are more important. if I can't make these work, I'll turn on the LED by pressing the button (the option will be ON in fs as well). Then in FS the option goos out but the LED remains ON. Then when i press the switch again, the LED goos out but the option in FS goos ON :? U C .. it would be quite confusing after a few hours of flight :wink: I'll check to see which options I'd like other than the ASEL. Maybe it's the only one, I'm not sure. Hope to get an answer from you here :) Happy Holidays btw Philippe Vanagt BTW, did I ever send you the data on how to code for fsuipc via .Net code ? Cuz the default code in the SDK didn't work.. if you can remember. I was trying to make some sort of FS-benchmark program at the time and get the FPS out of FS2002 If not :? .. cuz I lost the source of that program due to a virus :evil:
×
×
  • 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.