
//Calibration Constants to relate cnts to engineering units.
//Any definitions here should also have an extern declartion in extern.h



//12 Bit DAC Mode
#define BALANCING_CAL_FACTOR 1.01022  //1.02
#define STOPCHARGE_CAL_FACTOR 1.02064  //1.01

//const int VBatt_cnt[2] =  {20856   , 27820};
//const  float VBatt_eng[2] =   {250  , 330.1};
//
//const int Ips_cnt[2] =  {14637   , 13157};  /* */
//const  float Ips_eng[2] =  {0.0  , 510.0};   //mA

const int VBatt_cnt[2] =  {18943   , 22416};
const  float VBatt_eng[2] =   {254.3  , 299.9};

const int Ips_cnt[2] =  {14684   , 13500};  /* */
const  float Ips_eng[2] =  {0.0  , 100.0};

const int V_StopCharge_cnt[2] =  {0   , 32760}; /*0->3.3V = 0-300psi = 0->30000 centi-psi*/
const  float V_StopCharge_eng[2] =   {0.0  , 3.35*STOPCHARGE_CAL_FACTOR};   //Using processor 3.3 as reference, measured as 3.35

const int V_Balance_cnt[2] =  {0   , 32760};
const  float V_Balance_eng[2] =   {0.0  , 3.35*BALANCING_CAL_FACTOR};  //Using processor 3.3 as reference, measured as 3.35

const int Rgroundfault_cnt[2] =  {5820   , 29480};   /* Bender, 0-20mA, Calibrated 7/19/2018 */
const  float Rgroundfault_eng[2] =  {4.00  , 20.0};   

const int H2Sensor_cnt[2] =  {6100   , 20000};  /* H2 Sensor, 4-20mA, Calibrate to LEL 8/22/2018 */
const  float H2Sensor_eng[2] =   {0.00  ,50.0};