diff --git a/binary/wifiHD.elf b/binary/wifiHD.elf index b0b5c6780..9876a534b 100644 Binary files a/binary/wifiHD.elf and b/binary/wifiHD.elf differ diff --git a/wifiHD/Release/wifiHD.elf b/wifiHD/Release/wifiHD.elf index b0b5c6780..9876a534b 100644 Binary files a/wifiHD/Release/wifiHD.elf and b/wifiHD/Release/wifiHD.elf differ diff --git a/wifiHD/src/ard_spi.c b/wifiHD/src/ard_spi.c index fec4de1ff..d7192b633 100644 --- a/wifiHD/src/ard_spi.c +++ b/wifiHD/src/ard_spi.c @@ -1476,7 +1476,7 @@ bool checkMsgFormat(uint8_t* _recv, int len, int* offset) unsigned char* recv = getStartCmdSeq(_recv, len, offset); if ((recv == NULL)||(recv!=_recv)) { - if ((INFO_WARN_FLAG)&&(len < 20)) //TODO stamp only short messages wrong + if ((enableDebug & INFO_WARN_FLAG)&&(len < 20)) //TODO stamp only short messages wrong dump((char*)_recv, len); if (recv == NULL) @@ -1551,7 +1551,7 @@ void spi_poll(struct netif* netif) { { sendError(); WARN("Check format msg failed!\n"); - if (INFO_WARN_FLAG) + if (enableDebug & INFO_WARN_FLAG) dump((char*)_receiveBuffer, receivedChars); state = SPI_CMD_IDLE; count=0; diff --git a/wifiHD/src/ard_tcp.c b/wifiHD/src/ard_tcp.c index 0571d416f..d5e052f24 100644 --- a/wifiHD/src/ard_tcp.c +++ b/wifiHD/src/ard_tcp.c @@ -142,6 +142,7 @@ static void tcp_send_data(struct ttcp *ttcp) { uint32_t len, orig_len; len = ttcp->left; + ttcp->buff_sent = 0; INFO_TCP_VER("left=%d len:%d tcp_sndbuf:%d\n", ttcp->left, len, tcp_sndbuf(ttcp->tpcb)); @@ -164,7 +165,7 @@ static void tcp_send_data(struct ttcp *ttcp) { { len /= 2; ttcp->buff_sent = 0; - }else{ + }else if (err == ERR_OK){ ttcp->buff_sent = 1; isDataSentCount = 0; } @@ -758,9 +759,13 @@ static err_t tcp_data_sent(void *arg, struct tcp_pcb *pcb, u16_t len) { _ttcp = arg; tcp_poll_retries = 0; + if (_ttcp) _ttcp->buff_sent = 1; - INFO_TCP("Packet sent pcb:%p len:%d dur:%d left:%d\n", pcb, len, timer_get_ms() - startTime, - (_ttcp)?(_ttcp->left):0); + + INFO_TCP("Packet sent pcb:%p len:%d dur:%d left:%d count:%d\n", pcb, len, timer_get_ms() - startTime, + (_ttcp)?(_ttcp->left):0, isDataSentCount); + + isDataSentCount = 0; if ((_ttcp)&&(_ttcp->left > 0)) { tcp_send_data(_ttcp);