-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ftdi Support for chips with multiple interfaces (ie. FT4232H, 4 interfaces) #433
Ftdi Support for chips with multiple interfaces (ie. FT4232H, 4 interfaces) #433
Conversation
…ght now it still only uses one port, in it's current shape the work is mainly meant to be a proof of concept to be cleaned up later. *libftdi has also been switched to 1.1*
…to ftdi_scratch
TODO: figure out why 3/4 won't work
Removed ftdi_context from FtdiWidget Removed several locations that opened ftdi_context ports outside of FtdiInterface (plugin/device inits) Now all 4 ports work TODO: register FtdiInterfaces back with FtdiWidget so that destructor can destroy them properly....
…evices instead of specific IDs. Currently I only know that 0x6001 and 0x6011 are supported so other devices are skipped if you know another ID that works please let us know. libftdi checks for the following pids: 0x6001, 0x6010, 0x6011, 0x6014 (all vid 0x0403).
…nterfaces now work and no memory leaks from the plugin. TODO: figure out why reading doesn't allign to start of frame so interface can also be used for DMX in and RDM. TODO: possibly need to clean up/add/change files depending on upstream comments.
TODO: left in old code that depended on it commented out, should probably clean it up.
@Keeper-of-the-Keys please can you resync with trunk/upstream for starters, then ensure Travis is green (it will give a tick next to the commit). |
I am not sure what you mean, it says by be that my master is not ahead or 2014-07-15 15:51 GMT+03:00 peternewman notifications@github.com:
|
int interfaceCount = m_widget->GetInterfaceCount(); | ||
OLA_INFO << "there are " << interfaceCount << " interfaces."; | ||
for (int i = 1; i <= interfaceCount; i++) { | ||
AddPort(new FtdiDmxOutputPort(this, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably indent this by 4 from AddPort, so it perhaps looks like this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (int i = 1; i <= interfaceCount; i++) {
AddPort(new FtdiDmxOutputPort(
this,
new FtdiInterface(m_widget, static_cast<ftdi_interface>(i)),
i,
m_frequency));
}
Still to be fixed which I'll do after merge: Keeper-of-the-Keys@18f661d#commitcomment-9643336 |
Ftdi Support for chips with multiple interfaces (ie. FT4232H, 4 interfaces)
if (m_widget->IsOpen()) | ||
m_widget->Close(); | ||
DeleteAllPorts(); | ||
delete m_widget; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please prefer auto_ptr rather than managing pointer ownership manually.
Fix some comments from #433
This was originally meant a scratch to be redone, as far as I recall the code isn't too terrible, but if you think I need to clean up more and split FtdiInterface into seperate .h and .c files I'll be happy to sit down more on it.
I really wanted to do more work before I sent the pull req but I see I haven't had time to work on it for a while and it's a pity to let it sit.