Treehouse Mbed Team / Mbed 2 deprecated APS_DCM1SL2

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mfwic
Date:
Tue Jan 15 01:32:33 2019 +0000
Parent:
21:fe0ea1860c9f
Child:
23:318f52616b3b
Commit message:
Added hysteresis; Changed LUT to use v12*i12 instead of just i12.

Changed in this revision

inc/adc_defs.h Show annotated file Show diff for this revision Revisions of this file
inc/lut.h Show annotated file Show diff for this revision Revisions of this file
inc/lut_data_en_v1p1.h Show diff for this revision Revisions of this file
inc/lut_data_en_v1p3.h Show annotated file Show diff for this revision Revisions of this file
inc/lut_data_slot_v1p1.h Show diff for this revision Revisions of this file
inc/lut_data_slot_v1p3.h Show annotated file Show diff for this revision Revisions of this file
inc/menu.h Show annotated file Show diff for this revision Revisions of this file
src/adc.cpp Show annotated file Show diff for this revision Revisions of this file
src/boards.cpp Show annotated file Show diff for this revision Revisions of this file
src/lut.cpp Show annotated file Show diff for this revision Revisions of this file
src/main.cpp Show annotated file Show diff for this revision Revisions of this file
src/menu.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/inc/adc_defs.h	Fri Jan 11 21:45:55 2019 +0000
+++ b/inc/adc_defs.h	Tue Jan 15 01:32:33 2019 +0000
@@ -59,7 +59,11 @@
 */
 #define CURRENT_48_DIV_FACTOR -372
 #define CURRENT_24_DIV_FACTOR -376
-#define CURRENT_12_DIV_FACTOR -356
+//#define CURRENT_12_DIV_FACTOR -356
+#define CURRENT_12_DIV_FACTOR -208
+
+const double ROW_CORRECTION_FACTOR = 1.017;
+#define ROW_HYSTERESIS 2
 
 extern double CURRENT_48_OFFSET;
 extern double CURRENT_24_OFFSET;
--- a/inc/lut.h	Fri Jan 11 21:45:55 2019 +0000
+++ b/inc/lut.h	Tue Jan 15 01:32:33 2019 +0000
@@ -36,7 +36,7 @@
 #define LUT_MAX_ADC ADC_MAX_VALUE/2
 const unsigned int LUT_SCALE_FACTOR = LUT_MAX_ADC/MAX_LUT_ENTRIES;
 
-const float LUT_VER = 1.1;
+const float LUT_VER = 1.3;
 
 unsigned int getLUT_binCode(unsigned short);
 unsigned int getLUT_thermCode(unsigned short);
--- a/inc/lut_data_en_v1p1.h	Fri Jan 11 21:45:55 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1057 +0,0 @@
-//-------------------------------------------------------------------------------
-// 
-//  Treehouse Inc.
-//  Colorado Springs, Colorado
-// 
-//  Copyright (c) 2016 by Treehouse Designs Inc. 
-// 
-//  This code is the property of Treehouse, Inc. (Treehouse) and may not be redistributed
-//  in any form without prior written permission from the copyright holder, Treehouse.
-//
-//  The above copyright notice and this permission notice shall be included in
-//  all copies or substantial portions of the Software.
-//   
-//-------------------------------------------------------------------------------
-// 
-//  REVISION HISTORY:
-//  
-//   $Author: $
-//   $Rev: $
-//   $Date: $
-//   $URL: $
-// 
-//-------------------------------------------------------------------------------
-
-#ifndef lut_data_en_H
-#define lut_data_en_H
-
-uint8_t binC[MAX_LUT_ENTRIES]{
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-2,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-3,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-4,
-7,
-7,
-7,
-5,
-5,
-5,
-6,
-6,
-6,
-6,
-6,
-6,
-5,
-5,
-5,
-5,
-7,
-7,
-7,
-7,
-7,
-6,
-6,
-6,
-6,
-6,
-6,
-6,
-6,
-6,
-6,
-7,
-7,
-7,
-7,
-7,
-7,
-7,
-8,
-8,
-8,
-8,
-6,
-6,
-6,
-6,
-17,
-17,
-17,
-17,
-7,
-7,
-7,
-7,
-7,
-7,
-7,
-7,
-8,
-8,
-8,
-8,
-15,
-15,
-15,
-15,
-15,
-15,
-11,
-11,
-11,
-11,
-13,
-13,
-13,
-8,
-8,
-8,
-8,
-8,
-9,
-9,
-9,
-7,
-7,
-7,
-7,
-7,
-7,
-7,
-7,
-17,
-17,
-17,
-8,
-8,
-8,
-8,
-8,
-8,
-8,
-9,
-9,
-9,
-9,
-9,
-13,
-13,
-23,
-23,
-31,
-31,
-19,
-19,
-19,
-19,
-8,
-8,
-8,
-8,
-8,
-14,
-14,
-14,
-9,
-9,
-10,
-10,
-10,
-10,
-10,
-17,
-17,
-17,
-17,
-13,
-13,
-13,
-13,
-15,
-15,
-15,
-15,
-15,
-9,
-9,
-9,
-9,
-9,
-9,
-9,
-10,
-10,
-10,
-10,
-10,
-10,
-14,
-14,
-14,
-14,
-19,
-19,
-19,
-19,
-19,
-23,
-23,
-23,
-13,
-13,
-13,
-13,
-13,
-17,
-17,
-17,
-17,
-12,
-11,
-11,
-11,
-11,
-11,
-11,
-11,
-11,
-31,
-31,
-31,
-14,
-14,
-14,
-14,
-14,
-14,
-14,
-16,
-16,
-16,
-16,
-13,
-13,
-13,
-13,
-13,
-11,
-11,
-11,
-11,
-11,
-19,
-19,
-19,
-15,
-15,
-15,
-15,
-15,
-15,
-17,
-17,
-17,
-23,
-23,
-23,
-14,
-14,
-14,
-14,
-14,
-14,
-14,
-13,
-13,
-13,
-13,
-13,
-12,
-12,
-12,
-12,
-12,
-29,
-29,
-21,
-21,
-21,
-21,
-21,
-15,
-15,
-15,
-15,
-15,
-15,
-15,
-15,
-19,
-19,
-19,
-19,
-19,
-14,
-14,
-14,
-14,
-31,
-13,
-13,
-13,
-13,
-13,
-13,
-13,
-16,
-16,
-16,
-16,
-16,
-16,
-16,
-23,
-23,
-18,
-18,
-18,
-18,
-18,
-15,
-15,
-15,
-15,
-15,
-15,
-15,
-14,
-14,
-14,
-14,
-14,
-14,
-14,
-14,
-17,
-17,
-17,
-19,
-19,
-19,
-19,
-19,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-16,
-16,
-16,
-16,
-16,
-16,
-15,
-15,
-15,
-15,
-15,
-15,
-15,
-15,
-15,
-26,
-26,
-26,
-26,
-23,
-23,
-23,
-23,
-23,
-23,
-23,
-31,
-31,
-17,
-17,
-17,
-17,
-17,
-21,
-21,
-21,
-19,
-21,
-19,
-19,
-19,
-16,
-16,
-16,
-16,
-16,
-16,
-16,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-18,
-18,
-18,
-18,
-18,
-20,
-20,
-20,
-20,
-20,
-20,
-17,
-17,
-17,
-17,
-17,
-17,
-17,
-17,
-17,
-17,
-23,
-23,
-23,
-23,
-23,
-23,
-23,
-19,
-19,
-19,
-19,
-21,
-21,
-21,
-21,
-21,
-21,
-21,
-21,
-18,
-18,
-18,
-18,
-18,
-18,
-18,
-18,
-18,
-31,
-31,
-31,
-31,
-20,
-20,
-20,
-20,
-20,
-20,
-20,
-20,
-20,
-20,
-28,
-28,
-28,
-28,
-28,
-25,
-25,
-25,
-25,
-25,
-25,
-19,
-19,
-19,
-19,
-19,
-19,
-19,
-23,
-23,
-23,
-21,
-21,
-21,
-29,
-29,
-29,
-29,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-20,
-20,
-20,
-20,
-20,
-20,
-20,
-20,
-20,
-20,
-20,
-22,
-22,
-22,
-22,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-31,
-31,
-31,
-31,
-31,
-31,
-25,
-25,
-25,
-25,
-25,
-25,
-25,
-21,
-21,
-21,
-23,
-23,
-23,
-23,
-23,
-23,
-23,
-32,
-32,
-32,
-32,
-32,
-32,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-29,
-29,
-29,
-29,
-29,
-22,
-22,
-22,
-22,
-22,
-22,
-22,
-22,
-22,
-22,
-22,
-22,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-25,
-25,
-25,
-25,
-25,
-25,
-25,
-25,
-25,
-23,
-23,
-23,
-23,
-23,
-31,
-31,
-31,
-31,
-31,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-24,
-24,
-24,
-24,
-24,
-24,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-31,
-31,
-31,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-26,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-27,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-28,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-29,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-30,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-31,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32,
-32
-};
-
-#endif
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/lut_data_en_v1p3.h	Tue Jan 15 01:32:33 2019 +0000
@@ -0,0 +1,1057 @@
+//-------------------------------------------------------------------------------
+// 
+//  Treehouse Inc.
+//  Colorado Springs, Colorado
+// 
+//  Copyright (c) 2016 by Treehouse Designs Inc. 
+// 
+//  This code is the property of Treehouse, Inc. (Treehouse) and may not be redistributed
+//  in any form without prior written permission from the copyright holder, Treehouse.
+//
+//  The above copyright notice and this permission notice shall be included in
+//  all copies or substantial portions of the Software.
+//   
+//-------------------------------------------------------------------------------
+// 
+//  REVISION HISTORY:
+//  
+//   $Author: $
+//   $Rev: $
+//   $Date: $
+//   $URL: $
+// 
+//-------------------------------------------------------------------------------
+
+#ifndef lut_data_en_H
+#define lut_data_en_H
+
+uint8_t binC[MAX_LUT_ENTRIES]{
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+7,
+7,
+7,
+5,
+5,
+5,
+6,
+6,
+6,
+6,
+6,
+6,
+5,
+5,
+5,
+5,
+7,
+7,
+7,
+7,
+7,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+8,
+8,
+8,
+8,
+6,
+6,
+6,
+6,
+17,
+17,
+17,
+17,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+8,
+8,
+8,
+8,
+15,
+15,
+15,
+15,
+15,
+15,
+11,
+11,
+11,
+11,
+13,
+13,
+13,
+8,
+8,
+8,
+8,
+8,
+9,
+9,
+9,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+17,
+17,
+17,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+9,
+9,
+9,
+9,
+9,
+13,
+13,
+23,
+23,
+31,
+31,
+19,
+19,
+19,
+19,
+8,
+8,
+8,
+8,
+8,
+14,
+14,
+14,
+9,
+9,
+10,
+10,
+10,
+10,
+10,
+17,
+17,
+17,
+17,
+13,
+13,
+13,
+13,
+15,
+15,
+15,
+15,
+15,
+9,
+9,
+9,
+9,
+9,
+9,
+9,
+10,
+10,
+10,
+10,
+10,
+10,
+14,
+14,
+14,
+14,
+19,
+19,
+19,
+19,
+19,
+23,
+23,
+23,
+13,
+13,
+13,
+13,
+13,
+17,
+17,
+17,
+17,
+12,
+11,
+11,
+11,
+11,
+11,
+11,
+11,
+11,
+31,
+31,
+31,
+14,
+14,
+14,
+14,
+14,
+14,
+14,
+16,
+16,
+16,
+16,
+13,
+13,
+13,
+13,
+13,
+11,
+11,
+11,
+11,
+11,
+19,
+19,
+19,
+15,
+15,
+15,
+15,
+15,
+15,
+17,
+17,
+17,
+23,
+23,
+23,
+14,
+14,
+14,
+14,
+14,
+14,
+14,
+13,
+13,
+13,
+13,
+13,
+12,
+12,
+12,
+12,
+12,
+29,
+29,
+21,
+21,
+21,
+21,
+21,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+19,
+19,
+19,
+19,
+19,
+14,
+14,
+14,
+14,
+31,
+13,
+13,
+13,
+13,
+13,
+13,
+13,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+23,
+23,
+18,
+18,
+18,
+18,
+18,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+14,
+14,
+14,
+14,
+14,
+14,
+14,
+14,
+17,
+17,
+17,
+19,
+19,
+19,
+19,
+19,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+16,
+16,
+16,
+16,
+16,
+16,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+26,
+26,
+26,
+26,
+23,
+23,
+23,
+23,
+23,
+23,
+23,
+31,
+31,
+17,
+17,
+17,
+17,
+17,
+21,
+21,
+21,
+19,
+21,
+19,
+19,
+19,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+18,
+18,
+18,
+18,
+18,
+20,
+20,
+20,
+20,
+20,
+20,
+17,
+17,
+17,
+17,
+17,
+17,
+17,
+17,
+17,
+17,
+23,
+23,
+23,
+23,
+23,
+23,
+23,
+19,
+19,
+19,
+19,
+21,
+21,
+21,
+21,
+21,
+21,
+21,
+21,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+31,
+31,
+31,
+31,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+28,
+28,
+28,
+28,
+28,
+25,
+25,
+25,
+25,
+25,
+25,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+23,
+23,
+23,
+21,
+21,
+21,
+29,
+29,
+29,
+29,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+22,
+22,
+22,
+22,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+31,
+31,
+31,
+31,
+31,
+31,
+25,
+25,
+25,
+25,
+25,
+25,
+25,
+21,
+21,
+21,
+23,
+23,
+23,
+23,
+23,
+23,
+23,
+32,
+32,
+32,
+32,
+32,
+32,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+29,
+29,
+29,
+29,
+29,
+22,
+22,
+22,
+22,
+22,
+22,
+22,
+22,
+22,
+22,
+22,
+22,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+25,
+25,
+25,
+25,
+25,
+25,
+25,
+25,
+25,
+23,
+23,
+23,
+23,
+23,
+31,
+31,
+31,
+31,
+31,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+24,
+24,
+24,
+24,
+24,
+24,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+31,
+31,
+31,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+26,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+28,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+29,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+30,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+31,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32,
+32
+};
+
+#endif
+
+
--- a/inc/lut_data_slot_v1p1.h	Fri Jan 11 21:45:55 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1056 +0,0 @@
-//-------------------------------------------------------------------------------
-// 
-//  Treehouse Inc.
-//  Colorado Springs, Colorado
-// 
-//  Copyright (c) 2016 by Treehouse Designs Inc. 
-// 
-//  This code is the property of Treehouse, Inc. (Treehouse) and may not be redistributed
-//  in any form without prior written permission from the copyright holder, Treehouse.
-//
-//  The above copyright notice and this permission notice shall be included in
-//  all copies or substantial portions of the Software.
-//   
-//-------------------------------------------------------------------------------
-// 
-//  REVISION HISTORY:
-//  
-//   $Author: $
-//   $Rev: $
-//   $Date: $
-//   $URL: $
-// 
-//-------------------------------------------------------------------------------
-
-#ifndef lut_data_slot_H
-#define lut_data_slot_H
-
-uint16_t thermC[MAX_LUT_ENTRIES]{
-1,
-1,
-1,
-1,
-3,
-3,
-3,
-7,
-7,
-15,
-15,
-15,
-31,
-31,
-63,
-63,
-63,
-63,
-127,
-127,
-255,
-255,
-511,
-511,
-511,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-2047,
-2047,
-2047,
-127,
-127,
-127,
-127,
-127,
-127,
-255,
-255,
-255,
-255,
-511,
-511,
-511,
-511,
-511,
-1023,
-1023,
-1023,
-1023,
-127,
-127,
-127,
-127,
-127,
-127,
-255,
-255,
-255,
-255,
-255,
-255,
-255,
-255,
-255,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-127,
-127,
-127,
-1023,
-1023,
-1023,
-511,
-511,
-511,
-511,
-511,
-511,
-2047,
-2047,
-2047,
-2047,
-255,
-255,
-255,
-255,
-255,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-255,
-255,
-255,
-255,
-2047,
-2047,
-2047,
-2047,
-15,
-15,
-15,
-15,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-511,
-511,
-511,
-511,
-31,
-31,
-31,
-31,
-31,
-31,
-127,
-127,
-127,
-127,
-63,
-63,
-63,
-1023,
-1023,
-1023,
-1023,
-1023,
-511,
-511,
-511,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-31,
-31,
-31,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-1023,
-1023,
-1023,
-1023,
-1023,
-127,
-127,
-15,
-15,
-7,
-7,
-31,
-31,
-31,
-31,
-4095,
-4095,
-4095,
-4095,
-4095,
-127,
-127,
-127,
-2047,
-2047,
-1023,
-1023,
-1023,
-1023,
-1023,
-63,
-63,
-63,
-63,
-255,
-255,
-255,
-255,
-127,
-127,
-127,
-127,
-127,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-255,
-255,
-255,
-255,
-63,
-63,
-63,
-63,
-63,
-31,
-31,
-31,
-511,
-511,
-511,
-511,
-511,
-127,
-127,
-127,
-127,
-1023,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-15,
-15,
-15,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-255,
-255,
-255,
-255,
-1023,
-1023,
-1023,
-1023,
-1023,
-4095,
-4095,
-4095,
-4095,
-4095,
-127,
-127,
-127,
-511,
-511,
-511,
-511,
-511,
-511,
-255,
-255,
-255,
-63,
-63,
-63,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-31,
-31,
-127,
-127,
-127,
-127,
-127,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-255,
-255,
-255,
-255,
-255,
-2047,
-2047,
-2047,
-2047,
-31,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-127,
-127,
-511,
-511,
-511,
-511,
-511,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-1023,
-1023,
-1023,
-511,
-511,
-511,
-511,
-511,
-63,
-63,
-63,
-63,
-63,
-63,
-63,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-127,
-127,
-127,
-127,
-255,
-255,
-255,
-255,
-255,
-255,
-255,
-63,
-63,
-2047,
-2047,
-2047,
-2047,
-2047,
-511,
-511,
-511,
-1023,
-511,
-1023,
-1023,
-1023,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-127,
-127,
-127,
-127,
-127,
-127,
-127,
-127,
-2047,
-2047,
-2047,
-2047,
-2047,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-2047,
-2047,
-2047,
-2047,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-127,
-127,
-127,
-127,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-255,
-255,
-255,
-255,
-255,
-511,
-511,
-511,
-511,
-511,
-511,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-1023,
-1023,
-1023,
-2047,
-2047,
-2047,
-255,
-255,
-255,
-255,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-2047,
-2047,
-2047,
-2047,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-511,
-255,
-255,
-255,
-255,
-255,
-255,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-4095,
-4095,
-4095,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-255,
-255,
-255,
-255,
-255,
-255,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-511,
-511,
-511,
-511,
-511,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-511,
-511,
-511,
-511,
-511,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-1023,
-1023,
-1023,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-1023,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-2047,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095,
-4095
-};
-
-#endif
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/lut_data_slot_v1p3.h	Tue Jan 15 01:32:33 2019 +0000
@@ -0,0 +1,1056 @@
+//-------------------------------------------------------------------------------
+// 
+//  Treehouse Inc.
+//  Colorado Springs, Colorado
+// 
+//  Copyright (c) 2016 by Treehouse Designs Inc. 
+// 
+//  This code is the property of Treehouse, Inc. (Treehouse) and may not be redistributed
+//  in any form without prior written permission from the copyright holder, Treehouse.
+//
+//  The above copyright notice and this permission notice shall be included in
+//  all copies or substantial portions of the Software.
+//   
+//-------------------------------------------------------------------------------
+// 
+//  REVISION HISTORY:
+//  
+//   $Author: $
+//   $Rev: $
+//   $Date: $
+//   $URL: $
+// 
+//-------------------------------------------------------------------------------
+
+#ifndef lut_data_slot_H
+#define lut_data_slot_H
+
+uint16_t thermC[MAX_LUT_ENTRIES]{
+1,
+1,
+1,
+1,
+3,
+3,
+3,
+7,
+7,
+15,
+15,
+15,
+31,
+31,
+63,
+63,
+63,
+63,
+127,
+127,
+255,
+255,
+511,
+511,
+511,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+2047,
+2047,
+2047,
+127,
+127,
+127,
+127,
+127,
+127,
+255,
+255,
+255,
+255,
+511,
+511,
+511,
+511,
+511,
+1023,
+1023,
+1023,
+1023,
+127,
+127,
+127,
+127,
+127,
+127,
+255,
+255,
+255,
+255,
+255,
+255,
+255,
+255,
+255,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+127,
+127,
+127,
+1023,
+1023,
+1023,
+511,
+511,
+511,
+511,
+511,
+511,
+2047,
+2047,
+2047,
+2047,
+255,
+255,
+255,
+255,
+255,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+255,
+255,
+255,
+255,
+2047,
+2047,
+2047,
+2047,
+15,
+15,
+15,
+15,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+511,
+511,
+511,
+511,
+31,
+31,
+31,
+31,
+31,
+31,
+127,
+127,
+127,
+127,
+63,
+63,
+63,
+1023,
+1023,
+1023,
+1023,
+1023,
+511,
+511,
+511,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+31,
+31,
+31,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+1023,
+1023,
+1023,
+1023,
+1023,
+127,
+127,
+15,
+15,
+7,
+7,
+31,
+31,
+31,
+31,
+4095,
+4095,
+4095,
+4095,
+4095,
+127,
+127,
+127,
+2047,
+2047,
+1023,
+1023,
+1023,
+1023,
+1023,
+63,
+63,
+63,
+63,
+255,
+255,
+255,
+255,
+127,
+127,
+127,
+127,
+127,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+255,
+255,
+255,
+255,
+63,
+63,
+63,
+63,
+63,
+31,
+31,
+31,
+511,
+511,
+511,
+511,
+511,
+127,
+127,
+127,
+127,
+1023,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+15,
+15,
+15,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+255,
+255,
+255,
+255,
+1023,
+1023,
+1023,
+1023,
+1023,
+4095,
+4095,
+4095,
+4095,
+4095,
+127,
+127,
+127,
+511,
+511,
+511,
+511,
+511,
+511,
+255,
+255,
+255,
+63,
+63,
+63,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+31,
+31,
+127,
+127,
+127,
+127,
+127,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+255,
+255,
+255,
+255,
+255,
+2047,
+2047,
+2047,
+2047,
+31,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+127,
+127,
+511,
+511,
+511,
+511,
+511,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+1023,
+1023,
+1023,
+511,
+511,
+511,
+511,
+511,
+63,
+63,
+63,
+63,
+63,
+63,
+63,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+127,
+127,
+127,
+127,
+255,
+255,
+255,
+255,
+255,
+255,
+255,
+63,
+63,
+2047,
+2047,
+2047,
+2047,
+2047,
+511,
+511,
+511,
+1023,
+511,
+1023,
+1023,
+1023,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+127,
+127,
+127,
+127,
+127,
+127,
+127,
+127,
+2047,
+2047,
+2047,
+2047,
+2047,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+2047,
+2047,
+2047,
+2047,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+127,
+127,
+127,
+127,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+255,
+255,
+255,
+255,
+255,
+511,
+511,
+511,
+511,
+511,
+511,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+1023,
+1023,
+1023,
+2047,
+2047,
+2047,
+255,
+255,
+255,
+255,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+2047,
+2047,
+2047,
+2047,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+511,
+255,
+255,
+255,
+255,
+255,
+255,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+4095,
+4095,
+4095,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+255,
+255,
+255,
+255,
+255,
+255,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+511,
+511,
+511,
+511,
+511,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+511,
+511,
+511,
+511,
+511,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+1023,
+1023,
+1023,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+1023,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+2047,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095,
+4095
+};
+
+#endif
+
--- a/inc/menu.h	Fri Jan 11 21:45:55 2019 +0000
+++ b/inc/menu.h	Tue Jan 15 01:32:33 2019 +0000
@@ -53,4 +53,8 @@
 
 void menu_banner(void);
 
+extern unsigned short row;
+extern int row_test;
+extern int row_print;
+
 #endif
\ No newline at end of file
--- a/src/adc.cpp	Fri Jan 11 21:45:55 2019 +0000
+++ b/src/adc.cpp	Tue Jan 15 01:32:33 2019 +0000
@@ -112,7 +112,7 @@
     for(unsigned int i=0;i<100;i++){
         i48x = i48x + IIN48.read_u16();
         i24x = i24x + IIN24.read_u16();
-        i12x = i12x = IIN12.read_u16();
+        i12x = i12x + IIN12.read_u16();
     }
     avals.i48 = i48x/100; 
     avals.i24 = i24x/100;
--- a/src/boards.cpp	Fri Jan 11 21:45:55 2019 +0000
+++ b/src/boards.cpp	Tue Jan 15 01:32:33 2019 +0000
@@ -38,13 +38,14 @@
 unsigned int boardEnableBits;
 
 void initBoards(struct adcValues adcVals){
+    /*
     sprintf(strbuf, "\r\nV48_HI=%d\r\n", V48_HI);
     sendSerial(strbuf);
     sprintf(strbuf, "\r\nV48=%d\r\n", adcVals.v48);
     sendSerial(strbuf);
     sprintf(strbuf, "\r\nV48_LO=%d\r\n", V48_LO);
     sendSerial(strbuf);
-    
+    */
     en_out = 32;
     setBoardEnables(8191);
     
--- a/src/lut.cpp	Fri Jan 11 21:45:55 2019 +0000
+++ b/src/lut.cpp	Tue Jan 15 01:32:33 2019 +0000
@@ -35,19 +35,21 @@
 unsigned int thermCode[BOARDS_THERMCODE_WIDTH+1];
 
 
-#include "lut_data_en_v1p1.h"
-#include "lut_data_slot_v1p1.h"
+#include "lut_data_en_v1p3.h"
+#include "lut_data_slot_v1p3.h"
 
 /*******************************************************************************
 getLUT_binCode - gets output codes from LUT using row reference.
 *******************************************************************************/
 unsigned int getLUT_binCode(unsigned short row){
-    return binC[row/LUT_SCALE_FACTOR];
+    //return binC[row/LUT_SCALE_FACTOR];
+    return binC[row];
 }
 
 /*******************************************************************************
 getLUT_binCode - gets output codes from LUT using row reference.
 *******************************************************************************/
 unsigned int getLUT_thermCode(unsigned short row){
-    return thermC[row/LUT_SCALE_FACTOR];
+    //return thermC[row/LUT_SCALE_FACTOR];
+    return thermC[row];
 }
\ No newline at end of file
--- a/src/main.cpp	Fri Jan 11 21:45:55 2019 +0000
+++ b/src/main.cpp	Tue Jan 15 01:32:33 2019 +0000
@@ -27,6 +27,7 @@
 //-------------------------------------------------------------------------------
 
 #include "mbed.h"
+#include "math.h"
 #include "globals.h"
 #include "parameters.h"
 #include "all_io.h"
@@ -51,7 +52,11 @@
 
 double CURRENT_48_OFFSET = 33940;
 double CURRENT_24_OFFSET = 33580;
-double CURRENT_12_OFFSET = 33380;
+double CURRENT_12_OFFSET = 33256;
+
+unsigned short row = 0;
+int row_test = 0;
+int row_print = 0;
 
 Timer masterTimer;
 
@@ -70,8 +75,12 @@
    initADC();
 
    struct adcValues adcVals = getADCresults();
+   struct displayValues dispVals = calcDisplayValues(adcVals);
    struct statusValues statVals = checkLevels(adcVals);
    
+   row = (unsigned short)(dispVals.i12f*dispVals.v12f*ROW_CORRECTION_FACTOR);
+   unsigned int old_row = row;
+   
    menu_banner();
    //initBoards(adcVals);
    sprintf(strbuf, "\r\nPress Enter to continue");
@@ -87,6 +96,8 @@
    {
       adcVals = getADCresults();
       
+      dispVals = calcDisplayValues(adcVals);
+      
       statVals = checkLevels(adcVals);
       
       processCommand();
@@ -94,15 +105,30 @@
       // Select RUN from menu to activate running mode.
       // BRDS, MULT activate testing mode. MY12 emulates running mode wthout being in running mode.
       // CAL and UNCAL do not change state of running or testing.
+      if(adcVals.i12 < CURRENT_12_OFFSET){    
+            row = (unsigned short)(dispVals.i12f*dispVals.v12f*ROW_CORRECTION_FACTOR);
+            //updateControls(CURRENT_12_OFFSET-adcVals.i12);
+            buck = TRUE;
+      }else{
+            row = (unsigned short)(dispVals.i12f*dispVals.v12f*(-ROW_CORRECTION_FACTOR));
+            //updateControls(adcVals.i12-CURRENT_12_OFFSET);
+            buck = FALSE;
+      }
+      row_test = abs((int)(row-old_row));
       if(running){
           //The current sensors results are single-ended. Results below the midpoint are for buck mode, above is for boost mode.
-          if(adcVals.i12 < CURRENT_12_OFFSET){  
-            updateControls(CURRENT_12_OFFSET-adcVals.i12);
-            buck = TRUE;
-          }else{
-            updateControls(adcVals.i12-CURRENT_12_OFFSET);
-            buck = FALSE;
-          }
+          if(row_test>ROW_HYSTERESIS){
+             old_row = row;
+             //updateControls(CURRENT_12_OFFSET-adcVals.i12);
+             if(row<=1023){
+                 updateControls(row);
+             }
+             row_print = row;
+             myled = !myled;
+          }//else if(row_test<=ROW_HYSTERESIS){
+           //  old_row = row;
+           //  updateControls(row);
+          //}
           //count++;
       }else if(!testing){
           //updateControls(my12);
@@ -112,7 +138,7 @@
          updateReady = FALSE;
          updateTerminal(adcVals, statVals);  // May want to gate this call when we run a headless system.
          //loopTime = masterTimer.read_ms();// - loopTime;
-         myled = !myled;
+         //myled = !myled;
          //sprintf(strbuf, "\r\nupdateControls ran %d times.\r\n", count);
          //sendSerial(strbuf);
          //count=0;
--- a/src/menu.cpp	Fri Jan 11 21:45:55 2019 +0000
+++ b/src/menu.cpp	Tue Jan 15 01:32:33 2019 +0000
@@ -117,7 +117,8 @@
     sprintf( strbuf, "%c[9;0f", 27); // ESC=27, Move cursor position = [line;columnf
     sendSerial(strbuf);
     
-    sprintf(strbuf, "Status: %s%s%s%s%s%s\r\n\r\n", strbuf_mode, strbuf_running, strbuf_v48, strbuf_v24, strbuf_v12, strbuf_blank);
+    //sprintf(strbuf, "Status: %s%s%s%s%s%s\r\n\r\n", strbuf_mode, strbuf_running, strbuf_v48, strbuf_v24, strbuf_v12, strbuf_blank);
+    sprintf(strbuf, "Status: %s%s%s%s%s%d  \r\n\r\n", strbuf_mode, strbuf_running, strbuf_v48, strbuf_v24, strbuf_v12, row_print);
     sendSerial(strbuf);
     
 }
@@ -195,7 +196,7 @@
     sprintf( strbuf, "%c[34m", 27 ); // ESC=27, Blue Text
     sendSerial(strbuf);
     
-    sprintf(strbuf, "                                  Agility Power Systems DCM1 v0.9 LUT v%1.1f\r\n\r\n", LUT_VER);
+    sprintf(strbuf, "                                  Agility Power Systems DCM1 v0.95 LUT v%1.3f\r\n\r\n", LUT_VER);
     sendSerial(strbuf);
     
     sprintf( strbuf, "%c[0m", 27 ); // ESC=27, Normal