Board index FlightGear Support Interfacing

FlightGear Serial Out to Arduino

Connecting two computers, using generic protocol, connecting with Matlab?

Re: FlightGear Serial Out to Arduino

Postby IndiPal » Fri Aug 07, 2020 8:16 am

Hey zakalawe,

Thanks for your input. :D

You mean I should fix the bug? I would have loved to but unfortunately I'm currently not familiar with FG source code and serial communication to even know where to start. :oops:

If it doesn't get fixed soon I just might have to give it a try though. :idea:
IndiPal
 
Posts: 14
Joined: Mon Sep 26, 2011 1:32 pm
Location: Sweden

Re: FlightGear Serial Out to Arduino

Postby SE-HK » Sat Aug 08, 2020 6:07 am

I just made a short test. The loading of the protocol is in file flightgear/Network/generic.cxx in method FGGeneric::reinit().

Instead of
Code: Select all
    if (direction == "out") {
. . .
    } else if (direction == "in") {
. . .
    }

I rewrote it to
Code: Select all
   if (direction == "out" || direction == "bi") {
. . .
    }
    if (direction == "in" || direction == "bi") {
. . .
    }


After compiling I can now use direction "bi" in FG. If you know how to compile the source, you can give it a try.
Since I am on Linux I can already use "out" and "in" for same Arduino device. It would be good if this solved it on Windows.
SE-HK
 
Posts: 54
Joined: Wed Sep 02, 2009 2:16 pm
Location: Stockholm, Sweden
Version: git
OS: Ubuntu 20.04

Re: FlightGear Serial Out to Arduino

Postby wlbragg » Sun Aug 09, 2020 9:13 pm

Would be nice to bring this up on the developers mailing list and get it officially included in a release.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7610
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: FlightGear Serial Out to Arduino

Postby IndiPal » Tue Aug 11, 2020 9:14 am

Hey SE-HK,

Nice! :D

I'll definitely give it a try. I'm running into some issues with compiling but I'll try again and get back here once/if I succeed.

I agree with you @wlbragg. Would be great if a few more Windows users could try this and then get it included in a release if it works. :D
IndiPal
 
Posts: 14
Joined: Mon Sep 26, 2011 1:32 pm
Location: Sweden

Re: FlightGear Serial Out to Arduino

Postby ludomotico » Tue Aug 11, 2020 10:37 am

I'm totally interested in testing this on Windows, but I cannot build FlightGear in Windows from sources.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: FlightGear Serial Out to Arduino

Postby IndiPal » Thu Oct 01, 2020 10:29 pm

Hi ludomotico,

That makes 2 of us. :lol: I tried several times without success since I have no knowledge or experience with compiling.

Unfortunately work got in the way and I haven't been able to try again but I'll get back here as soon as I have some spare time.

Has anyone else succeeded with this on Windows?
IndiPal
 
Posts: 14
Joined: Mon Sep 26, 2011 1:32 pm
Location: Sweden

Previous

Return to Interfacing

Who is online

Users browsing this forum: No registered users and 5 guests