|
@@ -2533,6 +2533,15 @@ bool Bluecell_Operate(uint8_t* data){
|
2533
|
for(int i = 0; i < AGC_Alarm_DL_Index_MAX; i++){
|
2533
|
for(int i = 0; i < AGC_Alarm_DL_Index_MAX; i++){
|
2534
|
DL_PrevIwillgiveAtten[i]= 0;
|
2534
|
DL_PrevIwillgiveAtten[i]= 0;
|
2535
|
}
|
2535
|
}
|
|
|
2536
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten1_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
|
2537
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten2_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
|
2538
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten3_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
|
2539
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten4_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
|
2540
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten1_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
|
2541
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten2_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
|
2542
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten3_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
|
2543
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten4_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
|
2544
|
+
|
2536
|
break;
|
2545
|
break;
|
2537
|
case Bluecell_ULO_ALC_ON_OFF:
|
2546
|
case Bluecell_ULO_ALC_ON_OFF:
|
2538
|
bluecell_Currdatastatus.ULO_ALC_ON_OFF = data[BLUECELL_DATA + i];
|
2547
|
bluecell_Currdatastatus.ULO_ALC_ON_OFF = data[BLUECELL_DATA + i];
|
|
@@ -5379,6 +5388,14 @@ bool MBIC_Operate(uint8_t* data){
|
5379
|
for(int i = 0; i < AGC_Alarm_DL_Index_MAX; i++){
|
5388
|
for(int i = 0; i < AGC_Alarm_DL_Index_MAX; i++){
|
5380
|
DL_PrevIwillgiveAtten[i]= 0;
|
5389
|
DL_PrevIwillgiveAtten[i]= 0;
|
5381
|
}
|
5390
|
}
|
|
|
5391
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten1_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
|
5392
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten2_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
|
5393
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten3_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
|
5394
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten4_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
|
5395
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten1_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
|
5396
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten2_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
|
5397
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten3_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
|
5398
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten4_L= DLI_FRBT_ATTEN_DEFALUT;
|
5382
|
break;
|
5399
|
break;
|
5383
|
case DLI_AGC_Threshold :
|
5400
|
case DLI_AGC_Threshold :
|
5384
|
bluecell_Currdatastatus.DLI_AGC_Threshold_H = data[MBIC_PAYLOADSTART + 3];
|
5401
|
bluecell_Currdatastatus.DLI_AGC_Threshold_H = data[MBIC_PAYLOADSTART + 3];
|
|
@@ -6175,27 +6192,36 @@ void DET_LevelAlarmCheck(){
|
6175
|
uint8_t* UL_RetryCount = &bluecell_Currdatastatus.ULO_Shutdown_Retry_Count1 ;
|
6192
|
uint8_t* UL_RetryCount = &bluecell_Currdatastatus.ULO_Shutdown_Retry_Count1 ;
|
6176
|
|
6193
|
|
6177
|
// printf("============================================================================\r\n");
|
6194
|
// printf("============================================================================\r\n");
|
|
|
6195
|
+ /*UL Shutdown Check */
|
6178
|
for(int i = 0 ; i < DET_Alarm_UL_Shutdown_Index_MAX; i++){
|
6196
|
for(int i = 0 ; i < DET_Alarm_UL_Shutdown_Index_MAX; i++){
|
6179
|
- if(UL_PathStatus[DET_Alarm_UL1_Shutdown_Index + i] == true){
|
|
|
6180
|
- ADC_Alarm_UL_Normal_Shutdown_Set[DET_Alarm_UL1_Shutdown_Index + i] = true;
|
|
|
6181
|
- if(DET_UL_Normal_Shutdown_On_AlarmTimerCnt[DET_Alarm_UL1_Shutdown_Index + i] > MBIC_OFF_MAINTAIN_SEC){
|
|
|
6182
|
- if(UL_RetryCount[DET_Alarm_UL1_Shutdown_Index + i] > 0){// Nomal Operate
|
|
|
6183
|
- UL_RetryCount[DET_Alarm_UL1_Shutdown_Index + i] = 0;
|
|
|
6184
|
-// printf("UL%d_PATH : %d Retry Count Initialize Start %d \r\n",i+1,UL_PathStatus[DET_Alarm_UL1_Shutdown_Index + i],bluecell_Currdatastatus.ULO_Shutdown_Retry_Count2);
|
|
|
6185
|
- }
|
|
|
6186
|
- }
|
|
|
6187
|
- }else{
|
|
|
6188
|
- ADC_Alarm_UL_Normal_Shutdown_Set[DET_Alarm_UL1_Shutdown_Index + i] = false;
|
|
|
6189
|
- }
|
|
|
6190
|
-
|
|
|
|
|
6197
|
+
|
|
|
6198
|
+ /*UL Shutdown Cnt plus Condition Check */
|
6191
|
if(LimitData_UL_Shutdown <= Res_UL_dBm[DET_Alarm_UL1_Shutdown_Index + i]){
|
6199
|
if(LimitData_UL_Shutdown <= Res_UL_dBm[DET_Alarm_UL1_Shutdown_Index + i]){
|
|
|
6200
|
+// if(i != 0)
|
|
|
6201
|
+// continue;
|
6192
|
ADC_Alarm_UL_Shutdown_Set[DET_Alarm_UL1_Shutdown_Index + i] = true;
|
6202
|
ADC_Alarm_UL_Shutdown_Set[DET_Alarm_UL1_Shutdown_Index + i] = true;
|
6193
|
-// printf("Shutdown threas hold : %d | Curr Meas : %d Shutdown UL %d | Alarm ON Count : %d\r\n",LimitData_UL_Shutdown,Res_UL_dBm[DET_Alarm_UL1_Shutdown_Index + i],i + 1,UL_RetryCount[DET_Alarm_UL1_Shutdown_Index + i] );
|
|
|
|
|
6203
|
+// printf("1 Shutdown threas hold : %d | Curr Meas : %d Shutdown UL %d | Alarm ON Count : %d\r\n",LimitData_UL_Shutdown,Res_UL_dBm[DET_Alarm_UL1_Shutdown_Index + i],i + 1,UL_RetryCount[DET_Alarm_UL1_Shutdown_Index + i] );
|
6194
|
}
|
6204
|
}
|
6195
|
else{
|
6205
|
else{
|
|
|
6206
|
+// if(i != 0)
|
|
|
6207
|
+// continue;
|
|
|
6208
|
+ /*UL Shutdown Minus Condition Check */
|
6196
|
if(LimitData_UL_Shutdown - 2 >= Res_UL_dBm[DET_Alarm_UL1_Shutdown_Index + i])
|
6209
|
if(LimitData_UL_Shutdown - 2 >= Res_UL_dBm[DET_Alarm_UL1_Shutdown_Index + i])
|
6197
|
- ADC_Alarm_UL_Shutdown_Set[DET_Alarm_UL1_Shutdown_Index + i] = false;
|
|
|
6198
|
-// printf("Shutdown threas hold : %d | Curr Meas : %d Shutdown UL %d | Alarm OFF Count : %d\r\n",LimitData_UL_Shutdown,Res_UL_dBm[DET_Alarm_UL1_Shutdown_Index + i],i + 1,UL_RetryCount[DET_Alarm_UL1_Shutdown_Index + i] );
|
|
|
|
|
6210
|
+ ADC_Alarm_UL_Shutdown_Set[DET_Alarm_UL1_Shutdown_Index + i] = false;
|
|
|
6211
|
+// printf("2 Shutdown threas hold : %d | Curr Meas : %d Shutdown UL %d | Alarm OFF Count : %d\r\n",LimitData_UL_Shutdown,Res_UL_dBm[DET_Alarm_UL1_Shutdown_Index + i],i + 1,UL_RetryCount[DET_Alarm_UL1_Shutdown_Index + i] );
|
|
|
6212
|
+ if(UL_PathStatus[DET_Alarm_UL1_Shutdown_Index + i] == true){
|
|
|
6213
|
+ ADC_Alarm_UL_Normal_Shutdown_Set[DET_Alarm_UL1_Shutdown_Index + i] = true;
|
|
|
6214
|
+ if(DET_UL_Normal_Shutdown_On_AlarmTimerCnt[DET_Alarm_UL1_Shutdown_Index + i] > MBIC_OFF_MAINTAIN_SEC){
|
|
|
6215
|
+ if(UL_RetryCount[DET_Alarm_UL1_Shutdown_Index + i] > 0){// Nomal Operate
|
|
|
6216
|
+// if(i != 0)
|
|
|
6217
|
+// continue;
|
|
|
6218
|
+ UL_RetryCount[DET_Alarm_UL1_Shutdown_Index + i] = 0;
|
|
|
6219
|
+// printf("UL%d_PATH : %d Retry Count Initialize Start %d \r\n",i+1,UL_PathStatus[DET_Alarm_UL1_Shutdown_Index + i],bluecell_Currdatastatus.ULO_Shutdown_Retry_Count2);
|
|
|
6220
|
+ }
|
|
|
6221
|
+ }
|
|
|
6222
|
+ }else{
|
|
|
6223
|
+ ADC_Alarm_UL_Normal_Shutdown_Set[DET_Alarm_UL1_Shutdown_Index + i] = false;
|
|
|
6224
|
+ }
|
6199
|
}
|
6225
|
}
|
6200
|
}
|
6226
|
}
|
6201
|
/*
|
6227
|
/*
|
|
@@ -8343,6 +8369,8 @@ void AGC_Package_Operate(uint8_t* Threshold,uint8_t* DL_MainAtten,uint8_t Tablei
|
8343
|
#endif // PYJ.2020.09.14_END --
|
8369
|
#endif // PYJ.2020.09.14_END --
|
8344
|
if((CurrAtten) < IwillgiveAtten)
|
8370
|
if((CurrAtten) < IwillgiveAtten)
|
8345
|
IwillgiveAtten = (CurrAtten );
|
8371
|
IwillgiveAtten = (CurrAtten );
|
|
|
8372
|
+ if(IwillgiveAtten < -15)
|
|
|
8373
|
+ IwillgiveAtten = -15;
|
8346
|
|
8374
|
|
8347
|
if((ResdBm + CurrAtten) > Limitdata && DL_PrevIwillgiveAtten[Tableindex] > IwillgiveAtten){
|
8375
|
if((ResdBm + CurrAtten) > Limitdata && DL_PrevIwillgiveAtten[Tableindex] > IwillgiveAtten){
|
8348
|
// printf("IwillgiveAtten : %d \r\n",IwillgiveAtten);
|
8376
|
// printf("IwillgiveAtten : %d \r\n",IwillgiveAtten);
|
|
@@ -8353,7 +8381,7 @@ void AGC_Package_Operate(uint8_t* Threshold,uint8_t* DL_MainAtten,uint8_t Tablei
|
8353
|
|
8381
|
|
8354
|
DL_MainAtten[DLI_AGC_H] = (((IwillgiveAtten * 10) & 0xFF00) >> 8) ;
|
8382
|
DL_MainAtten[DLI_AGC_H] = (((IwillgiveAtten * 10) & 0xFF00) >> 8) ;
|
8355
|
DL_MainAtten[DLI_AGC_L] = (((IwillgiveAtten * 10) & 0x00FF));
|
8383
|
DL_MainAtten[DLI_AGC_L] = (((IwillgiveAtten * 10) & 0x00FF));
|
8356
|
-// printf("Apply Curr ATTEN %d \r\n", (int16_t)(DL_MainAtten[DLI_AGC_H] << 8 | DL_MainAtten[DLI_AGC_L]));
|
|
|
|
|
8384
|
+// printf("Apply 1 Curr ATTEN %d \r\n", (int16_t)(DL_MainAtten[DLI_AGC_H] << 8 | DL_MainAtten[DLI_AGC_L]));
|
8357
|
CompareAttenData(bluecell_Currdatastatus,bluecell_Prevdatastatus);
|
8385
|
CompareAttenData(bluecell_Currdatastatus,bluecell_Prevdatastatus);
|
8358
|
}
|
8386
|
}
|
8359
|
else if(bluecell_Currdatastatus.DLI_FRBT_Status == FRBT_RUNNING){
|
8387
|
else if(bluecell_Currdatastatus.DLI_FRBT_Status == FRBT_RUNNING){
|
|
@@ -8366,7 +8394,7 @@ void AGC_Package_Operate(uint8_t* Threshold,uint8_t* DL_MainAtten,uint8_t Tablei
|
8366
|
DL_PrevIwillgiveAtten[Tableindex] = IwillgiveAtten;
|
8394
|
DL_PrevIwillgiveAtten[Tableindex] = IwillgiveAtten;
|
8367
|
DL_MainAtten[DLI_AGC_H] = (((IwillgiveAtten * 10) & 0xFF00) >> 8) ;
|
8395
|
DL_MainAtten[DLI_AGC_H] = (((IwillgiveAtten * 10) & 0xFF00) >> 8) ;
|
8368
|
DL_MainAtten[DLI_AGC_L] = (((IwillgiveAtten * 10) & 0x00FF));
|
8396
|
DL_MainAtten[DLI_AGC_L] = (((IwillgiveAtten * 10) & 0x00FF));
|
8369
|
-
|
|
|
|
|
8397
|
+// printf("Apply 2 Curr ATTEN %d \r\n", (int16_t)(DL_MainAtten[DLI_AGC_H] << 8 | DL_MainAtten[DLI_AGC_L]));
|
8370
|
CompareAttenData(bluecell_Currdatastatus,bluecell_Prevdatastatus);
|
8398
|
CompareAttenData(bluecell_Currdatastatus,bluecell_Prevdatastatus);
|
8371
|
}
|
8399
|
}
|
8372
|
}
|
8400
|
}
|
|
@@ -8907,10 +8935,10 @@ void ULO_ShutdownAlarmCheck(){
|
8907
|
&bluecell_Currdatastatus.ULO_Shutdown_Alarm2,
|
8935
|
&bluecell_Currdatastatus.ULO_Shutdown_Alarm2,
|
8908
|
ALARM_ULO_SHUTDOWN_P2);
|
8936
|
ALARM_ULO_SHUTDOWN_P2);
|
8909
|
UL_Shutdown_Operate(DET_Alarm_UL3_Shutdown_Index,
|
8937
|
UL_Shutdown_Operate(DET_Alarm_UL3_Shutdown_Index,
|
8910
|
- &bluecell_Currdatastatus.ATT_UL3_PATH,
|
|
|
8911
|
- &bluecell_Prevdatastatus.ATT_UL3_H,
|
|
|
8912
|
- &bluecell_Currdatastatus.ULO_Shutdown_Retry_Count3,
|
|
|
8913
|
- &bluecell_Currdatastatus.ULO_Shutdown_Alarm3,
|
|
|
|
|
8938
|
+ &bluecell_Currdatastatus.ATT_UL3_PATH,
|
|
|
8939
|
+ &bluecell_Prevdatastatus.ATT_UL3_H,
|
|
|
8940
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Retry_Count3,
|
|
|
8941
|
+ &bluecell_Currdatastatus.ULO_Shutdown_Alarm3,
|
8914
|
ALARM_ULO_SHUTDOWN_P3);
|
8942
|
ALARM_ULO_SHUTDOWN_P3);
|
8915
|
UL_Shutdown_Operate(DET_Alarm_UL4_Shutdown_Index,
|
8943
|
UL_Shutdown_Operate(DET_Alarm_UL4_Shutdown_Index,
|
8916
|
&bluecell_Currdatastatus.ATT_UL4_PATH,
|
8944
|
&bluecell_Currdatastatus.ATT_UL4_PATH,
|
|
@@ -8939,6 +8967,7 @@ void ULO_ShutdownAlarmCheck(){
|
8939
|
bluecell_Currdatastatus.ULO_Shutdown_Alarm2 = false;
|
8967
|
bluecell_Currdatastatus.ULO_Shutdown_Alarm2 = false;
|
8940
|
bluecell_Currdatastatus.ULO_Shutdown_Alarm3 = false;
|
8968
|
bluecell_Currdatastatus.ULO_Shutdown_Alarm3 = false;
|
8941
|
bluecell_Currdatastatus.ULO_Shutdown_Alarm4 = false;
|
8969
|
bluecell_Currdatastatus.ULO_Shutdown_Alarm4 = false;
|
|
|
8970
|
+
|
8942
|
|
8971
|
|
8943
|
}
|
8972
|
}
|
8944
|
}
|
8973
|
}
|