teste de publish
Dependencies: DS1820 HighSpeedAnalogIn devices mbed
Diff: diversos.cpp
- Revision:
- 17:9b0eecbacbaa
- Parent:
- 14:c0162ab2a951
- Child:
- 18:1eefda1f7736
--- a/diversos.cpp Wed Jan 03 14:07:18 2018 +0000 +++ b/diversos.cpp Tue Jan 09 13:45:17 2018 +0000 @@ -161,7 +161,7 @@ fileCheckSum16BIT = atoi(pCharFile); remove("/sd/RAD/tempFile.bin"); pc.printf("Iniciando recepcao do server arquivo deviceCfg.\n"); - modemCom::status.recebendoArquivoDoServer = true; + modemCom::status.recebendoArquivoDoServer = 2; sprintf(modemCom::bufIn,"AT+CIPSEND=%u,%lu\r\n",idConnection,10); modem.puts(modemCom::bufIn); @@ -201,8 +201,7 @@ sprintf(msg,"erro"); modemCom::sendBufferCommandMode(idConnection,msg,strlen(msg)); pc.printf("Recebido correto mas n foi possivel renomear arquivo.\r\n"); - } - modemCom::status.recebendoArquivoDoServer = false; + } }else{ /*sprintf(diversos::msg,"File Corrupted checkSum16BIT_Lido <%lu>.\r\n",checkSum16BIT_Lido); modemCom::sendBufferCommandMode(2,diversos::msg,strlen(diversos::msg));*/ @@ -210,6 +209,7 @@ modemCom::sendBufferCommandMode(idConnection,msg,strlen(msg)); pc.printf("File Corrupted checkSum16BIT_Lido <%lu>.\r\n",checkSum16BIT_Lido); } + modemCom::status.recebendoArquivoDoServer = 0; modemCom::status.timeOut=10; modemCom::timeOutModem = 50; modemCom::status.timeOut = 1;