|
|
@@ -420,11 +420,16 @@ void WIFI_recv_deal(void)
|
|
|
return;
|
|
|
|
|
|
//判断是否接收完成
|
|
|
+
|
|
|
if(wifi_state > WIFI_LISTEN)
|
|
|
{
|
|
|
- if(data[g_wifi_rx_last-1] != '\n' && data[g_wifi_rx_last-2] != '\n')
|
|
|
+ if(data[g_wifi_rx_last-1] != '\n' && data[g_wifi_rx_last-2] != '\r')
|
|
|
{
|
|
|
- return;
|
|
|
+ if(wifi_state == WIFI_TRANS){
|
|
|
+ if(data[g_wifi_rx_last-1] != '>' && data[g_wifi_rx_last-2] != '>'){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -536,11 +541,11 @@ void WIFI_recv_deal(void)
|
|
|
wifi_tx_len = 0;
|
|
|
// wifi_receive_clear();
|
|
|
}
|
|
|
- else if(NULL != find_str_loop(g_wifi_rx_buf, WIFI_RX_BUF_SIZE ,&g_wifi_rx_head, g_wifi_rx_last, "OK\r\n"))
|
|
|
+ else if(NULL != find_str_loop(g_wifi_rx_buf, WIFI_RX_BUF_SIZE ,&g_wifi_rx_head, g_wifi_rx_last, ">"))
|
|
|
{
|
|
|
wifi_receive_clear();
|
|
|
Van_Device_Printf(VAN_LOG_WIFI,"\n--> OK W %d", wifi_tx_len);
|
|
|
- WriteComm2((char *)wifi_tx_buf, wifi_tx_len+1);
|
|
|
+ WriteComm2((char *)wifi_tx_buf, wifi_tx_len);
|
|
|
wifi_ack_delay = 3000;
|
|
|
}
|
|
|
// else if(NULL != find_str_loop(g_wifi_rx_buf, WIFI_RX_BUF_SIZE ,&g_wifi_rx_head, g_wifi_rx_last, ">"))
|