Jump to content
The simFlight Network Forums

FrankP

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Munich, Germany
  • Interests
    Aviation, Flight Sim Pits

FrankP's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done Rare
  • One Month Later Rare

Recent Badges

0

Reputation

  1. Hello Pete, many thanks. Could it be that the Arduino and the USB Webcam try to communicate on the same port? Best regards, Claus
  2. Hello Pete, thanks for your quick reply! Opentrack basically is an open source alternative to TrackIR. Correct, I use the Lua Com library over a serial link. I just hooked up an Arduino which only counts up over a serial connection and there was no impact on the head tracking. The moment I started the Lua script, the head tracking froze again. Is there any theory on why the serial connections behave that differently? Many thanks, Frank
  3. Hello everyone, my simpit is finally coming together: Im using opentrack together with a ps3 eye camera and that works fine - as long as it is left alone. Besides that, I have a bunch of input hardware hooked up to an Arduino Mega, which is communicating with fsx:se via a FSUIPC lua script. That's working fine as well. (Exept some issues i still have to debug, but that's not the issue here.) The moment i start the lua script, opentrack freezes - sort of. The program still responds to all inputs, but the camera view shown in the opentrack window freezes. (To be precise the camera view flickers - between the last two images received I guess) The CL-Eye Test program, which comes with the PS3 Eye driver still shows the cameria itself working. Any ideas on how to approach that problem are highly welcome. I am not sure on where to start debugging. Many Thanks, Frank
  4. Hi, I am working on a simpit. The system architecture (communication sequence) is: In/Output-Hardware <> Arduino <> Lua Script <> FSUIPC <> fsx. I am planning to fly online on IVAO using their IvAp program. Setting a transponder code seems to be no problem. IvAp seems to read the code set in fsx (via the simpit/FSUIPC). For functions not supported by fsx like IDENT, I've found a website defining a couple of FSUIPC offsets that can be used for this and other functions: https://www.ivao.aero/softdev/ivap/fsuipc_sdk.asp I haven't implemented it, but a assume I will figure that out. What I haven't found out is how to modify frequencies using the 8 1/3 kHz spacing fsx does not support. What I am looking for is a way to set the frequency (I know, "channel" nowadays....) analog to the IvAp-Command ".c 123.456". (Somehow frequencies set using this command in IvAp are correctly dispayed in fsx, no idea how that is even possible as fsx saves frequencies as 123.45 with only two decimal places, it should thus be impossible to distinguish between 120.200 and 120.205.) The offset 0x6670 found in the link above is said to "contain the textual name of the frequency tuned on that Active COM." However the offset is said to be written only by IvAp, not read. Has anyone found a way how to write 8 1/3 kHz frequencies from a simpit to the COM1 and COM2 standby frequecies in IvAp? Every hint is highly welcome. Thanks, Frank
  5. Hello Pete, one thanks, one thing less to question. 🙂 Yes, I tried it with the stock C172, same result. Thanks, Frank
  6. Hello, my topic is probably out of focus here, but I don't know a better place to look for people with profound fsx knowledge. I am using fsx SE on a Win10 machine. Unlike in previous installs, changing the metric system to "hybrid" under > Settings > General does not change the Kohlsmann window from inHG to hPa. When I toggle between metric and US systems, the altimeter readout changes from ft to meter and back, as it should. There is just no difference between US and hybrid metric systems. I. e. the Kohlmanns-Window remains in inHg. Is there anything I can try besides the "hybrid" setting under > Settings > General? May-be there's a config-file anywhere to be modified. Thanks a lot, Frank
  7. Hello Pete, hello Chris, many thanks for both your replies. They helped me a lot to understand which assumed unknown unknowns don't exist and pointed me into the right direction. I've thus been able to find a simple solution. I've simply added 2500ms delay after the serial communication has been initiated. That alone does the trick. The arduino needs around 2200 ms to boot. 300ms later the data from sent via the lua script kicks in and everythink works like a charm. Here the relevant portion of the code in case anyone has the same problem. Arduino_Com_Port = com.open("COM"..port_number, speed, handshake) if Arduino_Com_Port == 0 then ipc.display("Could not connect to Switch Panel at COM"..port_number,10) ipc.exit() else ipc.display("Switch Panel connected at COM"..port_number, 1, 3) ipc.sleep(2500) end Best regards, Frank
  8. Hello, I am working on a panel, which is based on an Arduino which is connected to some input and output elements. When I start the lua script, it takes some time to connect to / boot the arduino. (The arduino has an LCD display attached to it acting as a cockpit watch and the display always goes black for a couple of seconds before lighting up again.) Through ipc.display, I can see, that all the parameters sent to the Arduino are initiated. But somehow the Arduino isn't ready yet, when they are send. As an effect, it isn't until the values change, that they are shown (resent) to the Arduino. Is there a way to initiate the values correctly? Many Thanks, Frank
  9. Hello Pete, thank you so much!!! 0: linefeeds - I don't quite know to be honest, but: 1: This not only made my day, it made my week-end! :-) I deleted the com.read-statement and it works like a charm. 2: Changed to 5, thanks! 3: Some of my rotary encoder, that I will add to the code, send multiple commands per dent when they are turned fast enough. For those, I include the suggested loop: 4: done Thanks a lot, Frank
  10. Hello, let me start by thanking Pete for his great work! :-) I am trying to replace the use of link2fs with lua-scripts. link2fs is great and it works but it seems to be no longer supported and while it finally seems to work with P3D V4 again, sooner or later it might cause problems. With the help of fess' and other examples online, I've written the following short script to adjust the QNH. I have verified using the link2fs traffic monitor that the arduino really sends "C25" and "C26" with linefeeds. The "Arduino_Data"-function also gets called, whenever I turn the rotary encoder. But that is as good as it gets. :-/ When I turn the rotary encoder slowly, nothing further happens. No datastring gets shown, nothing happens to the QNH. With the addition of the 50ms ipc.sleep before the datastring is read, the ipc.controls get executed when I turn the rotary encoder fast enough. (I assume that this happens when the com port buffer holds two Cxx-commands, because the datastring-readout that is shown in these case reads "C25C2", so one character is missing. When I am giving out the string length 'n', it is either 0, 5, 10 or 15. Something seems to quantize the datastring to multiples of 5. When I turn other encoders however, whose command is longer (e.g. "Y010"), n is 0, 6, 12, ... I've run out of ideas where the error might be and I'd be thankful for every suggetion where to look. Kind regards from Munich, Frank -------------------------------------------------------- --- VARIABLE INIT -------------------------------------- feet_per_meter = 3.28083989501312 port_number = "3" -- Change Port Number for your Arduino speed = 115200 handshake = 0 serial_wait = 20 -------------------------------------------------------- --- SERIAL COMMUNICATION INIT -------------------------- SwitchPanel_Com_Port = com.open("COM"..port_number, speed, handshake) if SwitchPanel_Com_Port == 0 then ipc.display("Could not open Switch Panel at Com Port"..port_number,5) --ipc.exit() else ipc.display("Switch Panel connected at Com Port "..port_number,5) end ipc.display("SwitchPanel script loaded", 10) -- TEMP -------------------------------------------------------- --- INPUTS --------------------------------------------- -------------------------------------------------------- function Arduino_Data(SwitchPanel_Com_Port, datastring, length) -- the code always gets here ipc.sleep(50) datastring = com.read(SwitchPanel_Com_Port,50,1) ipc.lineDisplay(datastring,-32) -- TEMP if (string.find(datastring, "C25")) then -- Increase QNH ipc.control(65883,0) end if (string.find(datastring, "C26")) then -- Decrease QNH ipc.control(65884,0) end --ipc.sleep(serial_wait) -- needed??? end -------------------------------------------------------- --- OUTPUTS -------------------------------------------- -------------------------------------------------------- function call_xpndr (offset, value) value = string.format("%04x", value) --ipc.display(value) com.write (Arduino_Com_Port, "=J"..value) end -------------------------------------------------------- --- EVENTS --------------------------------------------- -------------------------------------------------------- event.com(SwitchPanel_Com_Port, 50,1, "Arduino_Data") event.offset (0x0354, "UW", "call_xpndr") -- transponder
×
×
  • 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.