Преглед изворни кода

Signed-off-by: zhuhongbin <kptzhu@163.com>从2月9日拉过来的

zhuhongbin пре 2 година
родитељ
комит
a0f3d0c3bd
3 измењених фајлова са 6 додато и 4 уклоњено
  1. 4 2
      tmr/button.c
  2. 1 1
      tmr/flash.c
  3. 1 1
      tmr/weight.c

+ 4 - 2
tmr/button.c

@@ -101,7 +101,8 @@ static void CheckMenuButton_entry(void *parameter) {
 								if (XbeeConst_NetAddress>0) XbeeConst_NetAddress--;  
 								else
 								{
-										if (WeightConst_SBType==4) XbeeConst_NetAddress=2; else XbeeConst_NetAddress=13;
+										//if (WeightConst_SBType==4) XbeeConst_NetAddress=2; else XbeeConst_NetAddress=13;
+									  XbeeConst_NetAddress=13;
 								}										
 								setNetAddress();
 								write_Flash("WL", &XbeeConst_NetAddress, sizeof(XbeeConst_NetAddress));
@@ -185,7 +186,8 @@ static void CheckMenuButton_entry(void *parameter) {
 						{
 								if (XbeeConst_NetAddress<13 && (WeightConst_SBType!=4&&WeightConst_SBType!=6))
 										XbeeConst_NetAddress++;
-								else if (XbeeConst_NetAddress<2 && (WeightConst_SBType==4))
+								//else if (XbeeConst_NetAddress<2 && (WeightConst_SBType==4))
+								else if (XbeeConst_NetAddress<13 && WeightConst_SBType==4)
 										XbeeConst_NetAddress++;
 								else
 										XbeeConst_NetAddress=0;

+ 1 - 1
tmr/flash.c

@@ -23,7 +23,7 @@ uint8_t XbeeConst_UseAPI = 0x01;
 uint8_t WeightConst_TQ = 0x05;//0x05;
 uint8_t WeightConst_BLE = 0;
 uint8_t WeightConst_ChanCheShu = 0x02;
-uint8_t WeightConst_SBType = 0x03;
+uint8_t WeightConst_SBType = 0x04;
 
 int16_t WeightConst_WeightBegin = -3000;    //°´¼ü¿ªÊ¼ÖØÁ¿
 

+ 1 - 1
tmr/weight.c

@@ -712,7 +712,7 @@ static void P_TMI_III() {
 				}
 				else if (WeightConst_RecWeightPoint1>4 && WeightConst_RecWeightData1[WeightConst_RecWeightPoint1-1] != 0x20) {
 					 //2D 33 36 35 34 0D
-					 readnumber(WeightConst_RecWeightData1,WeightConst_RecWeightPoint1,0, 5,5,0x2d, 0xFF);                
+					 readnumber(WeightConst_RecWeightData1,WeightConst_RecWeightPoint1,0, 5,0xFF,0x2d, 0xFF);                
 				}
 				WeightConst_RecWeightPoint1 = 0; //Ö¸Õ뻹ԭ
 		} else {