RomanLut / INAV-X-Plane-HITL

Hardware-in-the-loop plugin for X-Plane for INAV flight controller firmware
MIT License
44 stars 6 forks source link

Can't connect to Inav-Configurator on Linux after connection with HIL #9

Open sevrugin opened 1 year ago

sevrugin commented 1 year ago

Steps to reproduce: 1 run XPlane and connect to flight-controller (from plugin menu) 2 disconnect plugin (from plugin menu) 3 try to connect with inav-confaigurator - failed

But! If after the step 2 we will connect to the port by terminal: screen /dev/ttyACM0 115200 and then killall screen we will be able to connect by inav-configurator

In my mind, after we closed the serial port in plugin we still have some unflashed data Also, it would be great to add if (isConnected()) to each methods

lwan288 commented 1 year ago

I have HITL installed under x-plane 12 on Ubuntu 22.04. However, HITL doesn't show up under plugin options. I have tried the same on Windows 10. HITL works perfectly. Not sure which step I did wrong on Linux system. Does anyone have the similar issue?

Screenshot from 2023-04-02 17-15-26 Screenshot from 2023-04-02 17-20-59 Screenshot from 2023-04-02 17-21-24

lwan288 commented 1 year ago

I used chmod for FC connection with inav-configurator on Ubuntu and it works well, but HITL doesn't work on my Ubuntu machine. Not sure what happened. It looks there is a compatibility issue with lin.xpl on my Linux machine.

sudo chmod 0777 /dev/ttyACM0

RomanLut commented 1 year ago

(I am not using Linux and I am not an exprt in Linux) One guess is that some libraries are missing.

Try running: ldd lin.xpl

lwan288 commented 1 year ago

(I am not using Linux and I am not an exprt in Linux) One guess is that some libraries are missing.

Try running: ldd lin.xpl

Yes, libopenal.so.1 is missing. I installed the library using the following command and it works!
sudo apt install libopenal1

Thanks so much!!

sevrugin commented 1 year ago

(I am not using Linux and I am not an exprt in Linux) One guess is that some libraries are missing.

Try running: ldd lin.xpl

$ ldd lin.xpl linux-vdso.so.1 (0x00007ffdfb9c3000) libopenal.so.1 => /lib/x86_64-linux-gnu/libopenal.so.1 (0x00007f369b202000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f369ae00000) libsndio.so.7 => /lib/x86_64-linux-gnu/libsndio.so.7 (0x00007f369b1ee000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f369b107000) /lib64/ld-linux-x86-64.so.2 (0x00007f369b379000) libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007f369acfd000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f369b0ed000) libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007f369b0e0000)

Usually I'm just reconnecting the FC