Jump to content
The simFlight Network Forums

Matthew Twomey

Members
  • Posts

    45
  • Joined

  • Last visited

  • Days Won

    1

Matthew Twomey last won the day on October 25 2020

Matthew Twomey had the most liked content!

Profile Information

  • Gender
    Male
  • Location
    Palatine, IL

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Matthew Twomey's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. This would be my guess. I have also been through much experimentation with rotary encoders and Lua and FSUIPC (https://forum.simflight.com/profile/109385-matthew-twomey/content/ is one thread). I don't know about the specific use of Lua in FSUIPC, but generally speaking - it's incredibly fast, so it makes sense to me that you saw similar results in C.
  2. Well, unless / until you're familiar with most of the controls you might not really know what letter a given control starts with. For example, looking for landing gear controls I might type "gear" or "land" or "up" or "down" or "raise", ...etc. For lua scripts - they all start with Lua and there's several sections of them - so typing "buttonScript1" would narrow it down quite a bit. If I wanted to see any controls with "radio" in the name, I could type "radio". In general - just having it match anywhere in the name and filtering the list to matches would be quite useful and _really_ useful for new users especially.
  3. Lots of controls in there - might be a good enhancement to find things quickly or at least narrow them down if we could type in that box and have them "live filtered".
  4. Thanks John. I read those those threads and did some more testing tonight. A 1 byte read to 0x0B49 is exactly what I needed!! Thanks - this reads 1 when FLC mode is engaged on the G1k/C208 (just pointing that out for anyone else that comes along). By the way, is there a "live" document somewhere out there of offsets / controls for FSUIPC 7? I realize as the SDK gets refined on the MSFS side, these might be getting updates, changes, additions as we go along.
  5. Is it currently possible to get Airspeed Hold status from 0x07DC in MSFS? I'm trying to read this to detect the status of FLC autopilot mode, however it just always reads zero when testing?
  6. For #2, if it's a valid test - I can confirm that I can certainly play sounds from other Windows applications while MSFS is running and producing sound. For example I can watch Youtube videos with audio, use the media player, ...etc. I Can also play the wav file(s) in question.
  7. 1. [[STRING]] is quoted literal format for Lua. It works fine and avoids the need to escape anything, you can read more about it on lua.org. None the less, I've tried it several ways including a regular escaped string. 2. What is the best way to check this? -Matt
  8. I can't seem to get the sound working in FSUIPC7. Here's what I'm doing: ipc.log(sound.device(0)); sound.path([[C:\]]); s = sound.play("click2"); if (sound.query(s)) then ipc.log("Sound played."); else ipc.log("Sound not played."); end Here's the result I'm getting: (and obviously no sound is playing) I have a 1 minute long wav file (named 'click2.wav') right in C:\ (just to make sure there were no path spaces issues). Windows can play the file fine, but I've also tried several different files.
  9. Yep +1 on this, just ran into it myself. Using the map-to-key for now.
  10. Ok - this seems to take care of it: handle, rd, rdf, wr, initreport = com.openhid(0x04D8, 0x8A3D); initreport = com.readreport(handle, 0); for i = 0, 3, 1 do local state = com.testhidbutton(handle, i, initreport); if (state) then ipc.log(i .. ": on"); else ipc.log(i .. ": off"); end end ipc.log("val1: " .. com.gethidbuttons(handle, initreport)); I'm not sure if that com.readreport is the right approach, but it's working. If anyone has a thought on this, please share.
  11. Looking for the easiest way to get the button state from a controller in a lua script that I'm running as "Auto" when FSUIPC starts up. My code is working, but things don't fall into place until I put some input on the controller I'm mapping. As soon as I provide any input - everything starts acting as expected. I tried using the initreport from com.openhid, but I may not be doing this right. Here's what I'm at with this: handle, rd, rdf, wr, initreport = com.openhid(0x04D8, 0x8A3D); for i = 0, 3, 1 do local state = com.testhidbutton(handle, i, initreport); if (state) then ipc.log(i .. ": on"); else ipc.log(i .. ": off"); end end Regardless of the actual button state (actual physical switches in my case), all buttons come back as false, until I trigger any button - at which point they all immediately start reporting correctly. Is there a way to force it to "scan" the controller, or maybe I'm just doing it wrong?
×
×
  • 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.