comparison chipsetsw/layer1/cust0/l1_cust.c @ 210:7f3182969aac

l1_cust.c: Cust_get_pwr_data() reconstructed
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 08 Jun 2016 06:47:02 +0000
parents c79dd8f07fc5
children f56dea71a75f
comparison
equal deleted inserted replaced
209:c79dd8f07fc5 210:7f3182969aac
879 // temperature compensate apc 879 // temperature compensate apc
880 { 880 {
881 T_TX_TEMP_CAL *pt; 881 T_TX_TEMP_CAL *pt;
882 882
883 pt = rf_band[band].tx.temp; 883 pt = rf_band[band].tx.temp;
884 while ((WORD16)adc.converted[ADC_RFTEMP] > pt->temperature) 884 while (((WORD16)adc.converted[ADC_RFTEMP] > pt->temperature) && ((pt-rf_band[band].tx.temp) < (RF_TX_CAL_TEMP_SIZE-1)))
885 pt++; 885 pt++;
886 #if(ORDER2_TX_TEMP_CAL==1) 886 #if(ORDER2_TX_TEMP_CAL==1)
887 pwr_data += (txpwr*(pt->a*txpwr + pt->b) + pt->c) / 64; //delta apc = ax^2+bx+c 887 pwr_data += (txpwr*(pt->a*txpwr + pt->b) + pt->c) / 64; //delta apc = ax^2+bx+c
888 if(pwr_data < 0) pwr_data = 0; 888 if(pwr_data < 0) pwr_data = 0;
889 #else 889 #else