Jump to content
The simFlight Network Forums

pbrand

Members
  • Posts

    13
  • Joined

  • Last visited

pbrand's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. Yes I tried the following: Only the dll The dll and TimeForLuaClosing=5 The dll and TimeForLuaClosing=5 and event.terminate Only the combination of all three seemed to work.
  2. Hi John, Sorry, probably missed that latest version of the dll in the thread. I have tried the version you gave me now and it seems that, together with setting TimeForLuaClosing=5 and using event.terminate for com.close, it now works (using only the dll didn't do the trick) πŸ™‚ I have also followed up on your advice concerning a separate profile so now the lua scripts only auto run when the A2A C172 is loaded. I shall perform some more extensive testing to see if the error stays away. Thanks for the help! I will come back to this thread if I have more news after further testing. For now it's looking quite good sofar. Peter
  3. I have done all three things, John (one by one). Other dll, increased value for TimeForLuaClosing and event.terminate. I no longer see a lua crashed in the log files. But p3d still hangs. I have put some debug message in the terminate function. And I can see that the com.close is called. But the ipc.log after the com.close is not present. Do you have any other things I can try? When I remove the luas from [Auto] it doesn't seem to crash anymore but of course that is not a real solution 😞 Peter A2AC172RBravoAnn.lua A2AC172RBravoAp.lua A2AC172RBravoCommon.lua FSUIPC6.ini FSUIPC6.log
  4. Thanks for the compliment John πŸ™‚. They are my first attempt at lua (c# developer myself) so not sure if it is 'the lua way' but I try to write maintainable and readable code. I shall try your suggestions tonight and come back with the results. Peter
  5. I hope someone can tell me if I'm doing something wrong, and if so what it is πŸ™‚ I have written some lua scripts for supporting the Honeycomb Bravo throttle. I have included them in the [Auto] section (two files) so they are auto loaded. I start p3d V5.1 with the default Mooney Bravo aircraft. When I then switch to the aircraft I want to use, the A2A C172, p3d crashes. The fsuipc logfile shows the following messages. 167844 Lua threads being terminated: 167844 1 = "D:\FlightSim\FSUIPC6\A2AC172RBravoAnn.lua" 168000 LUA: "D:\FlightSim\FSUIPC6\A2AC172RBravoAnn.lua": killed 168297 **** DevCom read/write threads still running - will exit anyway but could cause issues... 168610 **** DevCom Read thread terminated 168610 LUA.0: Crash C0000005 at 7FFB753F31A7: "" When I repeat the same procedure but with an empty [Auto] section, all is working fine. I can switch to the A2A 172 and p3d does not crash. When I load only one file in [Auto] so either A2AC172RBravoAnn.lua or A2AC172RBravoAp.lua, then all seems to be working fine as well. So it seems to be that the lua scripts themselves do not contain errors? I hope someone can help me in how I can prevent the crash and use the lua scripts in fsuipc to operate correctly? I am of course not sure what the cause of the crash is. I have included the log, fsuipc.ini and the lua files. I hope that is enough info πŸ™‚ Peter Logs_etc.zip
  6. Pete, I believe Offset Increment/Decrement Controls is just what I did in my example in the starting post? Your tip on press Γ‘nd release is great! That already helps a lot. I will also look into the rotaries.lua to see what I can do with that. Thanks for the help πŸ™‚
  7. Hi Pete, I started to use this because the actual controls for Trim up/down are extremely slow when I move the wheel. At least they are for the aircraft I'm using (A2A C172). Peter
  8. I am using p3d V5.1 with the trim wheel of the Honeycomb Bravo. The trim wheel is nothing more than two buttons which fire when moving the wheel. I have programmed the wheel to use an offset for trimming up/down: [Buttons] PollInterval=25 ButtonRepeat=20,10 3=R0,22,Cx32000BC0,x3FFF0040 -{offset sword increment, offset 0BC0 (Incr=64, Limit=16383)}- 4=R0,21,Cx42000BC0,xC0010040 -{offset sword decrement, offset 0BC0 (Decr=64, Limit=-16383)}- This works just fine when moving the wheel slow. But when moving the wheel fast(er) the trim rate doesn't get much faster than moving it slow. I tried to enable the repeat option on the button but that has little to no effect. Perhaps because it isn't a fast repeat like when you have a button pressed but instead a slower repeat due to the rotation of the wheel? I would be grateful if someone knows how to increase the trim speed when moving the trim wheel faster. Regards, Peter
  9. I understand that you are a busy man, John. I will see it when you've had the time for it.
  10. @Paul actually I'm using a lua library provided by fsuipc. Don't know how that works under the hood and if it talks to the HID directly or via fsuipc. I have written some lua code to operate the LEDs on the Bravo. It is my first lua attempt and it works, but I found out that I'm not a great fan of lua. No strong typed variables etc. So I decided to have a go at it with c# since that is what I do for a living anyway πŸ˜„ I then came accross your library and thought it could do everything that fsuipc could but using .net. A clear misconception at my end and alas for me it doesn't. It's a great library but I need to do additional stuff in another way it seems. I could use a lua 'bridge' have to think about it. It would be easier but also contain lua 😎 @Pete Your assumption is correct. You always test what you've done in the real environment of course. The development process itself looked easier using widefs which I purchased yesterday for that purpose. I shouldn't have done that now it seems 🀣 Thanks for the tip about the debugging server! Hadn't thought of that. Shall look into that to see if you can also debug HID calls that way. Much to do and many thanks for your help Paul and Pete!
  11. Hi John, In the fsuipc client dll subforum I asked Paul about a possibility to identify a joystick based on vendor/product just as we can open a device in lua using those properties. Paul told me this currently isn't possible in the client dll because the information isn't available in the IPC interface. Pete then suggested some offsets could be added for this purpose and suggested I ask this in the main forum. The original conversation is in here. It would be nice if this feature could be added to FSUIPC (I use version 6). Kind Regards, Peter
  12. @paul Thanks Paul for your answer! You not only say it's not possible in the client dll but also give me a possible solution on how to get the information. Much appreciated! I have no experience with joy stick programming so your example code for SharpDX is very helpful and I will have to look into that further (Google is my friend πŸ˜„). Although it's a bit unfortunate I have to use such a library since I am now using widefs client to develop because I don't have Visual Studio 2019 installed on my flight sim computer. SharpDX will of course not work (I guess) if I'm not on the flight sim computer itself... On that same level: The Honeycomb Bravo LEDs are controlled (in the lua script I wrote) with com.readfeature and com.writefeature. I guess those commands are also not available in the fsuipc client dll then? @Pete Thanks for your additional info. It's very helpful in identifying the joystick. I think it could be very helpful if vendor/product would be available. Especially since I am using widefs client because I don't develop on my flight sim computer. I shall post a request in the main forum. I'm using FSUIPC6 πŸ™‚ Peter
  13. I am a fresh user of the client dll. I am looking at the examples and very nice that they are there because many questions are answered by looking at them! However I could not find an answer to the following. When using lua in fsuipc you can open a device with something like local honeycombBravoDevice = { Vendor = 0x294B -- Honeycomb Bravo vendor id , Product = 0x1901 -- Honeycomb Bravo product id , Number = 0 -- Multiple devices of the same name need increasing Device numbers , Report = 0 -- I *think* all joystick types use Input Report 0 } local dev, rd, wrf, wr, init = com.openhid(honeycombBravoDevice.Vendor, honeycombBravoDevice.Product, honeycombBravoDevice.Number, honeycombBravoDevice.Report) Based on the vendor and product you now have access to the correct device. In the client dll I can use FSUIPCConnection.UserInputServices.AddJoystickButtonPress("Btn0", joystickNumber, buttonNumber, StateChange.Both); Here you have to specify the joystick number. I don't know which joystick number the real device has (I'm trying to make it usable for other users with other configurations). Is there a possibility in the client dll to determine the joystick number based on vendor/product (or some other unique identifier)? If not, then I shall have to use a configuration file to define which joystick number to use but hoping I don't have to πŸ™‚ Regards, Peter
×
×
  • 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.