The below code will help smooth things out a little, It also prevents any USB Suspend happening on the device (Keeps connection alive).
It will need to be inserted in the 'public bool Connect()' method, and a DLL wrapper will need to be made. (link will know what I mean here).
byte LatencyTimer = 2;
ftStatus = PFTDI.SetLatency(LatencyTimer);
if (ftStatus != FT_STATUS.FT_OK)
{
Disconnect();
throw new EUSBGeckoException(EUSBErrorCode.FTDITimeoutSetError);
}
Nuke? :eek:
I guessed he would post.. he contacted me before and well.. believe me I did perform IP checks and everything compared to old IP and really came to the end that I was not fooled!
Quote from: Sharkbyte on September 17, 2010, 02:08:14 PM
Quote from: Deathwolf on September 17, 2010, 02:02:17 PM
Nuke? :eek:
I was thinking the same thing. I know this has nothing to do with this topic, but welcome back Nuke! :)
Thank you.
*blinks*
*rubs eyes*
*looks at screen again*
Hey, cool.
Back on topic...I'll add the latency code to the Connect() method in the next release. There are several places in the code where we manually sleep for about 100 ms, because otherwise it seems that the communication with the USB Gecko would fail.
Unfortunately for the mono version, I have been requested to switch away from the FTDI library because it wants to open the USB Gecko as root and the udev rules are a massive headache.
Though I'm still not sure why you say that there's a need for a DLL. I mean, sure, the dllimport tag makes it trivial to use in C#, but it just seems like it would add unnecessary complexity, and I can't think of any other applications right now besides WiiRDGUI that might use such a library.
I love you nuke please stay this time D:
Officially I started using a FTDI .NET wrapper DLL.. later on I switched to DllImport - I haven't looked too deep yet, however the function needed should be the SetLatencyTimer in the ftd2xx.dll .