| 62 | |
| 63 | |
| 64 | float TSL235R::calculateWaveLengthFactor(uint16_t _waveLength) |
| 65 | { |
| 66 | // figure 2 datasheet |
| 67 | // 635 nm is reference 1.000 |
| 68 | // remaining is linear interpolated between points in the graph |
| 69 | float in[] = { 300, 350, 400, 500, 600, 635, 700, 750, 800, 850, 900, 1000, 1100}; |
| 70 | float out[] = { 0.1, 0.35, 0.5, 0.75, 0.93, 1.00, 1.15, 1.20, 1.15, 1.10, 0.95, 0.40, 0.10}; |
| 71 | return 1.0 / multiMap(_waveLength, in, out, 13); |
| 72 | } |
| 73 | |
| 74 | |
| 75 | float TSL235R::multiMap(float value, float * _in, float * _out, uint8_t size) |
nothing calls this directly
no test coverage detected