Treehouse Mbed Team / Mbed 2 deprecated APS_1U5x

Dependencies:   mbed

Committer:
mfwic
Date:
Tue Jan 15 01:32:33 2019 +0000
Revision:
22:2c37ac12746e
Parent:
18:78e982f31c6b
Child:
25:8bcc8bea0e31
Added hysteresis; Changed LUT to use v12*i12 instead of just i12.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mfwic 4:db38665c3727 1 //-------------------------------------------------------------------------------
mfwic 4:db38665c3727 2 //
mfwic 4:db38665c3727 3 // Treehouse Designs Inc.
mfwic 4:db38665c3727 4 // Colorado Springs, Colorado
mfwic 4:db38665c3727 5 //
mfwic 4:db38665c3727 6 // Copyright (c) 2016 by Treehouse Designs Inc.
mfwic 4:db38665c3727 7 // Copyright (c) 2018 by Agility Power Systems Inc.
mfwic 4:db38665c3727 8 //
mfwic 4:db38665c3727 9 // This code is the property of Treehouse Designs, Inc. (Treehouse) and
mfwic 4:db38665c3727 10 // Agility Power Systems Inc. (Agility) and may not be redistributed
mfwic 4:db38665c3727 11 // in any form without prior written permission from
mfwic 4:db38665c3727 12 // both copyright holders, Treehouse and Agility.
mfwic 4:db38665c3727 13 //
mfwic 4:db38665c3727 14 // The above copyright notice and this permission notice shall be included in
mfwic 4:db38665c3727 15 // all copies or substantial portions of the Software.
mfwic 4:db38665c3727 16 //
mfwic 4:db38665c3727 17 //
mfwic 4:db38665c3727 18 //-------------------------------------------------------------------------------
mfwic 4:db38665c3727 19 //
mfwic 4:db38665c3727 20 // REVISION HISTORY:
mfwic 4:db38665c3727 21 //
mfwic 4:db38665c3727 22 // $Author: $
mfwic 4:db38665c3727 23 // $Rev: $
mfwic 4:db38665c3727 24 // $Date: $
mfwic 4:db38665c3727 25 // $URL: $
mfwic 4:db38665c3727 26 //
mfwic 4:db38665c3727 27 //-------------------------------------------------------------------------------
mfwic 4:db38665c3727 28
mfwic 4:db38665c3727 29 #include "mbed.h"
mfwic 5:09be5bbb5020 30 #include "stdint.h"
mfwic 6:39442d493098 31 #include "globals.h"
mfwic 4:db38665c3727 32 #include "lut.h"
mfwic 4:db38665c3727 33
mfwic 11:01dcfb29fbc4 34 unsigned int binCode[WEIGHT_BIN_WIDTH+1];
mfwic 11:01dcfb29fbc4 35 unsigned int thermCode[BOARDS_THERMCODE_WIDTH+1];
mfwic 9:816b9a4e4f21 36
mfwic 18:78e982f31c6b 37
mfwic 22:2c37ac12746e 38 #include "lut_data_en_v1p3.h"
mfwic 22:2c37ac12746e 39 #include "lut_data_slot_v1p3.h"
mfwic 5:09be5bbb5020 40
mfwic 6:39442d493098 41 /*******************************************************************************
mfwic 6:39442d493098 42 getLUT_binCode - gets output codes from LUT using row reference.
mfwic 6:39442d493098 43 *******************************************************************************/
mfwic 6:39442d493098 44 unsigned int getLUT_binCode(unsigned short row){
mfwic 22:2c37ac12746e 45 //return binC[row/LUT_SCALE_FACTOR];
mfwic 22:2c37ac12746e 46 return binC[row];
mfwic 6:39442d493098 47 }
mfwic 4:db38665c3727 48
mfwic 6:39442d493098 49 /*******************************************************************************
mfwic 6:39442d493098 50 getLUT_binCode - gets output codes from LUT using row reference.
mfwic 6:39442d493098 51 *******************************************************************************/
mfwic 6:39442d493098 52 unsigned int getLUT_thermCode(unsigned short row){
mfwic 22:2c37ac12746e 53 //return thermC[row/LUT_SCALE_FACTOR];
mfwic 22:2c37ac12746e 54 return thermC[row];
mfwic 4:db38665c3727 55 }