|
@@ -130,6 +130,7 @@ void Temp_Shutdown_ONOFF(uint8_t val);
|
130
|
130
|
void UL_Path_OnOff(uint8_t Index,uint8_t value,uint8_t* path,uint8_t* PrevAtten,uint8_t* retrycnt,uint8_t* PrevRetryCnt);
|
131
|
131
|
int16_t Temperature_Offset_Get(int8_t* Temp_Table,int8_t CurrTemp);
|
132
|
132
|
int Bluecell_RoundCalc(double data);
|
|
133
|
+void DLI_FRBT_ONOFF_Set(bool);
|
133
|
134
|
|
134
|
135
|
|
135
|
136
|
/***************************************************************************************/
|
|
@@ -4281,6 +4282,7 @@ void Factory_Set(){
|
4281
|
4282
|
type += HAL_GPIO_ReadPin(UNIT_ID3_GPIO_Port,UNIT_ID3_Pin) << 3;
|
4282
|
4283
|
// printf("Factory Set Start \r\n");
|
4283
|
4284
|
/*ALARM MASK*/
|
|
4285
|
+
|
4284
|
4286
|
bluecell_Currdatastatus.ALARM_MASK1 = 0x80;
|
4285
|
4287
|
bluecell_Currdatastatus.ALARM_MASK2 = 0xFF ;
|
4286
|
4288
|
bluecell_Currdatastatus.ALARM_MASK3 = 0xFF;
|
|
@@ -4291,7 +4293,7 @@ void Factory_Set(){
|
4291
|
4293
|
/*Temp High Thread Hold*/
|
4292
|
4294
|
bluecell_Currdatastatus.Temp_High_Threshold = Temp_THREADHOLD_DEFAULT;
|
4293
|
4295
|
/*Carrier On off*/
|
4294
|
|
- bluecell_Currdatastatus.Carrier_ON_OFF = Temp_THREADHOLD_DEFAULT;
|
|
4296
|
+ bluecell_Currdatastatus.Carrier_ON_OFF = CARRIER_DEFAULT;
|
4295
|
4297
|
/*DL PATH */
|
4296
|
4298
|
bluecell_Currdatastatus.ATT_DL1_PATH = PATH_DEFAULT;
|
4297
|
4299
|
bluecell_Currdatastatus.ATT_DL2_PATH = PATH_DEFAULT;
|
|
@@ -4544,8 +4546,7 @@ void Factory_Set(){
|
4544
|
4546
|
bluecell_Prevdatastatus.ATT_UL3_L = 0xFF;
|
4545
|
4547
|
bluecell_Prevdatastatus.ATT_UL4_L = 0xFF;
|
4546
|
4548
|
|
4547
|
|
-
|
4548
|
|
-
|
|
4549
|
+ DLI_FRBT_ONOFF_Set(true);
|
4549
|
4550
|
|
4550
|
4551
|
|
4551
|
4552
|
|
|
@@ -4791,7 +4792,7 @@ void TimeSetting(uint8_t* data){
|
4791
|
4792
|
// printf("Time Set Complete\r\n");
|
4792
|
4793
|
}
|
4793
|
4794
|
void Carrier_ONOFF(uint8_t val){
|
4794
|
|
- if(val == 1){
|
|
4795
|
+ if(val != 0){
|
4795
|
4796
|
bluecell_Currdatastatus.ATT_DL1_PATH = PATH_DEFAULT;
|
4796
|
4797
|
bluecell_Currdatastatus.ATT_DL2_PATH = PATH_DEFAULT;
|
4797
|
4798
|
bluecell_Currdatastatus.ATT_DL3_PATH = PATH_DEFAULT;
|
|
@@ -5329,7 +5330,32 @@ void Alarm_Report_Send(uint16_t Alarm_type,uint8_t val){
|
5329
|
5330
|
Uart1_Data_Send(&Alarm_ReportData[0],sizeof(Alarm_ReportData));
|
5330
|
5331
|
// printf(" Alarm_ReportData[MBIC_PAYLOADSTART + 42] : %x \r\n", Alarm_ReportData[MBIC_PAYLOADSTART + 42]);
|
5331
|
5332
|
}
|
5332
|
|
-
|
|
5333
|
+void DLI_FRBT_ONOFF_Set(bool val){
|
|
5334
|
+ if(val == 0){
|
|
5335
|
+ bluecell_Currdatastatus.DLI_FRBT_Status = FRBT_IDEL;
|
|
5336
|
+ for(int i = 0; i < DLI_FRBT_Time_Index_Max; i++){
|
|
5337
|
+ PrevFRBT_Day[DLI_FRBT_Time_Year + i] = FRBT_Day[DLI_FRBT_Time_Year + i] = 0;
|
|
5338
|
+ }
|
|
5339
|
+ Last_Day = 0;
|
|
5340
|
+ Prev_Last_Day = 0;
|
|
5341
|
+ FRBT_UserCtrl = 0;
|
|
5342
|
+ }
|
|
5343
|
+ else{
|
|
5344
|
+ bluecell_Currdatastatus.DLI_FRBT_Status = FRBT_TRACKING;
|
|
5345
|
+ }
|
|
5346
|
+ DLI_FRBT_ON_OFF_Set(val);
|
|
5347
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten1_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
5348
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten2_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
5349
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten3_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
5350
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten4_H = DLI_FRBT_ATTEN_DEFALUT;
|
|
5351
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten1_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
5352
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten2_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
5353
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten3_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
5354
|
+ bluecell_Currdatastatus.DLI_FRBT_Atten4_L= DLI_FRBT_ATTEN_DEFALUT;
|
|
5355
|
+ bluecell_Currdatastatus.DLI_FRBT_D_Day = DLI_FRBT_DAY_DEFAULT;
|
|
5356
|
+ Bluecell_StructCpy(&DataWrite[0],&bluecell_Currdatastatus.bluecell_header,sizeof(BLUESTATUS_st));
|
|
5357
|
+ EEPROM_M24C08_write(EEPROM_M24C08_ID ,(EEPROM_WINDOW_STATUS_ADDRESDS),&DataWrite[0],sizeof(BLUESTATUS_st));
|
|
5358
|
+}
|
5333
|
5359
|
bool MBIC_Operate(uint8_t* data){
|
5334
|
5360
|
// Bluecell_StructCpy(&Txdata[0],&bluecell_Currdatastatus.bluecell_header,sizeof(BLUESTATUS_st));
|
5335
|
5361
|
uint8_t datatype = data[MBIC_PAYLOADSTART + 1];
|
|
@@ -5421,6 +5447,8 @@ bool MBIC_Operate(uint8_t* data){
|
5421
|
5447
|
else if(cmd == MBIC_SET){
|
5422
|
5448
|
protocolReplay:
|
5423
|
5449
|
datatype = data[MBIC_PAYLOADSTART + 1];
|
|
5450
|
+// printf("datatype : %x \r\n",datatype);
|
|
5451
|
+// printf("bluecell_Currdatastatus.Carrier_ON_OFF : %d \r\n",bluecell_Currdatastatus.Carrier_ON_OFF);
|
5424
|
5452
|
switch(datatype){
|
5425
|
5453
|
case Alarm_Mask :
|
5426
|
5454
|
bluecell_Currdatastatus.ALARM_MASK1 = data[MBIC_PAYLOADSTART + 3];
|
|
@@ -5475,6 +5503,7 @@ bool MBIC_Operate(uint8_t* data){
|
5475
|
5503
|
Bluecell_StructCpy(&DataWrite[0],&bluecell_Currdatastatus.bluecell_header,sizeof(BLUESTATUS_st));
|
5476
|
5504
|
EEPROM_M24C08_write(EEPROM_M24C08_ID ,(EEPROM_WINDOW_STATUS_ADDRESDS),&DataWrite[0],sizeof(BLUESTATUS_st));
|
5477
|
5505
|
EEPROM_M24C08_Read(EEPROM_M24C08_ID,EEPROM_WINDOW_STATUS_ADDRESDS,&bluecell_Currdatastatus.bluecell_header,sizeof(BLUESTATUS_st) );
|
|
5506
|
+ printf("bluecell_Currdatastatus.FRBT ON OFF : %d \r\n",bluecell_Currdatastatus.DLI_FRBT_ON_OFF);
|
5478
|
5507
|
printf("bluecell_Currdatastatus.CPU_Bank_Select : %d \r\n",bluecell_Currdatastatus.CPU_Bank_Select);
|
5479
|
5508
|
printf("I will Booting Bank : %d \r\n",bluecell_Currdatastatus.CPU_Current_Bank);
|
5480
|
5509
|
printf("Reset : \r\n");
|
|
@@ -5526,12 +5555,18 @@ bool MBIC_Operate(uint8_t* data){
|
5526
|
5555
|
// printf(" bluecell_Currdatastatus.ATT_DL1_PATH : %d \r\n", bluecell_Currdatastatus.ATT_DL1_PATH);
|
5527
|
5556
|
break;
|
5528
|
5557
|
case Carrier_ON_OFF :
|
|
5558
|
+// for(int tt = 0; tt < 4; tt++)
|
|
5559
|
+// printf("Carrier : data[MBIC_PAYLOADSTART + %d] : %x \r\n",tt,data[MBIC_PAYLOADSTART + tt]);
|
5529
|
5560
|
bluecell_Currdatastatus.Carrier_ON_OFF = data[MBIC_PAYLOADSTART + 3];
|
5530
|
5561
|
Carrier_ONOFF(bluecell_Currdatastatus.Carrier_ON_OFF);
|
|
5562
|
+// printf("bluecell_Currdatastatus.Carrier_ON_OFF : %x \r\n",bluecell_Currdatastatus.Carrier_ON_OFF);
|
5531
|
5563
|
break;
|
5532
|
5564
|
case DLI_RF_Path1_ON_OFF :
|
5533
|
|
- if(bluecell_Currdatastatus.Carrier_ON_OFF == false)
|
5534
|
|
- return true;
|
|
5565
|
+// printf("data[MBIC_PAYLOADSTART + 3] : %d \r\n",data[MBIC_PAYLOADSTART + 3]);
|
|
5566
|
+ if(bluecell_Currdatastatus.Carrier_ON_OFF == false){
|
|
5567
|
+ break;
|
|
5568
|
+// return true;
|
|
5569
|
+ }
|
5535
|
5570
|
if(data[MBIC_PAYLOADSTART + 3] != 0)
|
5536
|
5571
|
bluecell_Currdatastatus.Path_TempSave_Bit |= 0x80;
|
5537
|
5572
|
else
|
|
@@ -5544,8 +5579,12 @@ bool MBIC_Operate(uint8_t* data){
|
5544
|
5579
|
&bluecell_Prevdatastatus.DLI_Shutdown_Retry_Count1) ;
|
5545
|
5580
|
break;
|
5546
|
5581
|
case DLI_RF_Path2_ON_OFF :
|
5547
|
|
- if(bluecell_Currdatastatus.Carrier_ON_OFF == false)
|
5548
|
|
- return true;
|
|
5582
|
+// printf("data[MBIC_PAYLOADSTART + 3] : %d \r\n",data[MBIC_PAYLOADSTART + 3]);
|
|
5583
|
+ if(bluecell_Currdatastatus.Carrier_ON_OFF == false){
|
|
5584
|
+ break;
|
|
5585
|
+// return true;
|
|
5586
|
+ }
|
|
5587
|
+
|
5549
|
5588
|
if(data[MBIC_PAYLOADSTART + 3] != 0)
|
5550
|
5589
|
bluecell_Currdatastatus.Path_TempSave_Bit |= 0x40;
|
5551
|
5590
|
else
|
|
@@ -5559,8 +5598,11 @@ bool MBIC_Operate(uint8_t* data){
|
5559
|
5598
|
&bluecell_Prevdatastatus.DLI_Shutdown_Retry_Count2) ;
|
5560
|
5599
|
break;
|
5561
|
5600
|
case DLI_RF_Path3_ON_OFF :
|
5562
|
|
- if(bluecell_Currdatastatus.Carrier_ON_OFF == false)
|
5563
|
|
- return true;
|
|
5601
|
+// printf("data[MBIC_PAYLOADSTART + 3] : %d \r\n",data[MBIC_PAYLOADSTART + 3]);
|
|
5602
|
+ if(bluecell_Currdatastatus.Carrier_ON_OFF == false){
|
|
5603
|
+ break;
|
|
5604
|
+// return true;
|
|
5605
|
+ }
|
5564
|
5606
|
if(data[MBIC_PAYLOADSTART + 3] != 0)
|
5565
|
5607
|
bluecell_Currdatastatus.Path_TempSave_Bit |= 0x20;
|
5566
|
5608
|
else
|
|
@@ -5574,8 +5616,12 @@ bool MBIC_Operate(uint8_t* data){
|
5574
|
5616
|
|
5575
|
5617
|
break;
|
5576
|
5618
|
case DLI_RF_Path4_ON_OFF :
|
5577
|
|
- if(bluecell_Currdatastatus.Carrier_ON_OFF == false)
|
5578
|
|
- return true;
|
|
5619
|
+// printf("data[MBIC_PAYLOADSTART + 3] : %d \r\n",data[MBIC_PAYLOADSTART + 3]);
|
|
5620
|
+ if(bluecell_Currdatastatus.Carrier_ON_OFF == false){
|
|
5621
|
+ break;
|
|
5622
|
+// return true;
|
|
5623
|
+ }
|
|
5624
|
+
|
5579
|
5625
|
if(data[MBIC_PAYLOADSTART + 3] != 0)
|
5580
|
5626
|
bluecell_Currdatastatus.Path_TempSave_Bit |= 0x10;
|
5581
|
5627
|
else
|
|
@@ -5797,8 +5843,12 @@ bool MBIC_Operate(uint8_t* data){
|
5797
|
5843
|
|
5798
|
5844
|
break;
|
5799
|
5845
|
case ULO_RF_Path1_ON_OFF :
|
5800
|
|
- if(bluecell_Currdatastatus.Carrier_ON_OFF == false)
|
5801
|
|
- return true;
|
|
5846
|
+// printf("data[MBIC_PAYLOADSTART + 3] : %d \r\n",data[MBIC_PAYLOADSTART + 3]);
|
|
5847
|
+ if(bluecell_Currdatastatus.Carrier_ON_OFF == false){
|
|
5848
|
+ break;
|
|
5849
|
+// return true;
|
|
5850
|
+ }
|
|
5851
|
+
|
5802
|
5852
|
if(data[MBIC_PAYLOADSTART + 3] != 0)
|
5803
|
5853
|
bluecell_Currdatastatus.Path_TempSave_Bit |= 0x08;
|
5804
|
5854
|
else
|
|
@@ -5812,8 +5862,11 @@ bool MBIC_Operate(uint8_t* data){
|
5812
|
5862
|
|
5813
|
5863
|
break;
|
5814
|
5864
|
case ULO_RF_Path2_ON_OFF :
|
5815
|
|
- if(bluecell_Currdatastatus.Carrier_ON_OFF == false)
|
5816
|
|
- return true;
|
|
5865
|
+// printf("data[MBIC_PAYLOADSTART + 3] : %d \r\n",data[MBIC_PAYLOADSTART + 3]);
|
|
5866
|
+ if(bluecell_Currdatastatus.Carrier_ON_OFF == false){
|
|
5867
|
+ break;
|
|
5868
|
+// return true;
|
|
5869
|
+ }
|
5817
|
5870
|
if(data[MBIC_PAYLOADSTART + 3] != 0)
|
5818
|
5871
|
bluecell_Currdatastatus.Path_TempSave_Bit |= 0x04;
|
5819
|
5872
|
else
|
|
@@ -5826,8 +5879,11 @@ bool MBIC_Operate(uint8_t* data){
|
5826
|
5879
|
&bluecell_Prevdatastatus.ULO_Shutdown_Retry_Count2) ;
|
5827
|
5880
|
break;
|
5828
|
5881
|
case ULO_RF_Path3_ON_OFF :
|
5829
|
|
- if(bluecell_Currdatastatus.Carrier_ON_OFF == false)
|
5830
|
|
- return true;
|
|
5882
|
+// printf("data[MBIC_PAYLOADSTART + 3] : %d \r\n",data[MBIC_PAYLOADSTART + 3]);
|
|
5883
|
+ if(bluecell_Currdatastatus.Carrier_ON_OFF == false){
|
|
5884
|
+ break;
|
|
5885
|
+// return true;
|
|
5886
|
+ }
|
5831
|
5887
|
if(data[MBIC_PAYLOADSTART + 3] != 0)
|
5832
|
5888
|
bluecell_Currdatastatus.Path_TempSave_Bit |= 0x02;
|
5833
|
5889
|
else
|
|
@@ -5840,8 +5896,11 @@ bool MBIC_Operate(uint8_t* data){
|
5840
|
5896
|
&bluecell_Prevdatastatus.ULO_Shutdown_Retry_Count3) ;
|
5841
|
5897
|
break;
|
5842
|
5898
|
case ULO_RF_Path4_ON_OFF :
|
5843
|
|
- if(bluecell_Currdatastatus.Carrier_ON_OFF == false)
|
5844
|
|
- return true;
|
|
5899
|
+// printf("data[MBIC_PAYLOADSTART + 3] : %d \r\n",data[MBIC_PAYLOADSTART + 3]);
|
|
5900
|
+ if(bluecell_Currdatastatus.Carrier_ON_OFF == false){
|
|
5901
|
+ break;
|
|
5902
|
+// return true;
|
|
5903
|
+ }
|
5845
|
5904
|
if(data[MBIC_PAYLOADSTART + 3] != 0)
|
5846
|
5905
|
bluecell_Currdatastatus.Path_TempSave_Bit |= 0x01;
|
5847
|
5906
|
else
|
|
@@ -5961,7 +6020,7 @@ bool MBIC_Operate(uint8_t* data){
|
5961
|
6020
|
tempdata = ULO_LEVEL_HIGH_THREADHOLD_DEFAULT;
|
5962
|
6021
|
bluecell_Currdatastatus.ULO_Level_High_Threshold_H = ((tempdata & 0xFF00) >> 8);
|
5963
|
6022
|
bluecell_Currdatastatus.ULO_Level_High_Threshold_L = ((tempdata & 0x00FF));
|
5964
|
|
-// bluecell_Currdatastatus.ULO_Level_High_Threshold_default = data[MBIC_PAYLOADSTART + 3];
|
|
6023
|
+// bluecell_Currdatastatus.ULO_Level_High_Threshold_default = data[MBIC_PAYLOADSTART + 3];
|
5965
|
6024
|
break;
|
5966
|
6025
|
#if 0 // PYJ.2020.09.03_BEGIN --
|
5967
|
6026
|
case ULO_SelfTest1:
|
|
@@ -6051,6 +6110,7 @@ bool MBIC_Operate(uint8_t* data){
|
6051
|
6110
|
Length = MBIC_DataSend(data);
|
6052
|
6111
|
Bluecell_StructCpy(&DataWrite[0],&bluecell_Currdatastatus.bluecell_header,sizeof(BLUESTATUS_st));
|
6053
|
6112
|
EEPROM_M24C08_write(EEPROM_M24C08_ID ,(EEPROM_WINDOW_STATUS_ADDRESDS),&DataWrite[0],sizeof(BLUESTATUS_st));
|
|
6113
|
+// printf("HFR Command Exit\r\n");
|
6054
|
6114
|
}
|
6055
|
6115
|
else if(cmd == MBIC_Table_Get){
|
6056
|
6116
|
/*Table Get */
|