1
0
mirror of https://github.com/elua/elua.git synced 2025-01-25 01:02:54 +08:00

Fix limitation that prevented smoothing lengths longer than 64.

This commit is contained in:
James Snyder 2009-02-26 02:36:46 +00:00
parent 6e1b46d3d7
commit 1e2e05ee55
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
adcchannels = {0, 1, 2, 3}
adcsmoothing = {4, 16, 32, 64}
adcsmoothing = {4, 16, 64, 128}
for i, v in ipairs(adcchannels) do
adc.setblocking(v,1)

View File

@ -103,7 +103,7 @@ u16 adc_get_processed_sample( unsigned id )
if ( s->reqsamples > 0)
s->reqsamples -- ;
return (u16) s->smoothsum >> s->logsmoothlen;
return (u16) ( s->smoothsum >> s->logsmoothlen );
}
else if ( s->logsmoothlen == 0 )