Переглянути джерело

Signed-off-by: zhuhongbin <kptzhu@163.com>temp1

zhuhongbin 2 роки тому
батько
коміт
ead259e49e
3 змінених файлів з 9 додано та 9 видалено
  1. 5 5
      tmr/button.c
  2. 1 1
      tmr/display.c
  3. 3 3
      tmr/flash.c

+ 5 - 5
tmr/button.c

@@ -25,7 +25,7 @@ struct button_state_t button_state = {1,1,1,1,1,1,1};
 //static rt_uint8_t MenuItem__=0; //µ±Ç°²Ëµ¥ÖµÐòºÅ
 
 extern unsigned char  iscowweight;
-
+extern uint8_t  isnewBan;
 void sendshowCC(void)
 {
     XbeeConst_FRemoteTxBuf[0] = 7;
@@ -69,7 +69,7 @@ static void CheckMenuButton_entry(void *parameter) {
 		if (button_state.b4>=5)	button_state.b4 = 0;
 		if (button_state.b5>=5)	button_state.b5 = 0;
 		if (button_state.b7>=15)	button_state.b7 = 0;
-//		if (WeightConst_SBType == 3 && isnewBan==1)
+		if (WeightConst_SBType == 3 && isnewBan==1)
 					{	
 			if (HAL_GPIO_ReadPin(pwr_GPIO_Port, pwr_Pin) == 0) {
 				rt_thread_mdelay(2000);
@@ -439,7 +439,7 @@ void thread_beep_init(void)
         rt_thread_startup(tid_beep);
 }
 
-extern uint8_t  isnewBan; 
+ 
 static unsigned int button4_press=0;
 static unsigned int button4_press_=0;
 static void CheckButton_entry(void *parameter) {
@@ -467,8 +467,8 @@ static void CheckButton_entry(void *parameter) {
 				if (button_state.b4>=5)	button_state.b4 = 0;
 				
 				if (button_state.b7>=15)	button_state.b7 = 0;
-				if //(WeightConst_SBType == 3 &&
-					(isnewBan==1)
+				if (WeightConst_SBType == 3 &&
+					isnewBan==1)
 				{					
 					if ((HAL_GPIO_ReadPin(pwr_GPIO_Port, pwr_Pin) == 0) ) {
 						rt_thread_mdelay(2000);

+ 1 - 1
tmr/display.c

@@ -844,7 +844,7 @@ static void Display_entry(void *parameter) {
 							}
 					  }
 						if (isn>=1){
-								rt_thread_mdelay(500);							 
+								rt_thread_mdelay(600);							 
 						}
 						else{
 				        rt_thread_mdelay(300);

+ 3 - 3
tmr/flash.c

@@ -11,17 +11,17 @@ uint8_t  isCC = 0 ;
 uint8_t  isBLE =0;  //用蓝牙传输
 uint8_t  isNsmall =0;  //新小屏
 uint8_t  isnewBan =1;  //隔离主板
-uint8_t  isnewLora =1;  //用lora协议
+uint8_t  isnewLora =0;  //用lora协议
 const uint8_t  isTag = 0 ; //是否含识读标签
 unsigned char  isn = 0;  //是否新大屏
 unsigned char  remote_sumweight = 0;  //远程是否包含重量
 unsigned char  iscowweight = 0;  //是否奶牛秤
 unsigned char eid[10];    //电子耳标,0为长度
 
-uint8_t XbeeConst_DeviceAddress = 0x01;         
+uint8_t XbeeConst_DeviceAddress = 0x02;         
 uint8_t XbeeConst_NetAddress = 0x00;
 uint8_t XbeeConst_UseAPI = 0x01;
-uint8_t WeightConst_TQ = 0x03;//0x05;
+uint8_t WeightConst_TQ = 0x05;//0x05;
 uint8_t WeightConst_BLE = 0;
 uint8_t WeightConst_ChanCheShu = 0x02;
 uint8_t WeightConst_SBType = 0x01;