Fork to see if I can get working

Dependencies:   BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated

Fork of xDotBridge_update_test20180823 by Matt Briggs

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers nBitAnalogLadder.cpp Source File

nBitAnalogLadder.cpp

00001 #include "nBitAnalogLadder.h"
00002 
00003 uint8_t convAnalogLadder (const float &analogV, const float valueTable[][2], uint8_t nVals) {
00004     uint8_t i;
00005     for (i = 0; i < nVals; i++) {
00006         if ((valueTable[i][TABLE_MIN_IDX] <= analogV) && 
00007             (analogV <= valueTable[i][TABLE_MAX_IDX])) {
00008             break;
00009         }
00010     }
00011     
00012     return i;
00013 }