|
@@ -6460,10 +6460,14 @@ void AGC_Function(){//DL
|
6460
|
6460
|
DL_Curr_Atten[AGC_Alarm_DL4_Index] =
|
6461
|
6461
|
bluecell_Currdatastatus.ATT_DL4_H << 8 | bluecell_Currdatastatus.ATT_DL4_L;
|
6462
|
6462
|
for(int k = 0; k < AGC_Alarm_DL_Index_MAX; k++){
|
6463
|
|
- if((DL_Curr_Atten[AGC_Alarm_DL1_Index+i] * 0.1) <= -15 ){
|
6464
|
|
- AGC_AlarmSet[AGC_Alarm_DL1_Index+i] = true;
|
|
6463
|
+ if(DL_Curr_Atten[AGC_Alarm_DL1_Index+k] <= -150)
|
|
6464
|
+ DL_Curr_Atten[AGC_Alarm_DL1_Index+k] = -150;
|
|
6465
|
+// printf("DL_Curr_Atten%d : %d \r\n",k+1,DL_Curr_Atten[AGC_Alarm_DL1_Index+k] * 0.1);
|
|
6466
|
+ if((DL_Curr_Atten[AGC_Alarm_DL1_Index+k] * 0.1) <= -15 ){
|
|
6467
|
+// printf("DL_Curr_Atten%d : %d Alarm TRue\r\n",k+1,DL_Curr_Atten[AGC_Alarm_DL1_Index+k]);
|
|
6468
|
+ AGC_AlarmSet[AGC_Alarm_DL1_Index+k] = true;
|
6465
|
6469
|
}else{
|
6466
|
|
- AGC_AlarmSet[AGC_Alarm_DL1_Index+i] = false;
|
|
6470
|
+ AGC_AlarmSet[AGC_Alarm_DL1_Index+k] = false;
|
6467
|
6471
|
}
|
6468
|
6472
|
}
|
6469
|
6473
|
#if 0 // PYJ.2020.06.23_BEGIN --
|
|
@@ -7140,9 +7144,6 @@ void DLI_ShutdownAlarmCheck(){
|
7140
|
7144
|
|
7141
|
7145
|
}
|
7142
|
7146
|
#else
|
7143
|
|
-//DL_Shutdown_Operate(DET_Alarm_DL1_Shutdown_Index,
|
7144
|
|
-// &bluecell_Currdatastatus.ATT_DL1_PATH,
|
7145
|
|
-// &bluecell_Currdatastatus.DLI_Shutdown_Retry_Count1);
|
7146
|
7147
|
|
7147
|
7148
|
void DL_Shutdown_Operate(uint8_t index,uint8_t* path,uint8_t* retrycnt){
|
7148
|
7149
|
GPIO_TypeDef *Port;
|
|
@@ -7223,6 +7224,23 @@ void DLI_ShutdownAlarmCheck()
|
7223
|
7224
|
/***************************************************************************************************************/
|
7224
|
7225
|
/* SHUTDOWN DL1 */
|
7225
|
7226
|
/***************************************************************************************************************/
|
|
7227
|
+ DL_Shutdown_Operate(DET_Alarm_DL1_Shutdown_Index,
|
|
7228
|
+ &bluecell_Currdatastatus.ATT_DL1_PATH,
|
|
7229
|
+ &bluecell_Currdatastatus.DLI_Shutdown_Retry_Count1);
|
|
7230
|
+ DL_Shutdown_Operate(DET_Alarm_DL2_Shutdown_Index,
|
|
7231
|
+ &bluecell_Currdatastatus.ATT_DL2_PATH,
|
|
7232
|
+ &bluecell_Currdatastatus.DLI_Shutdown_Retry_Count2);
|
|
7233
|
+ DL_Shutdown_Operate(DET_Alarm_DL3_Shutdown_Index,
|
|
7234
|
+ &bluecell_Currdatastatus.ATT_DL3_PATH,
|
|
7235
|
+ &bluecell_Currdatastatus.DLI_Shutdown_Retry_Count3);
|
|
7236
|
+ DL_Shutdown_Operate(DET_Alarm_DL4_Shutdown_Index,
|
|
7237
|
+ &bluecell_Currdatastatus.ATT_DL4_PATH,
|
|
7238
|
+ &bluecell_Currdatastatus.DLI_Shutdown_Retry_Count4);
|
|
7239
|
+
|
|
7240
|
+
|
|
7241
|
+
|
|
7242
|
+
|
|
7243
|
+#if 0 // PYJ.2020.06.28_BEGIN --
|
7226
|
7244
|
if(MBIC_DL_ShutdownCount[DET_Alarm_DL1_Shutdown_Index] < 3
|
7227
|
7245
|
&& (PrevMBIC_DL_ShutdownCount[DET_Alarm_DL1_Shutdown_Index] != MBIC_DL_ShutdownCount[DET_Alarm_DL1_Shutdown_Index])
|
7228
|
7246
|
&& DET_DL_Shutdown_Off_AlarmTimerCnt[DET_Alarm_DL1_Shutdown_Index] >= MBIC_RECOVERY_SHUTDOWN_MAINTAIN_SEC
|
|
@@ -7410,6 +7428,7 @@ void DLI_ShutdownAlarmCheck()
|
7410
|
7428
|
bluecell_Currdatastatus.DLI_Shutdown_Alarm4 = false;
|
7411
|
7429
|
}
|
7412
|
7430
|
}
|
|
7431
|
+#endif // PYJ.2020.06.28_END --
|
7413
|
7432
|
}
|
7414
|
7433
|
else{
|
7415
|
7434
|
bluecell_Currdatastatus.ALARM_DLI_SHTUTDOWN = 0;
|
|
@@ -7967,8 +7986,8 @@ void DLI_AGCAlarmCheck(){
|
7967
|
7986
|
bluecell_Currdatastatus.DLI_AGC_Alarm3 = false;
|
7968
|
7987
|
}
|
7969
|
7988
|
}
|
7970
|
|
- if(AGC_AlarmSet[AGC_Alarm_DL3_Index] == true
|
7971
|
|
- &&AGC_On_AlarmTimerCnt[AGC_Alarm_DL3_Index] >= MBIC_ON_MAINTAIN_SEC){
|
|
7989
|
+ if(AGC_AlarmSet[AGC_Alarm_DL4_Index] == true
|
|
7990
|
+ &&AGC_On_AlarmTimerCnt[AGC_Alarm_DL4_Index] >= MBIC_ON_MAINTAIN_SEC){
|
7972
|
7991
|
// printf("ALARM_AGC_P4 OCCUR\r\n");
|
7973
|
7992
|
bluecell_Currdatastatus.ALARM_DLI_AGC_Alarm |= ALARM_AGC_P4;
|
7974
|
7993
|
bluecell_Currdatastatus.DLI_AGC_Alarm4 = true;
|
|
@@ -8007,6 +8026,76 @@ void Temp_HighAlarmCheck(){
|
8007
|
8026
|
|
8008
|
8027
|
}
|
8009
|
8028
|
|
|
8029
|
+#if 0 // PYJ.2020.06.28_BEGIN --
|
|
8030
|
+
|
|
8031
|
+long totalday(int y, int m, int d);
|
|
8032
|
+int frbt_data_Calcoperate()
|
|
8033
|
+{
|
|
8034
|
+ int sy;
|
|
8035
|
+ int sm;
|
|
8036
|
+ int sd;
|
|
8037
|
+ int fy;
|
|
8038
|
+ int fm;
|
|
8039
|
+ int fd;
|
|
8040
|
+ int dates;
|
|
8041
|
+ printf("첫번째 년 월일 입력 \n");
|
|
8042
|
+ printf("형식 1998 8 23 : " );
|
|
8043
|
+ scanf("%d %d %d",&fy,&fm,&fd);
|
|
8044
|
+ printf("두번째 년 월일 입력 \n");
|
|
8045
|
+ printf("형식 1998 8 23 : " );
|
|
8046
|
+ scanf("%d %d %d",&sy,&sm,&sd);
|
|
8047
|
+ dates = totalday(sy,sm,sd) - totalday(fy,fm,fd);
|
|
8048
|
+ printf("\n\n%d년 %d월 %d일 과 \n", fy, fm, fd);
|
|
8049
|
+ printf("%d년 %d월 %d일 사이의 \n", sy,sm,sd);
|
|
8050
|
+ printf("총 날짜 수 : %ld일\n", dates);
|
|
8051
|
+ return 0;
|
|
8052
|
+
|
|
8053
|
+}
|
|
8054
|
+long totalday(int y, int m, int d)
|
|
8055
|
+{
|
|
8056
|
+ int months[] = {31,28,31,30,31,30,31,31,30,31,30,31};
|
|
8057
|
+ int i;
|
|
8058
|
+ long total = 0L;
|
|
8059
|
+ total = (y-1)*365L + (y-1)/4-(y-1)/100+(y-1)/400;
|
|
8060
|
+ if(!(y%4) && y%100 || !(y%400))
|
|
8061
|
+ months[1]++;
|
|
8062
|
+ for(i=0; i<m-1; i++)
|
|
8063
|
+ total += months[i];
|
|
8064
|
+ total +=d;
|
|
8065
|
+ return total;
|
|
8066
|
+}
|
|
8067
|
+#endif // PYJ.2020.06.28_END --
|
|
8068
|
+
|
|
8069
|
+void FRBT_Operate(){
|
|
8070
|
+ int16_t DL_Atten[DET_Alarm_DL_Index_MAX] = {0,};
|
|
8071
|
+ int16_t FRBT_DL_Atten[DET_Alarm_DL_Index_MAX] = {0,};
|
|
8072
|
+
|
|
8073
|
+ FRBT_DL_Atten[DET_Alarm_DL1_Index] = bluecell_Currdatastatus.DLI_FRBT_Atten1_H << 8 | bluecell_Currdatastatus.DLI_FRBT_Atten1_L;
|
|
8074
|
+ FRBT_DL_Atten[DET_Alarm_DL1_Index] = bluecell_Currdatastatus.DLI_FRBT_Atten2_H << 8 | bluecell_Currdatastatus.DLI_FRBT_Atten2_L;
|
|
8075
|
+ FRBT_DL_Atten[DET_Alarm_DL1_Index] = bluecell_Currdatastatus.DLI_FRBT_Atten3_H << 8 | bluecell_Currdatastatus.DLI_FRBT_Atten3_L;
|
|
8076
|
+ FRBT_DL_Atten[DET_Alarm_DL1_Index] = bluecell_Currdatastatus.DLI_FRBT_Atten4_H << 8 | bluecell_Currdatastatus.DLI_FRBT_Atten4_L;
|
|
8077
|
+
|
|
8078
|
+ DL_Atten[DET_Alarm_DL1_Index] = bluecell_Currdatastatus.ATT_DL1_H << 8 | bluecell_Currdatastatus.ATT_DL1_L;
|
|
8079
|
+ DL_Atten[DET_Alarm_DL2_Index] = bluecell_Currdatastatus.ATT_DL2_H << 8 | bluecell_Currdatastatus.ATT_DL2_L;
|
|
8080
|
+ DL_Atten[DET_Alarm_DL3_Index] = bluecell_Currdatastatus.ATT_DL3_H << 8 | bluecell_Currdatastatus.ATT_DL3_L;
|
|
8081
|
+ DL_Atten[DET_Alarm_DL4_Index] = bluecell_Currdatastatus.ATT_DL4_H << 8 | bluecell_Currdatastatus.ATT_DL4_L;
|
|
8082
|
+
|
|
8083
|
+// 14 06 09 00 0c 28
|
|
8084
|
+ if(bluecell_Currdatastatus.DLI_AGC_ON_OFF){
|
|
8085
|
+ FRBT_DL_Atten[DET_Alarm_DL1_Index] = DL_Atten[DET_Alarm_DL1_Index];
|
|
8086
|
+ FRBT_DL_Atten[DET_Alarm_DL2_Index] = DL_Atten[DET_Alarm_DL2_Index];
|
|
8087
|
+ FRBT_DL_Atten[DET_Alarm_DL3_Index] = DL_Atten[DET_Alarm_DL3_Index];
|
|
8088
|
+ FRBT_DL_Atten[DET_Alarm_DL4_Index] = DL_Atten[DET_Alarm_DL4_Index];
|
|
8089
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten1_H = (FRBT_DL_Atten[DET_Alarm_DL1_Index] & 0xFF00) >> 8;
|
|
8090
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten1_L =(FRBT_DL_Atten[DET_Alarm_DL1_Index] & 0x00FF);
|
|
8091
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten2_H = (FRBT_DL_Atten[DET_Alarm_DL2_Index] & 0xFF00) >> 8;
|
|
8092
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten2_L =(FRBT_DL_Atten[DET_Alarm_DL2_Index] & 0x00FF);
|
|
8093
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten3_H = (FRBT_DL_Atten[DET_Alarm_DL3_Index] & 0xFF00) >> 8;
|
|
8094
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten3_L =(FRBT_DL_Atten[DET_Alarm_DL3_Index] & 0x00FF);
|
|
8095
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten4_H = (FRBT_DL_Atten[DET_Alarm_DL4_Index] & 0xFF00) >> 8;
|
|
8096
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten4_L =(FRBT_DL_Atten[DET_Alarm_DL4_Index] & 0x00FF);
|
|
8097
|
+ }
|
|
8098
|
+}
|
8010
|
8099
|
void Alarm_Check(){
|
8011
|
8100
|
// double temp = 0;
|
8012
|
8101
|
// double ret = 0;
|