Interfacing lua with c#/dotnet

Discussion in 'Programming' started by joesphan lu, Aug 5, 2020.

  1. joesphan lu

    joesphan lu
    Expand Collapse

    Joined:
    Aug 5, 2020
    Messages:
    5
    Hello everyone! I am designing a 4dof racing cockpit (see here). The end goal would be to send live vehicle data (pitch, roll, yaw, heave etc.) from streams to a rs-232 serial port. I believe lua nor beamNG supports serial ports directly, therefore I will need to interface with an external program. Any help is appreciated.
     
  2. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    What you need is some external program that catches the UDP data stream coming from our motionSim code and then translate that to whatever you want.
     
  3. joesphan lu

    joesphan lu
    Expand Collapse

    Joined:
    Aug 5, 2020
    Messages:
    5
    I see that now. Is there a reference to decoding the UDP packet? I see what flyPT has posted (which is great), but that's not official.
     
  4. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    It's a C struct(via FFI), you can find the relevant signature in the motionSim.lua file.
     
  5. joesphan lu

    joesphan lu
    Expand Collapse

    Joined:
    Aug 5, 2020
    Messages:
    5
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice