|
@@ -238,7 +238,7 @@ sint8 tcpipConnectionSend(uint8 TcpConnectId, uint8 *SendDataPtr, uint16 SendDat
|
|
if (((ret==0)&&(ReadLen>0)&&((uint8 *)strstr((char *)UartRecvPtr, (char *)(">"))))||1)//此IF条件默认通过
|
|
if (((ret==0)&&(ReadLen>0)&&((uint8 *)strstr((char *)UartRecvPtr, (char *)(">"))))||1)//此IF条件默认通过
|
|
{
|
|
{
|
|
UART_Send_Data(UART_LPUART1, (uint8 *)SendDataPtr, SendDataLen, 1000);
|
|
UART_Send_Data(UART_LPUART1, (uint8 *)SendDataPtr, SendDataLen, 1000);
|
|
- sint8 ret = AtcmdDelayRecvFunc(UART_LPUART1,(char *)("+CIPSEND"),5000);
|
|
|
|
|
|
+ sint8 ret = AtcmdDelayRecvFunc(UART_LPUART1,(char *)("+CIPSEND"),2000);
|
|
if (ret==0)
|
|
if (ret==0)
|
|
{
|
|
{
|
|
outValue = 0;
|
|
outValue = 0;
|
|
@@ -770,6 +770,10 @@ void TcpDataEncode(uint32 *PtrSendAddr, uint16 *SendLen)
|
|
{
|
|
{
|
|
DataIdx = 0x8A; //累计信息发送
|
|
DataIdx = 0x8A; //累计信息发送
|
|
}
|
|
}
|
|
|
|
+ else if ((TcpSendTimeCounter) % (60*60*2) == 6)
|
|
|
|
+ {
|
|
|
|
+ DataIdx = 0x01; //时间校准
|
|
|
|
+ }
|
|
else
|
|
else
|
|
{
|
|
{
|
|
*SendLen = 0;
|
|
*SendLen = 0;
|
|
@@ -784,6 +788,16 @@ void TcpDataEncode(uint32 *PtrSendAddr, uint16 *SendLen)
|
|
vTaskDelay(pdMS_TO_TICKS(100));
|
|
vTaskDelay(pdMS_TO_TICKS(100));
|
|
switch (DataIdx)
|
|
switch (DataIdx)
|
|
{
|
|
{
|
|
|
|
+ case 0x01://时间校准
|
|
|
|
+ {
|
|
|
|
+ char *ATCmdSend = (char *)("AT+CNTP\r\n");
|
|
|
|
+ uint8 ATCmdSendLen = mstrlen(ATCmdSend);
|
|
|
|
+ uint8 ReadLen = 0;
|
|
|
|
+ uint8 UartRecvPtr[20];
|
|
|
|
+ UART_Query_Data(UART_LPUART1, UART_LPUART1, (uint8 *)ATCmdSend, ATCmdSendLen,UartRecvPtr, &ReadLen, pdMS_TO_TICKS(500));
|
|
|
|
+ *SendLen = 0;//不发送,长度为0
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
case 0x82:
|
|
case 0x82:
|
|
{
|
|
{
|
|
GPSInfo GpsRecvData;
|
|
GPSInfo GpsRecvData;
|