|
From: Stephen S. <rad...@gm...> - 2008-04-27 21:21:22
|
Hi!
On Sun, Apr 27, 2008 at 2:15 PM, Kyle Machulis (qDot)
<ky...@no...> wrote:
> Ok, just made a huge step on the drivers, unfortunately borne out of me
> ignoring my own notes.
It happens... :)
For a while my wireless card would only work at 11 Mbps until the
driver author realized he'd made a < / <= typo in the code...
I've heard of this 16 ms / 64 byte thing regarding FTDI chips. It
always made me wonder how they managed to do high-speed stuff using
these chips actually. Glad to know it can be set to 1. I think I
figured that they were instead just padding the data to get it to fill
the 64-byte buffer and transmit faster.
I modified findfalcons to do some timing tests with the following code:
time_last = time_sec;
gettimeofday(&now,NULL);
time_sec = (now.tv_sec%10000) + now.tv_usec/1000000.0;
diff_sec = time_sec - time_last;
diff_avg = (diff_avg*(count-1) + diff_sec)/count;
if ((count%100)==0)
{
printf("time diff: %f, frequency = %f "
"average: %f, %f\n",
diff_sec, 1.0/diff_sec,
diff_avg, 1.0/diff_avg);
}
There were my results without this recent change:
time diff: 0.015991, frequency = 62.534351 average: 0.016000, 62.498571
time diff: 0.015991, frequency = 62.534351 average: 0.016000, 62.498578
time diff: 0.015991, frequency = 62.534351 average: 0.016000, 62.499364
time diff: 0.015930, frequency = 62.773946 average: 0.015998, 62.508708
time diff: 0.016052, frequency = 62.296578 average: 0.015998, 62.506211
time diff: 0.016052, frequency = 62.296578 average: 0.015999, 62.505367
And *with* the set_latency call:
time diff: 0.001953, frequency = 512.000000 average: 0.002040, 490.245333
time diff: 0.002075, frequency = 481.882353 average: 0.002015, 496.184239
time diff: 0.002075, frequency = 481.882353 average: 0.001967, 508.398800
time diff: 0.001953, frequency = 512.000000 average: 0.001910, 523.534142
time diff: 0.001953, frequency = 512.000000 average: 0.001852, 539.941967
time diff: 0.000977, frequency = 1024.000000 average: 0.001807, 553.513720
time diff: 0.001953, frequency = 512.000000 average: 0.001764, 566.752401
Very nice!
That's pretty much haptic speed now... One tricky thing being that
there is a lot of jitter.
Does the D2XX driver really perform faster than that? I know it
should really be 1000 Hz.
Great stuff. I'm hoping to spend some time soon playing with the
motors to see how well I can control them.
Steve
|