rdunning0823 / tophat

An intuitive glide computer
www.tophatsoaring.org
GNU General Public License v2.0
16 stars 19 forks source link

Add USB support for FT232 serial-uart converter for multiple devices analog XCSOAR Here is a solution from XCSOAR https://github.com/XCSoar/XCSoar/commit/76b830e424031185b9ce90c33d0dea1bebca35a1 #27

Open XCNav opened 3 months ago

XCNav commented 3 months ago

This is the discussion on github

https://github.com/XCSoar/XCSoar/issues/966

CazYokoyama commented 3 months ago

The current version of tophat is based on xcsoar 6.8.2. It looks USB support on xcsoar is introduced later version of xcsoar such as 7.0. There is no UsbSerialHelper.java in the tophat source code. Therefore, it is hard to cherrypick the commit, 76b830e. Correct me if I am wrong.

XCNav commented 3 months ago

No chance to add the usbserialhelper at the current TopHat version? I am only basic level in coding, not even that.

CazYokoyama commented 3 months ago

Could you answer

XCNav commented 3 months ago

Check this https://photos.app.goo.gl/Gan8tXkNzV2z8c3Y9

CazYokoyama commented 3 months ago

Do you connect something such as vario through FT232? Do you connect multiple devices through FT232? If so, does tophat recognize the first device?

XCNav commented 3 months ago

On xcsoar I can connect any instrument as vario, flarm radio etc. But even without any device connected to the XCNAV, XCS shows the two serial-in as XCNAV S1 AND S2 as I programmed them. TopHat does not even recognise them in the port list.

CazYokoyama commented 3 months ago

I am still not clear what configuration you have. Could you please answer my questions? I don't have FT232 usb-serial converter. I don't have XCNAV. I don't connect its S1 AND S2. Could you consider how to explain your configuration and your action to the person who 1) doesn't have your configuration, 2) is away from tophat/xcsoar for a while?

XCNav commented 3 months ago

Ok, imagine you have an android tablet with USB2.0 where you plug in an USBFT232 Serial converter. Now TopHat needs access to this USB port to read the data supplied by the FT232. Right now TopHat does not see/access this USB port. . XCNAV works similar. The serial input is a FT232 that connects to a USB port on the android board. Next problem will be that it might only see one FT232 as both connected FT232 have the same VIP/PID, so you need to separate the by the name or serial number