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:
parent
6e1b46d3d7
commit
1e2e05ee55
@ -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)
|
||||
|
@ -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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user