Quellcode durchsuchen

Merge branch 'master' of http://bluecell.synology.me:3000/june9152/STM32F103ZET_JDASMBIC

PYJ vor 5 Jahren
Ursprung
Commit
b413cab532
1 geänderte Dateien mit 33 neuen und 7 gelöschten Zeilen
  1. 33 7
      Bluecell_Src/Bluecell_operate.c

+ 33 - 7
Bluecell_Src/Bluecell_operate.c

@@ -3488,6 +3488,7 @@ uint32_t MBIC_DataSend(uint8_t* data){
3488 3488
     uint16_t Crcret = 0;
3489 3489
     int16_t tmpdata = 0;
3490 3490
      uint32_t HeaderLength = 75;
3491
+	 
3491 3492
 
3492 3493
     
3493 3494
     /*ALARM BIT LIST*/
@@ -4785,6 +4786,7 @@ bool MBIC_Operate(uint8_t* data){
4785 4786
     uint8_t cmd = data[MBIC_PROT_CMD_INDEX];
4786 4787
     int16_t Tmpdata = 0;
4787 4788
     int16_t Tmpdata2 = 0;    
4789
+	int16_t tempdata = 0;
4788 4790
     //uint16_t Temp_ADC = 0;
4789 4791
     //uint16_t i = 0;
4790 4792
     //double temp = 0;
@@ -4916,7 +4918,8 @@ bool MBIC_Operate(uint8_t* data){
4916 4918
                 bluecell_Currdatastatus.Temp_High_Threshold = data[MBIC_PAYLOADSTART + 3]; 
4917 4919
                 break;
4918 4920
             case  Temp_High_Threshold_Default             :
4919
-                bluecell_Currdatastatus.Temp_High_Threshold_Default = data[MBIC_PAYLOADSTART + 3]; 
4921
+				bluecell_Currdatastatus.Temp_High_Threshold = Temp_THREADHOLD_DEFAULT;
4922
+//                bluecell_Currdatastatus.Temp_High_Threshold_Default = data[MBIC_PAYLOADSTART + 3]; 
4920 4923
                 break;
4921 4924
             case  LED_TEST                                :
4922 4925
                 bluecell_Currdatastatus.LED_TEST = data[MBIC_PAYLOADSTART + 3]; 
@@ -5097,7 +5100,14 @@ bool MBIC_Operate(uint8_t* data){
5097 5100
 
5098 5101
                 break;
5099 5102
             case  DLI_Level_High_Low_Threshold_default    :
5100
-                bluecell_Currdatastatus.DLI_Level_High_Low_Threshold_default = data[MBIC_PAYLOADSTART + 3]; 
5103
+			    tempdata  = DLI_ATTEN_HIGHTHREADHOLD_DEFAULT;
5104
+			    bluecell_Currdatastatus.DLI_Level_High_Threshold_H = ((tempdata & 0xFF00) >> 8);
5105
+			    bluecell_Currdatastatus.DLI_Level_High_Threshold_L = ((tempdata & 0x00FF));
5106
+
5107
+			    tempdata  = DLI_ATTEN_LOWTHREADHOLD_DEFAULT;
5108
+			    bluecell_Currdatastatus.DLI_Level_Low_Threshold_H = ((tempdata & 0xFF00) >> 8);
5109
+			    bluecell_Currdatastatus.DLI_Level_Low_Threshold_L = ((tempdata & 0x00FF));				
5110
+              //  bluecell_Currdatastatus.DLI_Level_High_Low_Threshold_default = data[MBIC_PAYLOADSTART + 3]; 
5101 5111
 
5102 5112
                 break;
5103 5113
             case DLI_FRBT_D_Day: 
@@ -5153,7 +5163,10 @@ bool MBIC_Operate(uint8_t* data){
5153 5163
 
5154 5164
                 break;
5155 5165
             case  DLI_AGC_Threshold_Default               :
5156
-                bluecell_Currdatastatus.DLI_AGC_Threshold_default = data[MBIC_PAYLOADSTART + 3]; 
5166
+			    tempdata  = DLI_AGC_THREADHOLD_DEFAULT;
5167
+			    bluecell_Currdatastatus.DLI_AGC_Threshold_H = ((tempdata & 0xFF00) >> 8);        
5168
+			    bluecell_Currdatastatus.DLI_AGC_Threshold_L = ((tempdata & 0x00FF));   				
5169
+//                bluecell_Currdatastatus.DLI_AGC_Threshold_default = data[MBIC_PAYLOADSTART + 3]; 
5157 5170
                 break;
5158 5171
             case  DLI_Shutdown_ON_OFF                     :
5159 5172
                 bluecell_Currdatastatus.DLI_Shutdown_ON_OFF = data[MBIC_PAYLOADSTART + 3]; 
@@ -5173,7 +5186,10 @@ bool MBIC_Operate(uint8_t* data){
5173 5186
 
5174 5187
                 break;
5175 5188
             case  DLI_Shutdown_Threshold_Default          :
5176
-                bluecell_Currdatastatus.DLI_Shutdown_Threshold_Default = data[MBIC_PAYLOADSTART + 3]; 
5189
+			    tempdata  = DLI_SHUTDOWN_THREADHOLD_DEFAULT;
5190
+			    bluecell_Currdatastatus.DLI_Shutdown_Threshold_H = ((tempdata & 0xFF00) >> 8);        
5191
+			    bluecell_Currdatastatus.DLI_Shutdown_Threshold_L = ((tempdata & 0x00FF));  				
5192
+//                bluecell_Currdatastatus.DLI_Shutdown_Threshold_Default = data[MBIC_PAYLOADSTART + 3]; 
5177 5193
 
5178 5194
                 break;
5179 5195
             case  ULO_RF_Path1_ON_OFF            :
@@ -5382,7 +5398,10 @@ bool MBIC_Operate(uint8_t* data){
5382 5398
                 printf("bluecell_Currdatastatus.ULO_Level_High_Threshold_L : %x \r\n",bluecell_Currdatastatus.ULO_Level_High_Threshold_L);    
5383 5399
                 break;
5384 5400
             case  ULO_Level_High_Threshold_default        :
5385
-                bluecell_Currdatastatus.ULO_Level_High_Threshold_default = data[MBIC_PAYLOADSTART + 3]; 
5401
+			    tempdata  = ULO_LEVEL_HIGH_THREADHOLD_DEFAULT;
5402
+			    bluecell_Currdatastatus.ULO_Level_High_Threshold_H = ((tempdata & 0xFF00) >> 8);
5403
+			    bluecell_Currdatastatus.ULO_Level_High_Threshold_L = ((tempdata & 0x00FF));    				
5404
+//                bluecell_Currdatastatus.ULO_Level_High_Threshold_default = data[MBIC_PAYLOADSTART + 3]; 
5386 5405
                 break;
5387 5406
             case  ULO_ALC_ON_OFF                   :
5388 5407
                 bluecell_Currdatastatus.ULO_ALC_ON_OFF = data[MBIC_PAYLOADSTART + 3]; 
@@ -5396,7 +5415,10 @@ bool MBIC_Operate(uint8_t* data){
5396 5415
 
5397 5416
                 break;
5398 5417
             case  ULO_ALC_Threshold_Default               :
5399
-                bluecell_Currdatastatus.ULO_ALC_Threshold_Default = data[MBIC_PAYLOADSTART + 3]; 
5418
+			    tempdata = ULO_ALC_THREADHOLD_DEFAULT;
5419
+			    bluecell_Currdatastatus.ULO_ALC_Threshold_H = ((tempdata & 0xFF00) >> 8);    
5420
+			    bluecell_Currdatastatus.ULO_ALC_Threshold_L = ((tempdata & 0x00FF));  				
5421
+//                bluecell_Currdatastatus.ULO_ALC_Threshold_Default = data[MBIC_PAYLOADSTART + 3]; 
5400 5422
 
5401 5423
                 break;
5402 5424
             case  ULO_Shutdown_ON_OFF                     :
@@ -5409,7 +5431,11 @@ bool MBIC_Operate(uint8_t* data){
5409 5431
 
5410 5432
                 break;
5411 5433
             case  ULO_Shutdown_Threshold_Default          :
5412
-                bluecell_Currdatastatus.ULO_Shutdown_Threshold_Default = data[MBIC_PAYLOADSTART + 3]; 
5434
+			    tempdata  = ULO_SHUTDOWN_THREADHOLD_DEFAULT;
5435
+			    bluecell_Currdatastatus.ULO_Shutdown_Threshold_H = ((tempdata & 0xFF00) >> 8);        
5436
+			    bluecell_Currdatastatus.ULO_Shutdown_Threshold_L = ((tempdata & 0x00FF));    
5437
+ 								
5438
+                //bluecell_Currdatastatus.ULO_Shutdown_Threshold_Default = data[MBIC_PAYLOADSTART + 3]; 
5413 5439
 
5414 5440
             
5415 5441
                 break;