![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fork to see if I can get working
Dependencies: BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated
Fork of xDotBridge_update_test20180823 by
Diff: xDotBridge/src/nBitAnalogLadder.cpp
- Revision:
- 33:c7bb3fbc024a
- Parent:
- 31:9c535a708ae9
--- a/xDotBridge/src/nBitAnalogLadder.cpp Tue Jan 24 17:13:53 2017 +0000 +++ b/xDotBridge/src/nBitAnalogLadder.cpp Tue Jan 24 10:43:55 2017 -0700 @@ -1,10 +1,10 @@ #include "nBitAnalogLadder.h" -uint8_t convAnalogLadder (const float &analogV, const float *valueTable, uint8_t nVals) { +uint8_t convAnalogLadder (const float &analogV, const float valueTable[][2], uint8_t nVals) { uint8_t i; for (i = 0; i < nVals; i++) { if ((valueTable[i][TABLE_MIN_IDX] <= analogV) && - (analogV <= valueTable[i][TABLE_MIN_IDX])) { + (analogV <= valueTable[i][TABLE_MAX_IDX])) { break; } }