| ??? 10/12/03 17:43 Read: times |
#56561 - RE: Avaraging Responding to: ???'s previous message |
Hehe, see I told you "I did not check for errors" :-)
static unsigned maUpdate(struct MOVING_AVG *maP, unsigned sample)
{
maP->sampleTotal -= maP->sample[maP->sampleIdx];
maP->sampleTotal += sample;
maP->sample[maP->sampleIdx] = sample;
maP->sampleIdx = (maP->sampleIdx + 1) & 0x0F;
return (maP->sampleTotal >> 4);
}
|
| Topic | Author | Date |
| Avaraging | 01/01/70 00:00 | |
| RE: Avaraging | 01/01/70 00:00 | |
| RE: Avaraging | 01/01/70 00:00 | |
| RE: Avaraging | 01/01/70 00:00 | |
| RE: Avaraging | 01/01/70 00:00 | |
| RE: Avaraging | 01/01/70 00:00 | |
| RE: Avaraging | 01/01/70 00:00 | |
RE: Avaraging | 01/01/70 00:00 |



