Jump to content
The simFlight Network Forums

John Dowson

Members
  • Posts

    12,243
  • Joined

  • Last visited

  • Days Won

    249

Everything posted by John Dowson

  1. Does that mean 5.15 doesn't work for you?
  2. Do you mean 5.15? @UniformAlpha2014 reports 5.11 being ok, but I assumed that was a typo. I can post 5.15 if you really need it (i.e. reducing AI traffic is not an option), but this is not supported, so please don't post any issues if you use it. Let me know. I'm pretty certain that the problem is due to heap corruption somewhere, but its a bugger to track down. The release (commit) where the problem first arises is not related to where the problem was introduced. Any heap analysis tool I've tried crashes in P3D before it even touches the FSUIPC code, which is also worrying (and am working on to raise with LM). Thanks for all the info so far, but no point in posting more really - just adding noise to the topic. Cheers, John
  3. Hi Ernst, Can you check that you have controllers disabled in P3D. If so, please post your log and ini files. John
  4. Maybe its this OACSP.observeOffset (0x057C, OAC::OFFSET_UINT32); // FSUIPC offset 0x0578 pitch Wouldn't OFFSET_UINT32 be for unsigned 32-bit ints? You want signed.
  5. If I monitor 057C (as S32) in the FSUIPC logging tab, I can see this value change from + to - and it looks to be correct. This is in FSUIPC5. Can you try this to see if you see the same? If so, then the error is in your code (or the interface library you are using - what is this?)
  6. There is a know problem with AI when using AIM OCI which is currently being investigated - see This only seems to happen with lots of AI traffic, so for the time being try and reduce your traffic sliders to < 50%.
  7. No problem. You can add ipc.log statements anywhere you wish - it just logs the message in the output. John
  8. Hi again, just noticed your actual requirements: The function provided above only changes the step rate based upon the speed of input - anything less than 200ms (or over 2s) will set the step/delta to 1, and if the time since last input > 200ms (and < 2s) then it will set the step/delta to 10. If you also want to add logic to adjust the step/delta rate depending upon HDG difference, then you will need to add this yourself. John
  9. I've also just noticed that your are reading the lvar AB_AP_HDGTRK twice, into variables AB_hdgtrk and AB_drift. You never use the latter. Also the function DspHDG isn't defined, so the script can be simplified to: require "socket" lastTime = 0; function AB_HDG_plus () currentTime = socket.gettime()*1000 difference = currentTime - lastTime lastTime = currentTime if (difference > 200 and difference < 2000) then delta = 10 else delta = 1 end AB_hdgtrk = ipc.readLvar("AB_AP_HDGTRK") if AB_hdgtrk == 0 then LVarSet = "AB_AP_HDG_Select" else LVarSet = "AB_AP_TRK_set" end LVarGet = round(ipc.readLvar(LVarSet)) AddVar = LVarGet + delta if AddVar > 359 then AddVar = 0 end ipc.writeLvar(LVarSet, AddVar) end event.flag(1, "AB_HDG_plus")
  10. You should review basic lua programming! Merging the code I gave into your function gives this: require "socket" lastTime = 0; function AB_HDG_plus () currentTime = socket.gettime()*1000 difference = currentTime - lastTime lastTime = currentTime if (difference > 200 and difference < 2000) then delta = 10 else delta = 1 end AB_hdgtrk = ipc.readLvar("AB_AP_HDGTRK") AB_drift = round(ipc.readLvar("AB_AP_HDGTRK")) if AB_hdgtrk == 0 then LVarSet = "AB_AP_HDG_Select" else LVarSet = "AB_AP_TRK_set" end LVarGet = round(ipc.readLvar(LVarSet)) AddVar = LVarGet + delta if AddVar > 359 then AddVar = 0 end DspHDG(AddVar) ipc.writeLvar(LVarSet, AddVar) end event.flag(1, "AB_HDG_plus") John
  11. To get you going, here's a short lua script that will adjust a delta value depending upon the time since last activated - it requires the lua socket package which you will need to download and install if using FSUIPC5: require "socket" lastTime = 0; function myTimer(flag) currentTime = socket.gettime()*1000 ipc.log("Current time is " .. currentTime .. ", lasTime is " .. lastTime) difference = currentTime - lastTime if (difference > 200 and difference < 1000) then delta = 10 else delta = 1 end ipc.log("Delta is " .. delta .. " (difference=" .. difference .. ")") lastTime = currentTime end event.flag(1, "myTimer") You can use the logic in this script in the first script you posted (dump the second) - should be reasonably straightforward (hopefully!). John
  12. event.timer calls a function after the interval specified, it doesn't return anything. In your case, it will call a function called 'deg1', which isn't defined. What you need to do is to save the current time whenever you increment. Then, the next time your function is called, you can compare the previously saved 'current time', and adjust your reading delta accordingly. John
  13. Hi, sorry for the late reply, but I don't understand what you you are trying to do (I was hoping someone else would jump in on this one!). If you cannot achieve what you want by using the right hand side of the Axis Assignment tab, which allows you to send controls when the an axis range is entered or exited (and also optionally on conditions by manually editing the ini), then you will need to look into using a lua program. Such a program should auto-run and monitor the throttle axis using the event.control function. In this you can maintain state and perform any action required depending on the throttle value and current state. John
  14. First, check that you have controllers disabled in the sim. If not please disable and try again. If your problem persists, please post your ini file.
  15. In your [Auto.Concorde] section you need 1=Lua IAS Display
  16. Hi, do you mean that you are programming the button ok, but then this is not working in the sim? Your button assignments look ok, all assigned to a profile called 'Single Prop No Two', which is just for the 'Mooney Acclaim With G1000'. You have no general assignments. If its not working for that aircraft, can you activate 'Button and Key operations' logging and 'Events (non-axis controls)' logging from the FSUIPC logging tab. Activate a programmed button and post your log file. Your files show only 1 throttle quadrant connected. Which mans that you have controllers enabled? This is generally a bad idea and can cause issues - you should either assign in the sim or assign in fsuipc (see page 33 of user manual). If you disable controllers in P3D, you can assign your hat to the sims 'Pan View' axis in the Axis Assignment tab (with 'Send to FS as normal axis'). Also try a general assignment to see if that works, as opposed to a profile specific assignment (although both should work, of course). A couple of tips (not related to your problem): - manual set AutoAssignLetters to Yes in your ini file (or assign letters to your devices) - see 'Joy Letters' section of User manual, page 21. This will prevent possible USB problems if you re-connect to a different hub - try adding ShortAircraftNamesOK=Substring to the [General] section of your ine. You can then adjust you profile assignment section to something like 1=Mooney Acclaim which would then cover all variants (see appendix 2 on page 53 of Advanced manual John
  17. Yes, paid/licensed version is required to run lua scripts.
  18. Hi Ray, of course - just add to the [Auto] section of your ini (or the [Auto.<profile>] section if profile specific. See p40 of the Advanced User manual. ...ah, but just noticed that you are referring to P3Dv3 not v4, so presume for FSUIPC4, no? Not 100% sure when this was implemented so this feature may or may not be available - check your FSUIPC4 user manual.
  19. Hi Gundars, that is a long time ago! I'm afraid I can't help much with your question - Pete will be back in 2 weeks or so and may possible remember the problem to which you are referring. However, you should just go to the download links page and download the latest FSUIPC3 version (for FS9 and earlier): If you are now using a different sim and require FSUIPC4 or FSUIPC5 then you will require a new license. Cheers, John
  20. Hi Stephanev, glad its working for you - and wow - that is a great set-up you have there!
  21. Hi Dave, could you post your FSUIPC5 log, ini and JoyScan files please. Which Goflight modules are you running, and are you sure that they are being loaded? Cheers, John
  22. As Ray says, this is going to take some time, especially with Pete being away. Its not an LM issue, it seems to be a timing issue in FSUIPC and I can't replicate in a debug version, so its tricky to track down. Just reduce AI traffic for the time being. I will post when I find more info. John
  23. Hi Scott, 'DIRECT' means you selected the action 'Send direct FSUIPC Calibration'. The calibration you have set for the Ailerons is as follows: Aileron=-16103,-1152,-1090,16249 Your 'null' zone (around neutral) is -1152,-1090, which is very small (62). Try re-calibrating this in the 'Joystick Calibration' tab. John
  24. oh, and the FSUIPC5.JoyScan.csv after a successful start please.
  25. Could you also provide the FSUIPC5.log file for this as well please. John
×
×
  • 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.