|
Re: AnalogModule->GetAverageValue() gives wrong results if polled too fast
Many A/D converters multiplex their input lines (that is that there is 1 A/D converter for up to 8 analog inputs). When these switch from 1 line to another it takes time for the charge to dissipate on the A/D input.
The Wait(.005) may be a 'quick fix' as the system may be able to cycle inputs faster than the A/D can dissipate a large charge (in this case ~ 12 v).
Is there a reason that you need to poll the inputs that quickly?
__________________
___________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "- Tennyson, Ulysses

|