Closed luka1995 closed 8 years ago
Just off the top of my head: You should get multiple devices listed. You will probably need to recode a little to add an array of loaded devices rather than one specific. Shouldn't be too hard.
PS Watch my blog as I will blog in the next 24hrs with respect to some direct feedback I received a few hours ago about FTDI ARM drivers from Microsoft.. http://embedded101.com/Blogs/David-Jones
Yes, luka1995, it should definitely be possible to connect multiple converters. Simply instantiate one DeviceConnection class per FTDI device you'd like to communicate with.
Examining the code:
private DeviceConnection deviceConnection;
public DeviceConnection DeviceConnection
{
get { return deviceConnection; }
set { deviceConnection = value; OnPropertyChanged(); }
}
private async void OnSelectDevice(DeviceNode deviceNode)
{
DeviceConnection newConnection;
lock (locker) // make sure we don't create multiple device connections by a trigger happy user
{
if (DeviceConnection != null)
return;
var device = ftManager.OpenByDeviceID(deviceNode.DeviceId);
newConnection = new DeviceConnection(deviceNode, device);
DeviceConnection = newConnection;
As you can see from the code above, as it stands the code only accepts one connection. You need a list or array of DeviceConnection. Should check that each new one isn't already connected and need to sort out things (get the correct one) when disconnecting.
eg.. Make the property a list
Cheers
It is possible to connect multiple FTDI converters?