Fork to see if I can get working

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

Fork of xDotBridge_update_test20180823 by Matt Briggs

Committer:
Matt Briggs
Date:
Mon Jan 23 09:02:45 2017 -0700
Revision:
31:9c535a708ae9
Child:
33:c7bb3fbc024a
Adding code for analog ladder

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Matt Briggs 31:9c535a708ae9 1 #include "nBitAnalogLadder.h"
Matt Briggs 31:9c535a708ae9 2
Matt Briggs 31:9c535a708ae9 3 uint8_t convAnalogLadder (const float &analogV, const float *valueTable, uint8_t nVals) {
Matt Briggs 31:9c535a708ae9 4 uint8_t i;
Matt Briggs 31:9c535a708ae9 5 for (i = 0; i < nVals; i++) {
Matt Briggs 31:9c535a708ae9 6 if ((valueTable[i][TABLE_MIN_IDX] <= analogV) &&
Matt Briggs 31:9c535a708ae9 7 (analogV <= valueTable[i][TABLE_MIN_IDX])) {
Matt Briggs 31:9c535a708ae9 8 break;
Matt Briggs 31:9c535a708ae9 9 }
Matt Briggs 31:9c535a708ae9 10 }
Matt Briggs 31:9c535a708ae9 11
Matt Briggs 31:9c535a708ae9 12 return i;
Matt Briggs 31:9c535a708ae9 13 }