diff --git a/workspace/TS100/Core/Drivers/TipThermoModel.cpp b/workspace/TS100/Core/Drivers/TipThermoModel.cpp index 2d3dc794..5264130d 100755 --- a/workspace/TS100/Core/Drivers/TipThermoModel.cpp +++ b/workspace/TS100/Core/Drivers/TipThermoModel.cpp @@ -67,7 +67,7 @@ uint32_t TipThermoModel::convertTipRawADCToDegF(uint16_t rawADC) { // [x1, y1] = point 1 // [x2, y2] = point 2 // x = input value -// output is x's extrapolated y value +// output is x's interpolated y value int32_t LinearInterpolate(int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x) { return y1 + (((((x - x1) * 1000) / (x2 - x1)) * (y2 - y1))) / 1000; } @@ -133,58 +133,57 @@ const uint16_t uVtoDegC[] = { // const uint16_t uVtoDegC[] = { // // - - 2337 , 0, // - 3008 , 10, // - 3693 , 20, // - 4390 , 30, // - 5101 , 40, // - 5825 , 50, // - 6562 , 60, // - 7312 , 70, // - 8076 , 80, // - 8852 , 90, // - 9642 , 100, // - 10445 , 110, // - 11261 , 120, // - 12090 , 130, // - 12932 , 140, // - 13787 , 150, // - 14656 , 160, // - 15537 , 170, // - 16432 , 180, // - 17340 , 190, // - 18261 , 200, // - 19195 , 210, // - 20143 , 220, // - 21103 , 230, // - 22077 , 240, // - 23063 , 250, // - 24063 , 260, // - 25076 , 270, // - 26102 , 280, // - 27142 , 290, // - 28194 , 300, // - 29260 , 310, // - 30339 , 320, // - 31430 , 330, // - 32535 , 340, // - 33654 , 350, // - 34785 , 360, // - 35929 , 370, // - 37087 , 380, // - 38258 , 390, // - 39441 , 400, // - 40638 , 410, // - 41849 , 420, // - 43072 , 430, // - 44308 , 440, // - 45558 , 450, // - 46820 , 460, // - 48096 , 470, // - 49385 , 480, // - 50687 , 490, // - 52003 , 500, // + 530 , 0, // + 1282 , 10, // + 2034 , 20, // + 2786 , 30, // + 3538 , 40, // + 4290 , 50, // + 5043 , 60, // + 5795 , 70, // + 6547 , 80, // + 7299 , 90, // + 8051 , 100, // + 8803 , 110, // + 9555 , 120, // + 10308 , 130, // + 11060 , 140, // + 11812 , 150, // + 12564 , 160, // + 13316 , 170, // + 14068 , 180, // + 14820 , 190, // + 15573 , 200, // + 16325 , 210, // + 17077 , 220, // + 17829 , 230, // + 18581 , 240, // + 19333 , 250, // + 20085 , 260, // + 20838 , 270, // + 21590 , 280, // + 22342 , 290, // + 23094 , 300, // + 23846 , 310, // + 24598 , 320, // + 25350 , 330, // + 26103 , 340, // + 26855 , 350, // + 27607 , 360, // + 28359 , 370, // + 29111 , 380, // + 29863 , 390, // + 30615 , 400, // + 31368 , 410, // + 32120 , 420, // + 32872 , 430, // + 33624 , 440, // + 34376 , 450, // + 35128 , 460, // + 35880 , 470, // + 36632 , 480, // + 37385 , 490, // + 38137 , 500, // }; #endif uint32_t TipThermoModel::convertuVToDegC(uint32_t tipuVDelta) { diff --git a/workspace/TS100/configuration.h b/workspace/TS100/configuration.h index 35248f4c..50d9c2cc 100644 --- a/workspace/TS100/configuration.h +++ b/workspace/TS100/configuration.h @@ -143,7 +143,7 @@ #ifdef MODEL_TS80P #define VOLTAGE_DIV 650 // Default for TS80P with slightly different resistors #define PID_POWER_LIMIT 35 // Sets the max pwm power limit -#define CALIBRATION_OFFSET 0 // the adc offset in uV +#define CALIBRATION_OFFSET 1500 // the adc offset in uV #define POWER_LIMIT 30 // 30 watts default power limit #define MAX_POWER_LIMIT 35 // #define POWER_LIMIT_STEPS 2