9 const float binMin [32] = {-1, 0, 1, 2, 3, 4, 5, 6, 7, 8,
10 9, 10, 11, 12, 13, 14, 16, 18, 20, 22,
11 24, 26, 28, 31, 34, 37, 40, 44, 48, 52,
29 for (
unsigned i = 1;
i < 32;
i++) {
33 mValues [128] = 2 * mValues [127] - mValues [126];
37 if (fAdc < 128)
return mValues [fAdc];
43 if (fAdc % 32 == 31)
return 0.5 * (3 *
mValues [fAdc] -
mValues [fAdc - 1]);
50 if (fAdc >= 128 )
return 0;
51 if (fAdc == 127 )
return mValues [fAdc+1];
52 if (fAdc % 32 == 31)
return mValues [fAdc+3];
57 if (fAdc >= 32)
return false;
int adc(sample_type sample)
get the ADC sample (12 bits)
bool setLowEdges(const float fValue[32])
unsigned range(unsigned fAdc) const
float highEdge(unsigned fAdc) const
float center(unsigned fAdc) const
bool setLowEdge(float fValue, unsigned fAdc)
float lowEdge(unsigned fAdc) const