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

修改了版本号第一次无法上传的bug

LAPTOP-KB7QFH2U\ChenJie-PC пре 1 година
родитељ
комит
b5cf95a1a4
1 измењених фајлова са 6 додато и 6 уклоњено
  1. 6 6
      code/app/AppTaskUart1.c

+ 6 - 6
code/app/AppTaskUart1.c

@@ -730,27 +730,27 @@ void TcpDataEncode(uint32 *PtrSendAddr, uint16 *SendLen)
 	static UTC8TimeType UTC8TimeTcp;
 	uint8 *SendBuffer = NULL;
 	uint8 DataIdx = 0;
-	if (TcpSendTimeCounter == 5)
+	if (TcpSendTimeCounter%(60*60) == 1)
 	{
 		DataIdx = VerMsg; //版本信息发送
 	}
-	else if (TcpSendTimeCounter % 10 == 1)
+	else if (TcpSendTimeCounter % 10 == 2)
 	{
 		DataIdx = BattMsg; //电池信息发送
 	}
-	else if ((TcpSendTimeCounter) % 10 == 2)
+	else if ((TcpSendTimeCounter) % 10 == 3)
 	{
 		DataIdx = 0x83; //储能开关信息发送
 	}
-	else if ((TcpSendTimeCounter) % 240 == 3)
+	else if ((TcpSendTimeCounter) % 240 == 4)
 	{
 		DataIdx = GpsMsg; //定位信息发送
 	}
-	else if ((TcpSendTimeCounter) % 240 == 4)
+	else if ((TcpSendTimeCounter) % 240 == 5)
 	{
 		DataIdx = 0x93; //储能电量信息发送
 	}
-	else if ((TcpSendTimeCounter) % 60 == 5)
+	else if ((TcpSendTimeCounter) % 60 == 6)
 	{
 		DataIdx = 0x8A; //累计信息发送
 	}