|
@@ -26,8 +26,6 @@ extern volatile uint32_t AlarmTimerOnCnt;
|
26
|
26
|
extern volatile uint32_t AlarmTimerOffCnt;
|
27
|
27
|
|
28
|
28
|
extern ALL_PE43711_st ALL_ATT;
|
29
|
|
-extern volatile uint32_t ADC1_Average_value[4];
|
30
|
|
-extern volatile uint32_t ADC3_Average_value[5];
|
31
|
29
|
extern volatile uint16_t ADC1valuearray[4][ADC_AVERAGECNT];
|
32
|
30
|
extern volatile uint16_t ADC3valuearray[5][ADC_AVERAGECNT];
|
33
|
31
|
|
|
@@ -52,15 +50,12 @@ void Booting_LED_Check(void);
|
52
|
50
|
/* Valuable */
|
53
|
51
|
/***************************************************************************************/
|
54
|
52
|
|
55
|
|
-uint8_t Alarm_Status[MAX_ALARM_Len] = {0,};
|
56
|
|
-uint8_t ResultData[1024] = {0,};
|
|
53
|
+
|
57
|
54
|
uint8_t DataWrite[sizeof(BLUESTATUS_st)] = {0,};
|
58
|
|
-uint8_t DataRead[512] = {0,};
|
59
|
55
|
uint8_t Txdata[512];
|
60
|
56
|
int8_t AutoControl_Save[sizeof(ALC_dBm_t)];
|
61
|
57
|
uint16_t ADC1Ret[4];
|
62
|
|
-double ADC1DoubleRet[4];
|
63
|
|
-double ADC3DoubleRet[5];
|
|
58
|
+
|
64
|
59
|
uint16_t ADC3Ret[5];
|
65
|
60
|
|
66
|
61
|
ATT_TABLE_st Att_DL1;
|
|
@@ -95,17 +90,7 @@ TEMP_TABLE_st Temp_UL4;
|
95
|
90
|
BLUESTATUS_st bluecell_Currdatastatus;
|
96
|
91
|
BLUESTATUS_st bluecell_Prevdatastatus;
|
97
|
92
|
|
98
|
|
-int8_t AGC_Table_ref[sizeof(AGC_dBm_t)] = {
|
99
|
|
- 5 , 4 , 3 , 2 ,
|
100
|
|
- 1 , 0 , -1 , -2 ,
|
101
|
|
- -3 , -4 , -5 , -6 ,
|
102
|
|
- -7 , -8 , -9 , -10 ,
|
103
|
|
- -11 , -12 , -13 , -14 ,
|
104
|
|
- -15 , -16 , -17 , -18 ,
|
105
|
|
- -19 , -20 , -21 , -22 ,
|
106
|
|
- -23 , -24 , -25 ,
|
107
|
93
|
|
108
|
|
-};
|
109
|
94
|
int8_t AGC_ATTEN_ref[16] = {
|
110
|
95
|
15 ,
|
111
|
96
|
14 ,
|
|
@@ -125,16 +110,6 @@ int8_t AGC_ATTEN_ref[16] = {
|
125
|
110
|
0 ,
|
126
|
111
|
};
|
127
|
112
|
|
128
|
|
-ALC_dBm_t ALC_Table_ref = {
|
129
|
|
- -15 , -16 , -17 , -18 , -19 ,
|
130
|
|
- -20 , -21 , -22 , -23 , -24 , -25 , -26 , -27 ,
|
131
|
|
- -28 , -29 , -30 , -31 , -32 , -33 , -34 , -35 ,
|
132
|
|
- -36 , -37 , -38 , -39 , -40 , -41 , -42 , -43 ,
|
133
|
|
- -44 , -45 , -46 , -47 , -48 , -49 , -50 , -51 ,
|
134
|
|
- -52 , -53 , -54 , -55 , -56 , -57 , -58 , -59 ,
|
135
|
|
- -60 ,
|
136
|
|
-
|
137
|
|
-};
|
138
|
113
|
|
139
|
114
|
|
140
|
115
|
|
|
@@ -1462,7 +1437,10 @@ void DataStatusSet(void){
|
1462
|
1437
|
|
1463
|
1438
|
DataStatusSet();
|
1464
|
1439
|
}
|
|
1440
|
+//uint8_t ResultData[1024] = {0,};
|
1465
|
1441
|
uint8_t* MBIC_HeaderDataSetting(uint8_t* data){
|
|
1442
|
+ static uint8_t ResultData[1024] = {0,}; /*NOT YET*/
|
|
1443
|
+
|
1466
|
1444
|
ResultData[MBIC_PREAMBLE_0] = MBIC_PREAMBLE0;
|
1467
|
1445
|
ResultData[MBIC_PREAMBLE_1] = MBIC_PREAMBLE1;
|
1468
|
1446
|
ResultData[MBIC_PREAMBLE_2] = MBIC_PREAMBLE2;
|
|
@@ -2426,6 +2404,10 @@ uint32_t SumFunc(uint16_t* data,uint16_t size){
|
2426
|
2404
|
|
2427
|
2405
|
void ADC_Check(void){
|
2428
|
2406
|
//static uint8_t Cnt = 0;
|
|
2407
|
+ double ADC1DoubleRet[4];
|
|
2408
|
+ double ADC3DoubleRet[5];
|
|
2409
|
+ uint32_t ADC1_Average_value[ADC1_CNT];
|
|
2410
|
+ uint32_t ADC3_Average_value[ADC3_CNT];
|
2429
|
2411
|
|
2430
|
2412
|
// double ret = 0;
|
2431
|
2413
|
uint16_t MIN_ADC[ADC3_CNT] = {0,};
|
|
@@ -2780,13 +2762,25 @@ void ALC_Function(){ //DL
|
2780
|
2762
|
double ret = 0;
|
2781
|
2763
|
// double CurrnALCValue = 0;
|
2782
|
2764
|
double CurrentATTENVALUE = 0;
|
2783
|
|
- int32_t CurrnALC_MAX_SettingValue = 0;
|
2784
|
|
- int32_t CurrnALC_MIN_SettingValue = 0;
|
2785
|
|
- int32_t ALC_Result = 0;
|
|
2765
|
+ // int32_t CurrnALC_MAX_SettingValue = 0;
|
|
2766
|
+ // int32_t CurrnALC_MIN_SettingValue = 0;
|
|
2767
|
+ // int32_t ALC_Result = 0;
|
2786
|
2768
|
int16_t Limitdata = 0;
|
2787
|
2769
|
double ResdBm = 0;
|
2788
|
2770
|
uint16_t IwillGiveAtten = 0;
|
2789
|
2771
|
uint8_t tempadc[100];
|
|
2772
|
+ ALC_dBm_t ALC_Table_ref = {
|
|
2773
|
+ -15 , -16 , -17 , -18 , -19 ,
|
|
2774
|
+ -20 , -21 , -22 , -23 , -24 , -25 , -26 , -27 ,
|
|
2775
|
+ -28 , -29 , -30 , -31 , -32 , -33 , -34 , -35 ,
|
|
2776
|
+ -36 , -37 , -38 , -39 , -40 , -41 , -42 , -43 ,
|
|
2777
|
+ -44 , -45 , -46 , -47 , -48 , -49 , -50 , -51 ,
|
|
2778
|
+ -52 , -53 , -54 , -55 , -56 , -57 , -58 , -59 ,
|
|
2779
|
+ -60 ,
|
|
2780
|
+
|
|
2781
|
+ };
|
|
2782
|
+
|
|
2783
|
+
|
2790
|
2784
|
Bluecell_StructCpy(&AutoControl_Save[0],&ALC_Table_ref.DET_UL_0,sizeof(ALC_dBm_t));
|
2791
|
2785
|
Bluecell_StructCpy(&tempadc[0],&Det_UL1.Table_Det_15_dBm_H,sizeof(DET_TABLEUL_st));
|
2792
|
2786
|
if(ALCTimerCnt > 100){
|
|
@@ -2917,6 +2911,18 @@ void AGC_Function(){//DL
|
2917
|
2911
|
int i = 0;
|
2918
|
2912
|
int16_t Limitdata = 0;
|
2919
|
2913
|
uint16_t IwillgiveAtten = 0;
|
|
2914
|
+ int8_t AGC_Table_ref[sizeof(AGC_dBm_t)] = {
|
|
2915
|
+ 5 , 4 , 3 , 2 ,
|
|
2916
|
+ 1 , 0 , -1 , -2 ,
|
|
2917
|
+ -3 , -4 , -5 , -6 ,
|
|
2918
|
+ -7 , -8 , -9 , -10 ,
|
|
2919
|
+ -11 , -12 , -13 , -14 ,
|
|
2920
|
+ -15 , -16 , -17 , -18 ,
|
|
2921
|
+ -19 , -20 , -21 , -22 ,
|
|
2922
|
+ -23 , -24 , -25 ,
|
|
2923
|
+
|
|
2924
|
+ };
|
|
2925
|
+
|
2920
|
2926
|
if(AGCTimerCnt > 100){
|
2921
|
2927
|
Bluecell_StructCpy(&AutoControl_Save[0],&AGC_Table_ref[0],sizeof(AGC_dBm_t));
|
2922
|
2928
|
|