Package lejos.robotics.filter
Class ZeroFilter
- java.lang.Object
-
- lejos.robotics.filter.AbstractFilter
-
- lejos.robotics.filter.ZeroFilter
-
- All Implemented Interfaces:
SampleProvider
public class ZeroFilter extends AbstractFilter
Simple filter that adjusts the sample to use a specified zero value- Author:
- Lawrie Griffiths
-
-
Field Summary
-
Fields inherited from class lejos.robotics.filter.AbstractFilter
sampleSize, source
-
-
Constructor Summary
Constructors Constructor Description ZeroFilter(SampleProvider source, float[] zeroValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfetchSample(float[] sample, int offset)Fetches a sample from a sensor or filter.-
Methods inherited from class lejos.robotics.filter.AbstractFilter
sampleSize
-
-
-
-
Constructor Detail
-
ZeroFilter
public ZeroFilter(SampleProvider source, float[] zeroValue)
-
-
Method Detail
-
fetchSample
public void fetchSample(float[] sample, int offset)Description copied from interface:SampleProviderFetches a sample from a sensor or filter.- Specified by:
fetchSamplein interfaceSampleProvider- Overrides:
fetchSamplein classAbstractFilter- Parameters:
sample- The array to store the sample in.offset- The elements of the sample are stored in the array starting at the offset position.
-
-